Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse spinner on pulse page instead of always overwriting it
The spinner is now always in the same position. It was previously centered during the initial page load, then on the left whenever changing the selected period in the dropdown. This was caused by the HTML and CSS classes which differed.
- Loading branch information
Showing
2 changed files
with
15 additions
and
13 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
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 } %>"); |