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
Léo-Paul Géneau
gitlab-ce
Commits
8d5dc4fa
Commit
8d5dc4fa
authored
Aug 16, 2016
by
Annabel Dunstone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toggle button to hide graph; set max-height
parent
0ff0acc8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
28 deletions
+71
-28
app/assets/javascripts/pipeline.js.es6
app/assets/javascripts/pipeline.js.es6
+10
-0
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+36
-7
app/views/projects/commit/_pipeline.html.haml
app/views/projects/commit/_pipeline.html.haml
+25
-21
No files found.
app/assets/javascripts/pipeline.js.es6
0 → 100644
View file @
8d5dc4fa
function toggleGraph() {
$('.pipeline-graph, .toggle-pipeline-btn').toggleClass('graph-collapsed');
const $btnText = $('.toggle-pipeline-btn .btn-text');
const graphCollapsed = $('.pipeline-graph').hasClass('graph-collapsed');
graphCollapsed ? $btnText.text('Expand') : $btnText.text('Hide')
}
$(document).on('click', '.toggle-pipeline-btn', toggleGraph);
app/assets/stylesheets/pages/pipelines.scss
View file @
8d5dc4fa
...
...
@@ -232,10 +232,35 @@
// Pipeline visualization
.toggle-pipeline-btn
{
background-color
:
$gray-dark
;
.caret
{
border-top
:
none
;
border-bottom
:
4px
solid
;
}
&
.graph-collapsed
{
background-color
:
$white-light
;
.caret
{
border-bottom
:
none
;
border-top
:
4px
solid
;
}
}
}
.pipeline-graph
{
width
:
100%
;
overflow
:
auto
;
white-space
:
nowrap
;
max-height
:
500px
;
transition
:
max-height
0
.3s
,
padding
0
.3s
;
&
.graph-collapsed
{
max-height
:
0
;
padding
:
0
16px
;
}
}
.pipeline-visualization
{
...
...
@@ -315,7 +340,6 @@
right
:
-20px
;
border-right
:
2px
solid
$border-color
;
border-radius
:
0
0
50px
;
-webkit-border-radius
:
0
0
50px
;
}
// Left connecting curves
...
...
@@ -323,7 +347,6 @@
left
:
-20px
;
border-left
:
2px
solid
$border-color
;
border-radius
:
0
0
0
50px
;
-webkit-border-radius
:
0
0
0
50px
;
}
}
...
...
@@ -333,11 +356,6 @@
height
:
45px
;
top
:
-26px
;
}
&
:
:
after
{
// border-left: 2px solid $border-color;
border-top-right-radius
:
-50px
;
-webkit-border-top-right-radius
:
-50px
;
}
}
}
...
...
@@ -369,3 +387,14 @@
}
}
}
.pipeline-actions
{
border-bottom
:
none
;
}
.toggle-pipeline-btn
{
.fa
{
color
:
$dropdown-header-color
;
}
}
app/views/projects/commit/_pipeline.html.haml
View file @
8d5dc4fa
.row-content-block.build-content.middle-block.pipeline-graph
.pipeline-visualization
%ul
.stage-column-list
-
pipeline
.
statuses
.
stages
.
each
do
|
stage
|
-
statuses
=
pipeline
.
statuses
.
where
(
stage:
stage
)
-
status
=
statuses
.
latest
.
status
%li
.stage-column
.stage-name
%a
{
name:
stage
}
-
if
stage
=
stage
.
titleize
.builds-container
%ul
-
statuses
.
each
do
|
build
|
%li
.build
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
=
ci_icon_for_status
(
status
)
=
build
.
name
.row-content-block.build-content.middle-block.pipeline-graph
.row-content-block.build-content.middle-block.pipeline-actions
.pull-right
.btn.btn-grouped.btn-white.toggle-pipeline-btn
%span
.btn-text
Hide
%span
pipeline graph
%span
.caret
-
if
can?
(
current_user
,
:update_pipeline
,
pipeline
.
project
)
-
if
pipeline
.
builds
.
latest
.
failed
.
any?
(
&
:retryable?
)
=
link_to
"Retry failed"
,
retry_namespace_project_pipeline_path
(
pipeline
.
project
.
namespace
,
pipeline
.
project
,
pipeline
.
id
),
class:
'btn btn-grouped btn-primary'
,
method: :post
...
...
@@ -43,6 +27,26 @@
in
=
time_interval_in_words
pipeline
.
duration
.row-content-block.build-content.middle-block.pipeline-graph
.pipeline-visualization
%ul
.stage-column-list
-
pipeline
.
statuses
.
stages
.
each
do
|
stage
|
-
statuses
=
pipeline
.
statuses
.
where
(
stage:
stage
)
-
status
=
statuses
.
latest
.
status
%li
.stage-column
.stage-name
%a
{
name:
stage
}
-
if
stage
=
stage
.
titleize
.builds-container
%ul
-
statuses
.
each
do
|
build
|
%li
.build
.build-content
%span
{
class:
"ci-status-link ci-status-icon-#{status}"
}
=
ci_icon_for_status
(
status
)
=
build
.
name
-
if
pipeline
.
yaml_errors
.
present?
.bs-callout.bs-callout-danger
%h4
Found errors in your .gitlab-ci.yml:
...
...
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