summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pipelines/pipeline_details_bundle.js
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-04-23 17:20:28 +0100
committerFilipa Lacerda <filipa@gitlab.com>2018-04-23 17:20:28 +0100
commit0bfc01dd5655b6604f001e3e6ffb3ffd6ada6276 (patch)
tree6b620a2b035ccf90cd661327391a0b083351f826 /app/assets/javascripts/pipelines/pipeline_details_bundle.js
parent2178bd5ff408a9a16549b90a6e1987afa32527b9 (diff)
parent3d12ce95b1307f9b8439aab9ac5fe9d406ab9b01 (diff)
downloadgitlab-ce-0bfc01dd5655b6604f001e3e6ffb3ffd6ada6276.tar.gz
Merge branch 'master' into 33697-pipelines-json-endpoint
* master: (48 commits) Get rid of config/initializers/2_app.rb and define Gitlab in lib/gitlab.rb Fix eslint Fix eslint Address latest feedback Moved committer and spec. Added some extra code to run hooks or not depending on the options Fix minor typos Fix disabled state while making a request Move Settings to its own file, isolate it from Rails and introduce Gitlab.root Document the new 'spec/fast_spec_helper.rb' file Introduce spec/fast_spec_helper.rb to run spec files that don't rely on the whole Rails env Move spec helpers/matchers/shared examples/contexts to their relevant folder Use axios request to interact with API instead of UJS Emit `toggleCollapse`, `onDropdownClose` on component Add changelog for 2fa filter in users api Add 2FA filter to users API for admins only Emit `onValueClick` event on component when container is clicked Fix project creation for user endpoint bug Update repository storages documentation URL Flowdock uses Gitaly, not Grit fix revoke header on deploy token docs ...
Diffstat (limited to 'app/assets/javascripts/pipelines/pipeline_details_bundle.js')
-rw-r--r--app/assets/javascripts/pipelines/pipeline_details_bundle.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_details_bundle.js b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
index a61bfbe25f3..b743364ff43 100644
--- a/app/assets/javascripts/pipelines/pipeline_details_bundle.js
+++ b/app/assets/javascripts/pipelines/pipeline_details_bundle.js
@@ -25,6 +25,7 @@ export default () => {
data() {
return {
mediator,
+ requestFinishedFor: null,
};
},
created() {
@@ -35,12 +36,17 @@ export default () => {
},
methods: {
postAction(action) {
- this.mediator.service.postAction(action)
+ // Click was made, reset this variable
+ this.requestFinishedFor = null;
+
+ this.mediator.service
+ .postAction(action)
.then(() => {
this.mediator.refreshPipeline();
- eventHub.$emit('graphActionFinished', action);
+ this.requestFinishedFor = action;
})
.catch(() => {
+ this.requestFinishedFor = action;
Flash(__('An error occurred while making the request.'));
eventHub.$emit('graphActionFinished', action);
});
@@ -51,6 +57,7 @@ export default () => {
props: {
isLoading: this.mediator.state.isLoading,
pipeline: this.mediator.store.state.pipeline,
+ requestFinishedFor: this.requestFinishedFor,
},
});
},
@@ -75,7 +82,8 @@ export default () => {
},
methods: {
postAction(action) {
- this.mediator.service.postAction(action.path)
+ this.mediator.service
+ .postAction(action.path)
.then(() => this.mediator.refreshPipeline())
.catch(() => Flash(__('An error occurred while making the request.')));
},