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 #6669 from dmarcoux/improve-pulse-bootstrap
Improvements for the pulse page
- Loading branch information
Showing
9 changed files
with
138 additions
and
97 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
3 changes: 2 additions & 1 deletion
3
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_changes.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,5 +1,6 @@ | ||
- if project_changes.any? | ||
And the project setup has been changed | ||
#{pluralize(project_changes.count, 'time')}. | ||
%b | ||
#{pluralize(project_changes.count, 'time')}. | ||
- else | ||
And no one touched the project setup. |
3 changes: 2 additions & 1 deletion
3
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_comments.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
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
31 changes: 31 additions & 0 deletions
31
src/api/app/views/webui2/webui/projects/pulse/_pulse_list_requests_box.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,31 @@ | ||
.card | ||
.card-header | ||
Requests | ||
.card-body | ||
- if requests.any? | ||
.row | ||
.col | ||
.progress | ||
-# haml-lint:disable InlineStyles | ||
- requests_by_percentage.each do |state, percentage| | ||
%div{ title: "#{requests_by_state[state]} #{state} requests", | ||
class: "progress-bar progress-state-#{state}", | ||
'aria-valuemax': '100', 'aria-valuemin': '0', 'aria-valuenow': percentage, | ||
role: 'progressbar', style: "width: #{percentage}%" } | ||
-# haml-lint:enable InlineStyles | ||
%p | ||
= link_to('#pulse-requests') do | ||
= requests_by_state.values.sum | ||
active requests | ||
.row | ||
- requests_by_state.each_key do |state| | ||
.col.border.text-center | ||
%p.fa-3x | ||
%i{ class: "fa #{request_bootstrap_icon(state)} request-state-#{state}" } | ||
%p | ||
= pluralize(requests_by_state[state], 'request') | ||
%br | ||
in #{state} | ||
- else | ||
= link_to(project_requests_path(project)) do | ||
There have been no requests send to this project. |
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: 12 additions & 11 deletions
23
src/api/app/views/webui2/webui/projects/pulse/show.js.erb
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,14 +1,15 @@ | ||
$('#range-header').html("<%= escape_javascript(pulse_period(@range)) %>"); | ||
$('#range-text').html("<%= @range.titleize %>"); | ||
$('#pulse, .col.spinner').toggleClass('d-none'); | ||
$('#pulse').html("<%= escape_javascript render partial: 'pulse_list', locals: { requests_by_percentage: @requests_by_percentage, | ||
requests_by_state: @requests_by_state, | ||
project: @project, | ||
commits: @commits, | ||
new_packages: @new_packages, | ||
deleted_packages: @deleted_packages, | ||
updates: @updates, | ||
project_changes: @project_changes, | ||
builds: @builds, | ||
branches: @branches, | ||
comments: @comments, | ||
requests: @requests } %>"); | ||
requests_by_state: @requests_by_state, | ||
project: @project, | ||
commits: @commits, | ||
new_packages: @new_packages, | ||
deleted_packages: @deleted_packages, | ||
updates: @updates, | ||
project_changes: @project_changes, | ||
builds: @builds, | ||
branches: @branches, | ||
comments: @comments, | ||
requests: @requests } %>"); |