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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
162ef4b0
Commit
162ef4b0
authored
Aug 17, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Display jobs as scrolling list in sidebar
parent
8dbb1b2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
149 additions
and
128 deletions
+149
-128
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+0
-6
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+49
-19
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+100
-103
No files found.
app/assets/javascripts/build.js
View file @
162ef4b0
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
this
.
populateJobs
(
build_stage
);
this
.
populateJobs
(
build_stage
);
this
.
updateStageDropdownText
(
build_stage
);
this
.
updateStageDropdownText
(
build_stage
);
this
.
updateJobDropdownText
(
build_name
);
this
.
hideSidebar
();
this
.
hideSidebar
();
$
(
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
);
...
@@ -146,11 +145,6 @@
...
@@ -146,11 +145,6 @@
Build
.
prototype
.
updateStageDropdownText
=
function
(
stage
)
{
Build
.
prototype
.
updateStageDropdownText
=
function
(
stage
)
{
$
(
'
.stage-selection
'
).
text
(
stage
);
$
(
'
.stage-selection
'
).
text
(
stage
);
this
.
updateJobDropdownText
(
'
-
'
);
};
Build
.
prototype
.
updateJobDropdownText
=
function
(
name
)
{
$
(
'
.build-selection
'
).
text
(
name
);
};
};
Build
.
prototype
.
updateDropdown
=
function
(
e
)
{
Build
.
prototype
.
updateDropdown
=
function
(
e
)
{
...
...
app/assets/stylesheets/pages/builds.scss
View file @
162ef4b0
...
@@ -53,22 +53,6 @@
...
@@ -53,22 +53,6 @@
left
:
70px
;
left
:
70px
;
}
}
}
}
.build-dropdown
{
display
:
inline-block
;
margin-top
:
16px
;
svg
{
position
:
relative
;
top
:
2px
;
margin-right
:
3px
;
height
:
13px
;
}
.stage-item
{
cursor
:
pointer
;
}
}
}
}
.build-header
{
.build-header
{
...
@@ -116,24 +100,70 @@
...
@@ -116,24 +100,70 @@
}
}
.right-sidebar.build-sidebar
{
.right-sidebar.build-sidebar
{
padding
-top
:
$gl-padding
;
padding
:
$gl-padding
0
;
padding-bottom
:
$gl-padding
;
border-left
:
1px
solid
$border-color
;
&
.right-sidebar-collapsed
{
&
.right-sidebar-collapsed
{
display
:
none
;
display
:
none
;
}
}
.blocks-container
{
padding
:
$gl-padding
;
}
.block
{
.block
{
width
:
100%
;
width
:
100%
;
}
}
.build-sidebar-header
{
.build-sidebar-header
{
padding
-top
:
0
;
padding
:
0
$gl-padding
$gl-padding
;
.gutter-toggle
{
.gutter-toggle
{
margin-top
:
0
;
margin-top
:
0
;
}
}
}
}
.stage-item
{
cursor
:
pointer
;
&
:hover
{
color
:
$gl-text-color
;
}
}
.build-dropdown
{
padding
:
0
$gl-padding
;
}
.builds-container
{
margin
:
$gl-padding
0
;
background-color
:
$white-light
;
border-top
:
1px
solid
$border-color
;
border-bottom
:
1px
solid
$border-color
;
svg
{
position
:
relative
;
top
:
2px
;
margin-right
:
3px
;
height
:
13px
;
}
a
{
display
:
block
;
padding
:
$gl-padding
10px
;
&
:hover
{
background-color
:
$row-hover
;
color
:
$gl-text-color
;
}
}
.build-job
{
&
.active
{
font-weight
:
bold
;
}
}
}
}
}
.build-detail-row
{
.build-detail-row
{
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
162ef4b0
...
@@ -23,122 +23,119 @@
...
@@ -23,122 +23,119 @@
%li
%li
%a
.stage-item
=
stage
%a
.stage-item
=
stage
.dropdown.build-dropdown
.builds-container
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
-
statuses
.
each
do
|
build_status
|
%span
.build-selection
More
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
=
icon
(
'caret-down'
)
.build-job
{
class:
(
'active'
if
build
==
@build
),
data:
{
stage:
build
.
stage
}}
%ul
.dropdown-menu
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
-
statuses
.
each
do
|
build_status
|
=
ci_icon_for_status
(
build
.
status
)
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
%span
%li
.build-job
{
class:
(
'active'
if
build
==
@build
),
data:
{
stage:
build
.
stage
}}
-
if
build
.
name
=
link_to
namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
)
do
=
build
.
name
=
ci_icon_for_status
(
build
.
status
)
-
else
%span
=
build
.
id
-
if
build
.
name
=
build
.
name
-
else
=
build
.
id
-
if
@build
.
retried?
-
if
@build
.
retried?
%li
.active
%li
.active
%a
%a
Build ##{@build.id}
Build ##{@build.id}
·
·
%i
.fa.fa-warning
%i
.fa.fa-warning
This build was retried.
This build was retried.
-
if
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)
.blocks-container
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
)
}
-
if
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)
.title
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
)
}
Build artifacts
.title
-
if
@build
.
artifacts_expired?
Build artifacts
%p
.build-detail-row
-
if
@build
.
artifacts_expired?
The artifacts were removed
%p
.build-detail-row
#{
time_ago_with_tooltip
(
@build
.
artifacts_expire_at
)
}
The artifacts were removed
-
elsif
@build
.
artifacts_expire_at
#{
time_ago_with_tooltip
(
@build
.
artifacts_expire_at
)
}
%p
.build-detail-row
-
elsif
@build
.
artifacts_expire_at
The artifacts will be removed in
%p
.build-detail-row
%span
.js-artifacts-remove
=
@build
.
artifacts_expire_at
The artifacts will be removed in
%span
.js-artifacts-remove
=
@build
.
artifacts_expire_at
-
if
@build
.
artifacts?
-
if
@build
.
artifacts?
.btn-group.btn-group-justified
{
role: :group
}
.btn-group.btn-group-justified
{
role: :group
}
-
if
@build
.
artifacts_expire_at
-
if
@build
.
artifacts_expire_at
=
link_to
keep_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
do
=
link_to
keep_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
do
Keep
Keep
=
link_to
download_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
do
=
link_to
download_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
do
Download
Download
-
if
@build
.
artifacts_metadata?
-
if
@build
.
artifacts_metadata?
=
link_to
browse_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
do
=
link_to
browse_namespace_project_build_artifacts_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
do
Browse
Browse
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
&&
!
(
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)))
}
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
&&
!
(
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)))
}
.title
.title
Build details
Build details
-
if
can?
(
current_user
,
:update_build
,
@build
)
&&
@build
.
retryable?
-
if
can?
(
current_user
,
:update_build
,
@build
)
&&
@build
.
retryable?
=
link_to
"Retry"
,
retry_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'pull-right'
,
method: :post
=
link_to
"Retry"
,
retry_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'pull-right'
,
method: :post
-
if
@build
.
merge_request
-
if
@build
.
merge_request
%p
.build-detail-row
%p
.build-detail-row
%span
.build-light-text
Merge Request:
%span
.build-light-text
Merge Request:
=
link_to
"
#{
@build
.
merge_request
.
to_reference
}
"
,
merge_request_path
(
@build
.
merge_request
)
=
link_to
"
#{
@build
.
merge_request
.
to_reference
}
"
,
merge_request_path
(
@build
.
merge_request
)
-
if
@build
.
duration
-
if
@build
.
duration
%p
.build-detail-row
%p
.build-detail-row
%span
.build-light-text
Duration:
%span
.build-light-text
Duration:
=
time_interval_in_words
(
@build
.
duration
)
=
time_interval_in_words
(
@build
.
duration
)
-
if
@build
.
finished_at
-
if
@build
.
finished_at
%p
.build-detail-row
%p
.build-detail-row
%span
.build-light-text
Finished:
%span
.build-light-text
Finished:
#{
time_ago_with_tooltip
(
@build
.
finished_at
)
}
#{
time_ago_with_tooltip
(
@build
.
finished_at
)
}
-
if
@build
.
erased_at
-
if
@build
.
erased_at
%p
.build-detail-row
%span
.build-light-text
Erased:
#{
time_ago_with_tooltip
(
@build
.
erased_at
)
}
%p
.build-detail-row
%p
.build-detail-row
%span
.build-light-text
Erased:
%span
.build-light-text
Runner:
#{
time_ago_with_tooltip
(
@build
.
erased_at
)
}
-
if
@build
.
runner
&&
current_user
&&
current_user
.
admin
%p
.build-detail-row
=
link_to
"#
#{
@build
.
runner
.
id
}
"
,
admin_runner_path
(
@build
.
runner
.
id
)
%span
.build-light-text
Runner:
-
elsif
@build
.
runner
-
if
@build
.
runner
&&
current_user
&&
current_user
.
admin
\##{@build.runner.id}
=
link_to
"#
#{
@build
.
runner
.
id
}
"
,
admin_runner_path
(
@build
.
runner
.
id
)
.btn-group.btn-group-justified
{
role: :group
}
-
elsif
@build
.
runner
-
if
@build
.
has_trace?
\##{@build.runner.id}
=
link_to
'Raw'
,
raw_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
.btn-group.btn-group-justified
{
role: :group
}
-
if
@build
.
active?
-
if
@build
.
has_trace?
=
link_to
"Cancel"
,
cancel_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
=
link_to
'Raw'
,
raw_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
-
if
can?
(
current_user
,
:update_build
,
@project
)
&&
@build
.
erasable?
-
if
@build
.
active?
=
link_to
erase_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
=
link_to
"Cancel"
,
cancel_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
class:
'btn btn-sm btn-default'
,
method: :post
class:
"btn btn-sm btn-default"
,
method: :post
,
-
if
can?
(
current_user
,
:update_build
,
@project
)
&&
@build
.
erasable?
data:
{
confirm:
"Are you sure you want to erase this build?"
}
do
=
link_to
erase_namespace_project_build_path
(
@project
.
namespace
,
@project
,
@build
),
Erase
class:
"btn btn-sm btn-default"
,
method: :post
,
data:
{
confirm:
"Are you sure you want to erase this build?"
}
do
Erase
-
if
@build
.
trigger_request
-
if
@build
.
trigger_request
.build-widget
.build-widget
%h4
.title
%h4
.title
Trigger
Trigger
%p
%span
.build-light-text
Token:
#{
@build
.
trigger_request
.
trigger
.
short_token
}
-
if
@build
.
trigger_request
.
variables
%p
%p
%span
.build-light-text
Variables:
%span
.build-light-text
Token:
#{
@build
.
trigger_request
.
trigger
.
short_token
}
-
if
@build
.
trigger_request
.
variables
%p
%span
.build-light-text
Variables:
-
@build
.
trigger_request
.
variables
.
each
do
|
key
,
value
|
%code
#{
key
}
=
#{
value
}
.block
-
@build
.
trigger_request
.
variables
.
each
do
|
key
,
value
|
.title
%code
Commit title
#{
key
}
=
#{
value
}
%p
.build-light-text.append-bottom-0
#{
@build
.
pipeline
.
git_commit_title
}
-
if
@build
.
tags
.
any?
.block
.block
.title
.title
Tags
Commit title
-
@build
.
tag_list
.
each
do
|
tag
|
%p
.build-light-text.append-bottom-0
%span
.label.label-primary
#{
@build
.
pipeline
.
git_commit_title
}
=
tag
-
if
@build
.
tags
.
any?
.block
.title
Tags
-
@build
.
tag_list
.
each
do
|
tag
|
%span
.label.label-primary
=
tag
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