-
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 #6276 from krauselukas/feature/staging/problems_co…
…lumn List build problems in staging project page
- Loading branch information
Showing
4 changed files
with
64 additions
and
1 deletion.
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
23 changes: 22 additions & 1 deletion
23
src/api/app/views/webui2/webui/staging/workflows/_problems.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 |
---|---|---|
@@ -1 +1,22 @@ | ||
Placeholder for the content | ||
:ruby | ||
max_problems = 5 | ||
project_class = project.name.tr(':', '_') | ||
item_project_class = 'hidden-item-' + project_class | ||
|
||
- if project.problems.empty? | ||
.text-center | ||
%i.fas.fa-check-circle.fa-2x.text-success | ||
- else | ||
%ul.list-group.list-group-flush | ||
= render partial: 'problems_item', locals: { project: project, index: 1..(max_problems - 1) } | ||
|
||
%span.collapse{ 'id': item_project_class } | ||
= render partial: 'problems_item', locals: { project: project, index: max_problems..-1 } | ||
|
||
- length = project.problems.length | ||
- if project.problems.length > max_problems | ||
- number = length - max_problems | ||
%li.list-group-item.table-list-group-item | ||
%a.collapse-link{ 'data-toggle': 'collapse', href: "##{item_project_class}", 'aria-expanded': 'false' } | ||
%span.more See #{number} more | ||
%span.less See #{number} less |
16 changes: 16 additions & 0 deletions
16
src/api/app/views/webui2/webui/staging/workflows/_problems_item.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 @@ | ||
- project.problems[index].each do |name, states| | ||
%li.list-group-item.table-list-group-item | ||
= link_to("#{name}:", package_show_path(package: name, project: project)) | ||
- states.each do |state, values| | ||
= state | ||
= surround '(', ')' do | ||
- values.each do |value| | ||
- coma = ', ' unless values.last == value | ||
= succeed coma do | ||
- if state == 'unresolvable' | ||
= value[:arch] | ||
- else | ||
= link_to(value[:arch], package_live_build_log_path(package: name, | ||
repository: value[:repository], | ||
project: project, | ||
arch: value[:arch])) |