Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
0d09b5fe
Commit
0d09b5fe
authored
Oct 15, 2015
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix builds view count indicator
parent
62bf2eb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
app/controllers/projects/builds_controller.rb
app/controllers/projects/builds_controller.rb
+2
-2
app/views/projects/builds/index.html.haml
app/views/projects/builds/index.html.haml
+3
-3
No files found.
app/controllers/projects/builds_controller.rb
View file @
0d09b5fe
...
@@ -8,8 +8,7 @@ class Projects::BuildsController < Projects::ApplicationController
...
@@ -8,8 +8,7 @@ class Projects::BuildsController < Projects::ApplicationController
def
index
def
index
@scope
=
params
[
:scope
]
@scope
=
params
[
:scope
]
@all_builds
=
project
.
ci_builds
.
order
(
'created_at DESC'
).
page
(
params
[
:page
]).
per
(
30
)
@all_builds
=
project
.
ci_builds
@builds
=
@builds
=
case
@scope
case
@scope
when
'all'
when
'all'
...
@@ -19,6 +18,7 @@ class Projects::BuildsController < Projects::ApplicationController
...
@@ -19,6 +18,7 @@ class Projects::BuildsController < Projects::ApplicationController
else
else
@all_builds
.
running_or_pending
@all_builds
.
running_or_pending
end
end
@builds
=
@builds
.
order
(
'created_at DESC'
).
page
(
params
[
:page
]).
per
(
30
)
end
end
def
cancel_all
def
cancel_all
...
...
app/views/projects/builds/index.html.haml
View file @
0d09b5fe
...
@@ -12,17 +12,17 @@
...
@@ -12,17 +12,17 @@
%li
{
class:
(
'active'
if
@scope
.
nil?
)}
%li
{
class:
(
'active'
if
@scope
.
nil?
)}
=
link_to
project_builds_path
(
@project
)
do
=
link_to
project_builds_path
(
@project
)
do
Running
Running
%span
.badge.js-running-count
=
@all_builds
.
running_or_pending
.
size
%span
.badge.js-running-count
=
@all_builds
.
running_or_pending
.
count
(
:id
)
%li
{
class:
(
'active'
if
@scope
==
'finished'
)}
%li
{
class:
(
'active'
if
@scope
==
'finished'
)}
=
link_to
project_builds_path
(
@project
,
scope: :finished
)
do
=
link_to
project_builds_path
(
@project
,
scope: :finished
)
do
Finished
Finished
%span
.badge.js-running-count
=
@all_builds
.
finished
.
size
%span
.badge.js-running-count
=
@all_builds
.
finished
.
count
(
:id
)
%li
{
class:
(
'active'
if
@scope
==
'all'
)}
%li
{
class:
(
'active'
if
@scope
==
'all'
)}
=
link_to
project_builds_path
(
@project
,
scope: :all
)
do
=
link_to
project_builds_path
(
@project
,
scope: :all
)
do
All
All
%span
.badge.js-totalbuilds-count
=
@all_builds
.
size
%span
.badge.js-totalbuilds-count
=
@all_builds
.
count
(
:id
)
.gray-content-block
.gray-content-block
List of
#{
@scope
||
'running'
}
builds from this project
List of
#{
@scope
||
'running'
}
builds from this project
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment