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
Boxiang Sun
gitlab-ce
Commits
8dbb1b2f
Commit
8dbb1b2f
authored
Aug 17, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move stages and jobs to build sidebar
parent
f80aa902
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
38 deletions
+39
-38
app/assets/javascripts/build.js
app/assets/javascripts/build.js
+3
-3
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+36
-0
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+0
-35
No files found.
app/assets/javascripts/build.js
View file @
8dbb1b2f
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
this
.
bp
=
Breakpoints
.
get
();
this
.
bp
=
Breakpoints
.
get
();
$
(
'
.js-build-sidebar
'
).
niceScroll
();
$
(
'
.js-build-sidebar
'
).
niceScroll
();
this
.
populateJob
Dropdown
(
build_stage
);
this
.
populateJob
s
(
build_stage
);
this
.
updateStageDropdownText
(
build_stage
);
this
.
updateStageDropdownText
(
build_stage
);
this
.
updateJobDropdownText
(
build_name
);
this
.
updateJobDropdownText
(
build_name
);
this
.
hideSidebar
();
this
.
hideSidebar
();
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
}
}
};
};
Build
.
prototype
.
populateJob
Dropdown
=
function
(
stage
)
{
Build
.
prototype
.
populateJob
s
=
function
(
stage
)
{
$
(
'
.build-job
'
).
hide
();
$
(
'
.build-job
'
).
hide
();
$
(
'
.build-job[data-stage="
'
+
stage
+
'
"]
'
).
show
();
$
(
'
.build-job[data-stage="
'
+
stage
+
'
"]
'
).
show
();
};
};
...
@@ -157,7 +157,7 @@
...
@@ -157,7 +157,7 @@
e
.
preventDefault
();
e
.
preventDefault
();
var
stage
=
e
.
target
.
text
;
var
stage
=
e
.
target
.
text
;
this
.
updateStageDropdownText
(
stage
);
this
.
updateStageDropdownText
(
stage
);
this
.
populateJob
Dropdown
(
stage
);
this
.
populateJob
s
(
stage
);
};
};
return
Build
;
return
Build
;
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
8dbb1b2f
...
@@ -11,6 +11,42 @@
...
@@ -11,6 +11,42 @@
%p
.build-detail-row
%p
.build-detail-row
#{
@build
.
coverage
}
%
#{
@build
.
coverage
}
%
-
builds
=
@build
.
pipeline
.
builds
.
latest
.
to_a
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"success"
,
"skipped"
]
-
if
builds
.
size
>
1
.dropdown.build-dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.stage-selection
More
=
icon
(
'caret-down'
)
%ul
.dropdown-menu
-
builds
.
map
(
&
:stage
).
uniq
.
each
do
|
stage
|
%li
%a
.stage-item
=
stage
.dropdown.build-dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.build-selection
More
=
icon
(
'caret-down'
)
%ul
.dropdown-menu
-
statuses
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
%li
.build-job
{
class:
(
'active'
if
build
==
@build
),
data:
{
stage:
build
.
stage
}}
=
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?
%li
.active
%a
Build ##{@build.id}
·
%i
.fa.fa-warning
This build was retried.
-
if
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)
-
if
can?
(
current_user
,
:read_build
,
@project
)
&&
(
@build
.
artifacts?
||
@build
.
artifacts_expired?
)
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
)
}
.block
{
class:
(
"block-first"
if
!
@build
.
coverage
)
}
.title
.title
...
...
app/views/projects/builds/show.html.haml
View file @
8dbb1b2f
...
@@ -5,41 +5,6 @@
...
@@ -5,41 +5,6 @@
.build-page
.build-page
=
render
"header"
=
render
"header"
-
builds
=
@build
.
pipeline
.
builds
.
latest
.
to_a
-
statuses
=
[
"failed"
,
"pending"
,
"running"
,
"canceled"
,
"success"
,
"skipped"
]
-
if
builds
.
size
>
1
.dropdown.build-dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.stage-selection
More
=
icon
(
'caret-down'
)
%ul
.dropdown-menu
-
builds
.
map
(
&
:stage
).
uniq
.
each
do
|
stage
|
%li
%a
.stage-item
=
stage
.dropdown.build-dropdown
%button
.dropdown-menu-toggle
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%span
.build-selection
More
=
icon
(
'caret-down'
)
%ul
.dropdown-menu
-
statuses
.
each
do
|
build_status
|
-
builds
.
select
{
|
build
|
build
.
status
==
build_status
}.
each
do
|
build
|
%li
.build-job
{
class:
(
'active'
if
build
==
@build
),
data:
{
stage:
build
.
stage
}}
=
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?
%li
.active
%a
Build ##{@build.id}
·
%i
.fa.fa-warning
This build was retried.
-
if
@build
.
stuck?
-
if
@build
.
stuck?
-
unless
@build
.
any_runners_online?
-
unless
@build
.
any_runners_online?
.bs-callout.bs-callout-warning
.bs-callout.bs-callout-warning
...
...
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