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
ac393ade
Commit
ac393ade
authored
Apr 18, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensures disabled status while request is being made
parent
12bf940c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
34 deletions
+30
-34
app/assets/javascripts/pipelines/components/graph/action_component.vue
...vascripts/pipelines/components/graph/action_component.vue
+20
-9
app/assets/javascripts/pipelines/components/graph/graph_component.vue
...avascripts/pipelines/components/graph/graph_component.vue
+0
-6
app/assets/javascripts/pipelines/components/graph/job_component.vue
.../javascripts/pipelines/components/graph/job_component.vue
+0
-7
app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
...pts/pipelines/components/graph/stage_column_component.vue
+0
-6
app/assets/javascripts/pipelines/pipeline_details_bundle.js
app/assets/javascripts/pipelines/pipeline_details_bundle.js
+2
-6
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+8
-0
No files found.
app/assets/javascripts/pipelines/components/graph/action_component.vue
View file @
ac393ade
...
...
@@ -31,28 +31,39 @@ export default {
type
:
String
,
required
:
true
,
},
buttonDisabled
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
data
()
{
return
{
isDisabled
:
false
,
linkRequested
:
''
,
};
},
computed
:
{
cssClass
()
{
const
actionIconDash
=
dasherize
(
this
.
actionIcon
);
return
`
${
actionIconDash
}
js-icon-
${
actionIconDash
}
`
;
},
isDisabled
()
{
return
this
.
buttonDisabled
===
this
.
link
;
},
},
methods
:
{
onClickAction
()
{
$
(
this
.
$el
).
tooltip
(
'
hide
'
);
eventHub
.
$emit
(
'
graphAction
'
,
this
.
link
);
this
.
linkRequested
=
this
.
link
;
this
.
isDisabled
=
true
;
},
updateDisabled
(
actionUrl
)
{
if
(
actionUrl
===
this
.
linkRequested
)
{
this
.
isDisabled
=
false
;
}
}
},
created
()
{
eventHub
.
$on
(
'
graphActionFinished
'
,
this
.
updateDisabled
);
},
beforeDestroy
()
{
eventHub
.
$off
(
'
graphActionFinished
'
,
this
.
updateDisabled
);
},
};
</
script
>
...
...
app/assets/javascripts/pipelines/components/graph/graph_component.vue
View file @
ac393ade
...
...
@@ -17,11 +17,6 @@ export default {
type
:
Object
,
required
:
true
,
},
actionDisabled
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
computed
:
{
...
...
@@ -75,7 +70,6 @@ export default {
:key=
"stage.name"
:stage-connector-class=
"stageConnectorClass(index, stage)"
:is-first-column=
"isFirstColumn(index)"
:action-disabled=
"actionDisabled"
/>
</ul>
</div>
...
...
app/assets/javascripts/pipelines/components/graph/job_component.vue
View file @
ac393ade
...
...
@@ -54,12 +54,6 @@ export default {
required
:
false
,
default
:
false
,
},
actionDisabled
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
computed
:
{
...
...
@@ -136,7 +130,6 @@ export default {
:tooltip-text=
"status.action.title"
:link=
"status.action.path"
:action-icon=
"status.action.icon"
:button-disabled=
"actionDisabled"
/>
</div>
...
...
app/assets/javascripts/pipelines/components/graph/stage_column_component.vue
View file @
ac393ade
...
...
@@ -29,11 +29,6 @@ export default {
required
:
false
,
default
:
''
,
},
actionDisabled
:
{
type
:
String
,
required
:
false
,
default
:
null
,
},
},
methods
:
{
...
...
@@ -74,7 +69,6 @@ export default {
v-if=
"job.size === 1"
:job=
"job"
css-class-job-name=
"build-content"
:action-disabled=
"actionDisabled"
/>
<dropdown-job-component
...
...
app/assets/javascripts/pipelines/pipeline_details_bundle.js
View file @
ac393ade
...
...
@@ -25,7 +25,6 @@ export default () => {
data
()
{
return
{
mediator
,
actionDisabled
:
null
,
};
},
created
()
{
...
...
@@ -36,16 +35,14 @@ export default () => {
},
methods
:
{
postAction
(
action
)
{
this
.
actionDisabled
=
action
;
this
.
mediator
.
service
.
postAction
(
action
)
.
then
(()
=>
{
this
.
mediator
.
refreshPipeline
();
this
.
actionDisabled
=
null
;
eventHub
.
$emit
(
'
graphActionFinished
'
,
action
)
;
})
.
catch
(()
=>
{
this
.
actionDisabled
=
null
;
Flash
(
__
(
'
An error occurred while making the request.
'
));
eventHub
.
$emit
(
'
graphActionFinished
'
,
action
);
});
},
},
...
...
@@ -54,7 +51,6 @@ export default () => {
props
:
{
isLoading
:
this
.
mediator
.
state
.
isLoading
,
pipeline
:
this
.
mediator
.
store
.
state
.
pipeline
,
actionDisabled
:
this
.
actionDisabled
,
},
});
},
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
ac393ade
...
...
@@ -468,6 +468,14 @@
margin-bottom
:
10px
;
white-space
:
normal
;
.ci-job-dropdown-container
{
// override dropdown.scss
.dropdown-menu
li
button
{
padding
:
0
;
text-align
:
center
;
}
}
// ensure .build-content has hover style when action-icon is hovered
.ci-job-dropdown-container
:hover
.build-content
{
@extend
.build-content
:hover
;
...
...
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