diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-23 11:40:57 +0200 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-10-23 11:45:45 +0200 |
commit | 127836dd541ce0ecd4976d002d97b3e9e57f4947 (patch) | |
tree | 2b45f554466aca0419ed3bf069abb7bb62c8e4b7 /app/controllers | |
parent | 0e73d7b6af77e2191da2c8fea7232bc8d4a4bbe4 (diff) | |
download | gitlab-ce-127836dd541ce0ecd4976d002d97b3e9e57f4947.tar.gz |
Fix small CI UI regressions
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/projects/builds_controller.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb index 816012762ce..ad0adc17866 100644 --- a/app/controllers/projects/builds_controller.rb +++ b/app/controllers/projects/builds_controller.rb @@ -9,16 +9,17 @@ class Projects::BuildsController < Projects::ApplicationController def index @scope = params[:scope] @all_builds = project.ci_builds + @builds = @all_builds.order('created_at DESC') @builds = case @scope when 'all' - @all_builds + @builds when 'finished' - @all_builds.finished + @builds.finished else - @all_builds.running_or_pending + @builds.running_or_pending.reverse_order end - @builds = @builds.order('created_at DESC').page(params[:page]).per(30) + @builds = @builds.page(params[:page]).per(30) end def cancel_all |