Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Kobierska <kkobierska@gmail.com>2016-07-05 11:10:34 +0300
committerKatarzyna Kobierska <kkobierska@gmail.com>2016-07-18 11:23:32 +0300
commit5813aec22dac9a896e75a23781934d555aef4269 (patch)
treeae5f48c6ac136facc71fa7c16911e57902776ab6
parent31a5a03c6ca9e520694755652e57741765c1e9b0 (diff)
Add Pending Tab to Admin Builds
Add Pending Tab to Project Builds Update CHANGELOG
-rw-r--r--CHANGELOG5
-rw-r--r--app/controllers/admin/builds_controller.rb4
-rw-r--r--app/controllers/projects/builds_controller.rb4
-rw-r--r--app/views/admin/builds/index.html.haml7
-rw-r--r--app/views/projects/builds/index.html.haml7
5 files changed, 23 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 90f006d445d..6cfb51b5d62 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -133,6 +133,11 @@ v 8.9.5
- Fixed 'use shortcuts' button on docs. !4979
- Admin should be able to turn shared runners into specific ones. !4961
- Update RedCloth to 4.3.2 for CVE-2012-6684. !4929 (Takuya Noguchi)
+ - Add Pending tab for Builds
+
+v 8.9.4 (unreleased)
+ - Ensure references to private repos aren't shown to logged-out users
+v 8.9.5 (unreleased)
- Improve the request / withdraw access button. !4860
v 8.9.4
diff --git a/app/controllers/admin/builds_controller.rb b/app/controllers/admin/builds_controller.rb
index 0db91eaaf2e..88f3c0e2fd4 100644
--- a/app/controllers/admin/builds_controller.rb
+++ b/app/controllers/admin/builds_controller.rb
@@ -5,8 +5,10 @@ class Admin::BuildsController < Admin::ApplicationController
@builds = @all_builds.order('created_at DESC')
@builds =
case @scope
+ when 'pending'
+ @builds.pending.reverse_order
when 'running'
- @builds.running_or_pending.reverse_order
+ @builds.running.reverse_order
when 'finished'
@builds.finished
else
diff --git a/app/controllers/projects/builds_controller.rb b/app/controllers/projects/builds_controller.rb
index ef3051d7519..d7513d75f01 100644
--- a/app/controllers/projects/builds_controller.rb
+++ b/app/controllers/projects/builds_controller.rb
@@ -10,8 +10,10 @@ class Projects::BuildsController < Projects::ApplicationController
@builds = @all_builds.order('created_at DESC')
@builds =
case @scope
+ when 'pending'
+ @builds.pending.reverse_order
when 'running'
- @builds.running_or_pending.reverse_order
+ @builds.running.reverse_order
when 'finished'
@builds.finished
else
diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml
index 9ea3cca0ecb..0fcff566a70 100644
--- a/app/views/admin/builds/index.html.haml
+++ b/app/views/admin/builds/index.html.haml
@@ -10,10 +10,15 @@
All
%span.badge.js-totalbuilds-count= @all_builds.count(:id)
+ %li{class: ('active' if @scope == 'pending')}
+ = link_to admin_builds_path(scope: :pending) do
+ Pending
+ %span.badge.js-running-count= number_with_delimiter(@all_builds.pending.count(:id))
+
%li{class: ('active' if @scope == 'running')}
= link_to admin_builds_path(scope: :running) do
Running
- %span.badge.js-running-count= number_with_delimiter(@all_builds.running_or_pending.count(:id))
+ %span.badge.js-running-count= number_with_delimiter(@all_builds.running.count(:id))
%li{class: ('active' if @scope == 'finished')}
= link_to admin_builds_path(scope: :finished) do
diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml
index 85c31dfd918..41f0462e4be 100644
--- a/app/views/projects/builds/index.html.haml
+++ b/app/views/projects/builds/index.html.haml
@@ -11,12 +11,17 @@
%span.badge.js-totalbuilds-count
= number_with_delimiter(@all_builds.count(:id))
+ %li{class: ('active' if @scope == 'pending')}
+ = link_to project_builds_path(@project, scope: :pending) do
+ Pending
+ %span.badge.js-running-count
+ = number_with_delimiter(@all_builds.pending.count(:id))
%li{class: ('active' if @scope == 'running')}
= link_to project_builds_path(@project, scope: :running) do
Running
%span.badge.js-running-count
- = number_with_delimiter(@all_builds.running_or_pending.count(:id))
+ = number_with_delimiter(@all_builds.running.count(:id))
%li{class: ('active' if @scope == 'finished')}
= link_to project_builds_path(@project, scope: :finished) do