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
2ac0c09a
Commit
2ac0c09a
authored
Jan 14, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
02ef3445
1a5de895
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
42 deletions
+53
-42
app/assets/javascripts/pipelines/components/graph/graph_component.vue
...avascripts/pipelines/components/graph/graph_component.vue
+3
-42
app/assets/javascripts/pipelines/mixins/graph_component_mixin.js
...ets/javascripts/pipelines/mixins/graph_component_mixin.js
+44
-0
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+1
-0
changelogs/unreleased/8688-recursive-pipelines-ce-backport.yml
...elogs/unreleased/8688-recursive-pipelines-ce-backport.yml
+5
-0
No files found.
app/assets/javascripts/pipelines/components/graph/graph_component.vue
View file @
2ac0c09a
<
script
>
import
_
from
'
underscore
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
StageColumnComponent
from
'
./stage_column_component.vue
'
;
import
GraphMixin
from
'
../../mixins/graph_component_mixin
'
;
export
default
{
components
:
{
StageColumnComponent
,
GlLoadingIcon
,
},
props
:
{
isLoading
:
{
type
:
Boolean
,
required
:
true
,
},
pipeline
:
{
type
:
Object
,
required
:
true
,
},
},
computed
:
{
graph
()
{
return
this
.
pipeline
.
details
&&
this
.
pipeline
.
details
.
stages
;
},
},
methods
:
{
capitalizeStageName
(
name
)
{
const
escapedName
=
_
.
escape
(
name
);
return
escapedName
.
charAt
(
0
).
toUpperCase
()
+
escapedName
.
slice
(
1
);
},
isFirstColumn
(
index
)
{
return
index
===
0
;
},
stageConnectorClass
(
index
,
stage
)
{
let
className
;
// If it's the first stage column and only has one job
if
(
index
===
0
&&
stage
.
groups
.
length
===
1
)
{
className
=
'
no-margin
'
;
}
else
if
(
index
>
0
)
{
// If it is not the first column
className
=
'
left-margin
'
;
}
return
className
;
},
refreshPipelineGraph
()
{
this
.
$emit
(
'
refreshPipelineGraph
'
);
},
},
mixins
:
[
GraphMixin
],
};
</
script
>
<
template
>
<div
class=
"build-content middle-block js-pipeline-graph"
>
<div
class=
"pipeline-visualization pipeline-graph pipeline-tab-content"
>
<div
class=
"text-center"
><gl-loading-icon
v-if=
"isLoading"
:size=
"3"
/></div>
<div
v-if=
"isLoading"
class=
"m-auto"
><gl-loading-icon
:size=
"3"
/></div>
<ul
v-if=
"!isLoading"
class=
"stage-column-list"
>
<stage-column-component
...
...
app/assets/javascripts/pipelines/mixins/graph_component_mixin.js
0 → 100644
View file @
2ac0c09a
import
_
from
'
underscore
'
;
export
default
{
props
:
{
isLoading
:
{
type
:
Boolean
,
required
:
true
,
},
pipeline
:
{
type
:
Object
,
required
:
true
,
},
},
computed
:
{
graph
()
{
return
this
.
pipeline
.
details
&&
this
.
pipeline
.
details
.
stages
;
},
},
methods
:
{
capitalizeStageName
(
name
)
{
const
escapedName
=
_
.
escape
(
name
);
return
escapedName
.
charAt
(
0
).
toUpperCase
()
+
escapedName
.
slice
(
1
);
},
isFirstColumn
(
index
)
{
return
index
===
0
;
},
stageConnectorClass
(
index
,
stage
)
{
let
className
;
// If it's the first stage column and only has one job
if
(
index
===
0
&&
stage
.
groups
.
length
===
1
)
{
className
=
'
no-margin
'
;
}
else
if
(
index
>
0
)
{
// If it is not the first column
className
=
'
left-margin
'
;
}
return
className
;
},
refreshPipelineGraph
()
{
this
.
$emit
(
'
refreshPipelineGraph
'
);
},
},
};
app/assets/stylesheets/pages/pipelines.scss
View file @
2ac0c09a
...
...
@@ -433,6 +433,7 @@
}
.pipeline-tab-content
{
display
:
flex
;
width
:
100%
;
background-color
:
$gray-light
;
padding
:
$gl-padding
;
...
...
changelogs/unreleased/8688-recursive-pipelines-ce-backport.yml
0 → 100644
View file @
2ac0c09a
---
title
:
Creates mixin to reduce code duplication between CE and EE in graph component
merge_request
:
author
:
type
:
other
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