-
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 #6288 from saraycp/show_staging_project
Add staging project show page
- Loading branch information
Showing
18 changed files
with
200 additions
and
78 deletions.
There are no files selected for viewing
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
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
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
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
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,9 @@ | ||
module Webui::Staging::ProjectHelper | ||
def icon_for_checks(checks, missing_checks) | ||
return 'fa-eye text-info' if missing_checks.present? | ||
return 'fa-check-circle text-primary' if checks.blank? | ||
return 'fa-eye text-info' if checks.any?(&:pending?) | ||
return 'fa-check-circle text-primary' if checks.all?(&:success?) | ||
'fa-exclamation-circle text-danger' | ||
end | ||
end |
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
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
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
4 changes: 4 additions & 0 deletions
4
src/api/app/views/webui2/webui/staging/projects/_breadcrumb_items.html.haml
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,4 @@ | ||
= render partial: 'webui/staging/workflows/breadcrumb_items' | ||
- if controller_name == 'projects' && action_name == 'show' | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
= @staging_project.name |
16 changes: 16 additions & 0 deletions
16
src/api/app/views/webui2/webui/staging/projects/_checks.html.haml
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,16 @@ | ||
%td.p-2.w-25.font-weight-bold | ||
%i.mr-2.fas{ class: icon_for_checks(checks, missing_checks) } | ||
Checks | ||
%td.p-2 | ||
- if checks.blank? && missing_checks.blank? | ||
None | ||
- else | ||
%ul | ||
- missing_checks.each do |name| | ||
%li | ||
%span.check-pending | ||
#{name} (Expected - Waiting for status to be reported) | ||
- checks.each do |check| | ||
%li | ||
= link_to "#{check.name} (#{check.state} - #{time_ago_in_words(check.updated_at)} ago)", check.url, | ||
class: "check-#{check.state}", title: "#{check.short_description} (#{check.updated_at})" |
21 changes: 21 additions & 0 deletions
21
src/api/app/views/webui2/webui/staging/projects/_status_items.html.haml
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,21 @@ | ||
%td.p-2.w-25.font-weight-bold | ||
%i.mr-2.fas{ class: items.empty? ? 'fa-check-circle text-primary' : 'fa-exclamation-triangle text-warning' } | ||
= type.humanize | ||
%td.p-2 | ||
- if items.empty? | ||
None | ||
- else | ||
- items.each_with_index do |item, index| | ||
= succeed "#{',' if index < items.size - 1}" do | ||
:ruby | ||
case type | ||
when 'untracked_requests', 'obsolete_requests' | ||
link_to("##{item.number} (#{item.state})", request_show_path(item.number)) | ||
when 'missing_reviews' | ||
link_to("#{item[:package]} by #{item[:by]}", request_show_path(item[:request])) | ||
when 'building_repositories' | ||
link_to("#{item['repository']}-#{item['arch']} (#{item['state']})", | ||
project_repository_state_path(project: @staging_project.name, repository: item['repository'])) | ||
when 'broken_packages' | ||
link_to("#{item[:package]} (#{item[:state]})", package_show_path(project: item[:project], package: item[:package])) | ||
end |
37 changes: 37 additions & 0 deletions
37
src/api/app/views/webui2/webui/staging/projects/show.html.haml
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,37 @@ | ||
- @pagetitle = @staging_project.name | ||
|
||
.row | ||
.col-xl-10 | ||
.card.mb-3 | ||
= render(partial: 'webui2/webui/project/tabs', locals: { project: @staging_project }) | ||
.card-body | ||
%h3= @pagetitle | ||
%h4.mt-4 Packages | ||
.requests#staging-project-package-list | ||
= render partial: 'webui/staging/shared/packages_list', locals: { staging_project: @staging_project } | ||
.card.mb-3 | ||
%h5.card-header Status | ||
.card-body | ||
%table.table.table-striped.table-borderless.table-sm.dt-responsive.w-100 | ||
%tbody | ||
%tr | ||
= render partial: 'status_items', | ||
locals: { staging_project: @staging_project, items: @staging_project.untracked_requests, type: 'untracked_requests' } | ||
%tr | ||
= render partial: 'status_items', | ||
locals: { staging_project: @staging_project, items: @staging_project.staged_requests.obsolete, type: 'obsolete_requests' } | ||
%tr | ||
= render partial: 'status_items', | ||
locals: { staging_project: @staging_project, items: @staging_project.missing_reviews, type: 'missing_reviews' } | ||
%tr | ||
= render partial: 'status_items', | ||
locals: { staging_project: @staging_project, items: @staging_project.building_repositories, type: 'building_repositories' } | ||
%tr | ||
= render partial: 'status_items', | ||
locals: { staging_project: @staging_project, items: @staging_project.broken_packages, type: 'broken_packages' } | ||
%tr | ||
= render partial: 'checks', | ||
locals: { checks: @staging_project.current_checks, | ||
missing_checks: @staging_project.current_missing_checks } | ||
.col-xl-2 | ||
= render partial: 'webui/staging/shared/legend' |
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
src/api/app/views/webui2/webui/staging/workflows/_overall_state.html.haml
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
Oops, something went wrong.