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
Tatuya Kamada
gitlab-ce
Commits
5bfca3b1
Commit
5bfca3b1
authored
Aug 03, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add data attributes to builds
parent
4d32a8b7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
39 deletions
+29
-39
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+6
-16
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+1
-8
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+22
-15
No files found.
app/assets/javascripts/build.js
View file @
5bfca3b1
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
clearInterval
(
Build
.
interval
);
clearInterval
(
Build
.
interval
);
this
.
bp
=
Breakpoints
.
get
();
this
.
bp
=
Breakpoints
.
get
();
this
.
hideSidebar
();
this
.
hideSidebar
();
this
.
displayTestStatuses
();
$
(
'
.js-build-sidebar
'
).
niceScroll
();
$
(
'
.js-build-sidebar
'
).
niceScroll
();
$
(
document
).
off
(
'
click
'
,
'
.js-sidebar-build-toggle
'
).
on
(
'
click
'
,
'
.js-sidebar-build-toggle
'
,
this
.
toggleSidebar
);
$
(
document
).
off
(
'
click
'
,
'
.js-sidebar-build-toggle
'
).
on
(
'
click
'
,
'
.js-sidebar-build-toggle
'
,
this
.
toggleSidebar
);
$
(
window
).
off
(
'
resize.build
'
).
on
(
'
resize.build
'
,
this
.
hideSidebar
);
$
(
window
).
off
(
'
resize.build
'
).
on
(
'
resize.build
'
,
this
.
hideSidebar
);
this
.
updateArtifactRemoveDate
();
this
.
updateArtifactRemoveDate
();
this
.
displayTestStatuses
();
if
(
$
(
'
#build-trace
'
).
length
)
{
if
(
$
(
'
#build-trace
'
).
length
)
{
this
.
getInitialBuildTrace
();
this
.
getInitialBuildTrace
();
this
.
initScrollButtonAffix
();
this
.
initScrollButtonAffix
();
...
@@ -134,21 +134,11 @@
...
@@ -134,21 +134,11 @@
};
};
Build
.
prototype
.
displayTestStatuses
=
function
()
{
Build
.
prototype
.
displayTestStatuses
=
function
()
{
$jobTopPosition
=
$
(
'
.build-job
'
).
first
().
offset
().
top
;
$jobs
=
$
(
'
.build-job
'
);
$dropdownCounter
=
[];
jobjects
=
$jobs
.
map
(
function
()
{
return
$
(
this
).
data
();
$
(
'
.build-job a
'
).
each
(
function
()
{
});
if
(
$
(
this
).
offset
().
top
>
$jobTopPosition
)
{
console
.
log
(
jobjects
);
$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
;
return
Build
;
...
...
app/assets/stylesheets/pages/builds.scss
View file @
5bfca3b1
...
@@ -74,14 +74,7 @@
...
@@ -74,14 +74,7 @@
}
}
}
}
.overflow-jobs-dropdown
{
.jobs-dropdown
{
float
:
right
;
padding
:
7px
0
7px
5px
;
.dropdown-menu-toggle
{
width
:
auto
;
border
:
none
;
}
svg
{
svg
{
position
:
relative
;
position
:
relative
;
...
...
app/views/projects/builds/show.html.haml
View file @
5bfca3b1
...
@@ -7,24 +7,31 @@
...
@@ -7,24 +7,31 @@
-
builds
=
@build
.
pipeline
.
builds
.
latest
.
to_a
-
builds
=
@build
.
pipeline
.
builds
.
latest
.
to_a
-
if
builds
.
size
>
1
-
if
builds
.
size
>
1
.dropdown.
overflow-jobs-dropdown
.dropdown.
stage
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.more-tests
More
%span
.more-tests
More
=
icon
(
'caret-down'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right.overflow-jobs
%ul
.dropdown-menu.overflow-jobs
%li
-
builds
.
each
do
|
build
|
%ul
.nav-links.no-top.no-bottom
%li
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"skipped"
,
"success"
]
%a
=
build
.
stage
-
statuses
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"skipped"
,
"success"
]
%li
.build-job
{
class:
(
'active'
if
build
==
@build
)
}
.dropdown.jobs-dropdown
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
=
ci_icon_for_status
(
build
.
status
)
%span
.more-tests
More
%span
=
icon
(
'caret-down'
)
-
if
build
.
name
%ul
.dropdown-menu.overflow-jobs
=
build
.
name
-
statuses
.
each
do
|
build_status
|
-
else
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
=
build
.
id
%li
.build-job
{
class:
(
'active'
if
build
==
@build
),
data:
{
id:
build
.
id
,
name:
build
.
name
,
status:
build
.
status
}}
=
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
-
if
@build
.
retried?
-
if
@build
.
retried?
%li
.active
%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