Skip to content

Commit

Permalink
Only display build results from today on pulse
Browse files Browse the repository at this point in the history
Too much to display otherwise. Better we get a backend call
for a unified _jobhistory to display this.
  • Loading branch information
hennevogel committed Dec 7, 2018
1 parent 7088107 commit 43f24cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/app/controllers/webui/projects/pulse_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def update_pulse
end

pulse = @project.project_log_entries.where(datetime: range).order(datetime: :asc)
@builds = pulse.where(event_type: [:build_fail, :build_success])
@builds = pulse.where(event_type: [:build_fail, :build_success]).where(datetime: 24.hours.ago..Time.zone.now)
@new_packages = pulse.where(event_type: :create_package)
@deleted_packages = pulse.where(event_type: :delete_package)
@branches = pulse.where(event_type: :branch_command)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@

%h5#pulse-builds
Builds
%small
(in the last 24 hours)
%hr
%ul.list-unstyled
- builds.each do |log_entry|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
been
= link_to('#pulse-builds') do
= builds.values.sum
builds
builds in the last 24 hours
of which
%b.text-danger
= builds['build_fail']
Expand Down

0 comments on commit 43f24cd

Please sign in to comment.