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
d3cd603b
Commit
d3cd603b
authored
Aug 01, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide dropdown if all tests fit on one line; add counter to dropdown
parent
283c1dc3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
9 deletions
+27
-9
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+9
-1
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+10
-0
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+8
-8
No files found.
app/assets/javascripts/build.js
View file @
d3cd603b
...
...
@@ -135,12 +135,20 @@
Build
.
prototype
.
displayTestStatuses
=
function
()
{
$jobTopPosition
=
$
(
'
.build-job
'
).
first
().
offset
().
top
;
$dropdownCounter
=
[];
$
(
'
.build-job
'
).
each
(
function
()
{
$
(
'
.build-job
a
'
).
each
(
function
()
{
if
(
$
(
this
).
offset
().
top
>
$jobTopPosition
)
{
$dropdownCounter
.
push
(
$
(
this
));
$
(
'
.overflow-jobs > li
'
).
append
(
$
(
this
));
}
})
$
(
'
.more-tests
'
).
text
(
'
More (
'
+
$dropdownCounter
.
length
+
'
)
'
);
if
(
$
(
'
.overflow-jobs > li > a
'
).
length
==
0
)
{
$
(
'
.overflow-jobs-dropdown
'
).
hide
();
}
};
return
Build
;
...
...
app/assets/stylesheets/pages/builds.scss
View file @
d3cd603b
...
...
@@ -61,6 +61,16 @@
margin-right
:
3px
;
}
}
.overflow-jobs-dropdown
{
float
:
right
;
padding
:
7px
0
7px
5px
;
.dropdown-menu-toggle
{
width
:
auto
;
border
:
none
;
}
}
}
.build-header
{
...
...
app/views/projects/builds/show.html.haml
View file @
d3cd603b
...
...
@@ -7,24 +7,24 @@
-
builds
=
@build
.
pipeline
.
builds
.
latest
.
to_a
-
if
builds
.
size
>
1
.dropdown.overflow-jobs-dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.more-tests
More
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right.overflow-jobs
%li
%ul
.nav-links.no-top.no-bottom
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"skipped"
,
"success"
]
-
statuses
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
%li
{
class:
(
'active'
if
build
==
@build
)
}
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
,
class:
'build-job'
do
%li
.build-job
{
class:
(
'active'
if
build
==
@build
)
}
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
=
ci_icon_for_status
(
build
.
status
)
%span
-
if
build
.
name
=
build
.
name
-
else
=
build
.
id
.dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
Test Name
=
icon
(
'chevron-down'
)
%ul
.dropdown-menu.overflow-jobs
%li
-
if
@build
.
retried?
%li
.active
...
...
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