-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6356 from ChrisBr/staging-api
Add missing pieces to Staging API
- Loading branch information
Showing
13 changed files
with
2,696 additions
and
91 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
src/api/app/views/staging/staging_projects/_checks.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
builder.checks(count: checks.count) do | ||
checks.each do |check| | ||
render(partial: 'status/checks/check', locals: { object: check, builder: builder }) | ||
end | ||
end |
5 changes: 5 additions & 0 deletions
5
src/api/app/views/staging/staging_projects/_missing_checks.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
builder.missing_checks(count: missing_checks.count) do | ||
missing_checks.each do |name| | ||
builder.missing_check(name: name, state: :pending, required: true) | ||
end | ||
end |
3 changes: 3 additions & 0 deletions
3
src/api/app/views/staging/staging_projects/_requests.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
requests.each do |request| | ||
builder.entry(id: request.number, creator: request.creator, state: request.state, package: request.first_target_package) | ||
end |
5 changes: 0 additions & 5 deletions
5
src/api/app/views/staging/staging_projects/_requests_to_review.xml.builder
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
src/api/app/views/staging/staging_projects/_staged_requests.xml.builder
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/api/app/views/staging/staging_projects/_staging_project_item.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
builder.staging_project(name: staging_project.name, state: staging_project.overall_state) do | ||
builder.staged_requests(count: staging_project.staged_requests.count) do | ||
render(partial: 'requests', locals: { requests: staging_project.staged_requests, builder: builder }) | ||
end | ||
builder.untracked_requests(count: staging_project.untracked_requests.count) do | ||
render(partial: 'requests', locals: { requests: staging_project.untracked_requests, builder: builder }) | ||
end | ||
builder.requests_to_review(count: staging_project.requests_to_review.count) do | ||
render(partial: 'requests', locals: { requests: staging_project.requests_to_review, builder: builder }) | ||
end | ||
builder.obsolete_requests(count: staging_project.staged_requests.obsolete.count) do | ||
render(partial: 'requests', locals: { requests: staging_project.staged_requests.obsolete, builder: builder }) | ||
end | ||
render(partial: 'missing_reviews', locals: { missing_reviews: staging_project.missing_reviews, count: staging_project.missing_reviews.count, builder: builder }) | ||
render(partial: 'building_repositories', locals: { building_repositories: staging_project.building_repositories, count: staging_project.building_repositories.count, builder: builder }) | ||
render(partial: 'broken_packages', locals: { broken_packages: staging_project.broken_packages, count: staging_project.broken_packages.count, builder: builder }) | ||
render(partial: 'checks', locals: { checks: staging_project.checks, builder: builder }) | ||
render(partial: 'missing_checks', locals: { missing_checks: staging_project.missing_checks, builder: builder }) | ||
end |
5 changes: 0 additions & 5 deletions
5
src/api/app/views/staging/staging_projects/_untracked_requests.xml.builder
This file was deleted.
Oops, something went wrong.
20 changes: 1 addition & 19 deletions
20
src/api/app/views/staging/staging_projects/index.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
xml.staging_projects do | ||
@staging_projects.each do |staging_project| | ||
xml.staging_project(name: staging_project.name) do | ||
render(partial: 'staging/staging_projects/staged_requests', locals: { staged_requests: staging_project.staged_requests, | ||
count: staging_project.staged_requests.count, builder: xml }) | ||
|
||
render(partial: 'staging/staging_projects/untracked_requests', locals: { untracked_requests: staging_project.untracked_requests, | ||
count: staging_project.untracked_requests.count, builder: xml }) | ||
|
||
render(partial: 'staging/staging_projects/requests_to_review', locals: { requests_to_review: staging_project.requests_to_review, | ||
count: staging_project.requests_to_review.count, builder: xml }) | ||
|
||
render(partial: 'staging/staging_projects/missing_reviews', locals: { missing_reviews: staging_project.missing_reviews, | ||
count: staging_project.missing_reviews.count, builder: xml }) | ||
|
||
render(partial: 'staging/staging_projects/building_repositories', locals: { building_repositories: staging_project.building_repositories, | ||
count: staging_project.building_repositories.count, builder: xml }) | ||
|
||
render(partial: 'staging/staging_projects/broken_packages', locals: { broken_packages: staging_project.broken_packages, | ||
count: staging_project.broken_packages.count, builder: xml }) | ||
end | ||
render(partial: 'staging_project_item', locals: { staging_project: staging_project, builder: xml }) | ||
end | ||
end |
14 changes: 1 addition & 13 deletions
14
src/api/app/views/staging/staging_projects/show.xml.builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1 @@ | ||
xml.staging_project(name: @staging_project.name) do | ||
render(partial: 'staged_requests', locals: { staged_requests: @staging_project.staged_requests, count: @staging_project.staged_requests.count, builder: xml }) | ||
|
||
render(partial: 'untracked_requests', locals: { untracked_requests: @staging_project.untracked_requests, count: @staging_project.untracked_requests.count, builder: xml }) | ||
|
||
render(partial: 'requests_to_review', locals: { requests_to_review: @staging_project.requests_to_review, count: @staging_project.requests_to_review.count, builder: xml }) | ||
|
||
render(partial: 'missing_reviews', locals: { missing_reviews: @staging_project.missing_reviews, count: @staging_project.missing_reviews.count, builder: xml }) | ||
|
||
render(partial: 'building_repositories', locals: { building_repositories: @staging_project.building_repositories, count: @staging_project.building_repositories.count, builder: xml }) | ||
|
||
render(partial: 'broken_packages', locals: { broken_packages: @staging_project.broken_packages, count: @staging_project.broken_packages.count, builder: xml }) | ||
end | ||
render(partial: 'staging_project_item', locals: { staging_project: @staging_project, builder: xml }) |
Oops, something went wrong.