Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2018-04-10 17:30:08 +0300
committerFilipa Lacerda <filipa@gitlab.com>2018-04-13 20:57:12 +0300
commit0bc8440d4eb401a86bd154514425a73213e80063 (patch)
treeaabd01c1c1a5124292f28499f051d9c3d370f3fe /app/assets/javascripts/pipelines/mixins
parent6c76e81bbf76cf85f532d3b5601c16d77c9e4544 (diff)
Stop polling and fetch the table
Diffstat (limited to 'app/assets/javascripts/pipelines/mixins')
-rw-r--r--app/assets/javascripts/pipelines/mixins/pipelines.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/assets/javascripts/pipelines/mixins/pipelines.js b/app/assets/javascripts/pipelines/mixins/pipelines.js
index 05143c43173..a70b777d726 100644
--- a/app/assets/javascripts/pipelines/mixins/pipelines.js
+++ b/app/assets/javascripts/pipelines/mixins/pipelines.js
@@ -65,13 +65,13 @@ export default {
updateTable() {
// Cancel ongoing request
if (this.isMakingRequest) {
-
+ this.service.cancelationSource.cancel();
}
// Stop polling
this.poll.stop();
// make new request
- this.fetchPipelines();
+ this.getPipelines();
// restart polling
this.poll.restart();
},
@@ -79,11 +79,14 @@ export default {
if (!this.isMakingRequest) {
this.isLoading = true;
- this.service.getPipelines(this.requestData)
- .then(response => this.successCallback(response))
- .catch(() => this.errorCallback());
+ this.getPipelines();
}
},
+ getPipelines() {
+ this.service.getPipelines(this.requestData)
+ .then(response => this.successCallback(response))
+ .catch(() => this.errorCallback());
+ },
setCommonData(pipelines) {
this.store.storePipelines(pipelines);
this.isLoading = false;