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
d24a1376
Commit
d24a1376
authored
Apr 13, 2021
by
Sarah GP
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dropdown toggle bug
Add new constants to check type
parent
a4bdedad
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
4 deletions
+31
-4
app/assets/javascripts/pipelines/components/graph/constants.js
...ssets/javascripts/pipelines/components/graph/constants.js
+3
-0
app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue
...scripts/pipelines/components/graph/job_group_dropdown.vue
+7
-2
app/assets/javascripts/pipelines/components/graph/job_item.vue
...ssets/javascripts/pipelines/components/graph/job_item.vue
+21
-2
No files found.
app/assets/javascripts/pipelines/components/graph/constants.js
View file @
d24a1376
...
...
@@ -15,4 +15,7 @@ export const STAGE_VIEW = 'stage';
export
const
LAYER_VIEW
=
'
layer
'
;
export
const
VIEW_TYPE_KEY
=
'
pipeline_graph_view_type
'
;
export
const
SINGLE_JOB
=
'
single_job
'
;
export
const
JOB_DROPDOWN
=
'
job_dropdown
'
;
export
const
IID_FAILURE
=
'
missing_iid
'
;
app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue
View file @
d24a1376
<
script
>
import
{
reportToSentry
}
from
'
../../utils
'
;
import
{
JOB_DROPDOWN
,
SINGLE_JOB
}
from
'
./constants
'
;
import
JobItem
from
'
./job_item.vue
'
;
/**
...
...
@@ -28,6 +29,10 @@ export default {
default
:
''
,
},
},
jobItemTypes
:
{
jobDropdown
:
JOB_DROPDOWN
,
singleJob
:
SINGLE_JOB
,
},
computed
:
{
computedJobId
()
{
return
this
.
pipelineId
>
-
1
?
`
${
this
.
group
.
name
}
-
${
this
.
pipelineId
}
`
:
''
;
...
...
@@ -57,11 +62,10 @@ export default {
>
<div
class=
"gl-display-flex gl-align-items-center gl-justify-content-space-between"
>
<job-item
:
dropdown-length=
"group.size
"
:
type=
"$options.jobItemTypes.jobDropdown
"
:group-tooltip=
"tooltipText"
:job=
"group"
:stage-name=
"stageName"
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
/>
<div
class=
"gl-font-weight-100 gl-font-size-lg gl-ml-n4"
>
{{
group
.
size
}}
</div>
...
...
@@ -75,6 +79,7 @@ export default {
<job-item
:dropdown-length=
"group.size"
:job=
"job"
:type=
"$options.jobItemTypes.singleJob"
css-class-job-name=
"mini-pipeline-graph-dropdown-item"
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
/>
...
...
app/assets/javascripts/pipelines/components/graph/job_item.vue
View file @
d24a1376
...
...
@@ -8,7 +8,7 @@ import { reportToSentry } from '../../utils';
import
ActionComponent
from
'
../jobs_shared/action_component.vue
'
;
import
JobNameComponent
from
'
../jobs_shared/job_name_component.vue
'
;
import
{
accessValue
}
from
'
./accessors
'
;
import
{
REST
}
from
'
./constants
'
;
import
{
REST
,
SINGLE_JOB
}
from
'
./constants
'
;
/**
* Renders the badge for the pipeline graph and the job's dropdown.
...
...
@@ -97,6 +97,11 @@ export default {
required
:
false
,
default
:
''
,
},
type
:
{
type
:
String
,
required
:
false
,
default
:
SINGLE_JOB
,
},
},
computed
:
{
boundary
()
{
...
...
@@ -111,6 +116,9 @@ export default {
hasDetails
()
{
return
accessValue
(
this
.
dataMethod
,
'
hasDetails
'
,
this
.
status
);
},
isSingleItem
()
{
return
this
.
type
===
SINGLE_JOB
;
},
nameComponent
()
{
return
this
.
hasDetails
?
'
gl-link
'
:
'
div
'
;
},
...
...
@@ -177,6 +185,17 @@ export default {
hideTooltips
()
{
this
.
$root
.
$emit
(
BV_HIDE_TOOLTIP
);
},
jobItemClick
(
evt
)
{
if
(
this
.
isSingleItem
)
{
/*
This is so the jobDropdown still toggles. Issue to refactor:
https://gitlab.com/gitlab-org/gitlab/-/issues/267117
*/
evt
.
stopPropagation
();
}
this
.
hideTooltips
();
},
pipelineActionRequestComplete
()
{
this
.
$emit
(
'
pipelineActionRequestComplete
'
);
},
...
...
@@ -201,7 +220,7 @@ export default {
:href="detailsPath"
class="js-pipeline-graph-job-link qa-job-link menu-item gl-text-gray-900 gl-active-text-decoration-none gl-focus-text-decoration-none gl-hover-text-decoration-none gl-w-full"
:data-testid="testId"
@click
.stop="hideTooltips
"
@click
="jobItemClick
"
@mouseout="hideTooltips"
>
<div
class=
"ci-job-name-component gl-display-flex gl-align-items-center"
>
...
...
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