diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-04-10 15:30:08 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-04-13 18:57:12 +0100 |
commit | 0bc8440d4eb401a86bd154514425a73213e80063 (patch) | |
tree | aabd01c1c1a5124292f28499f051d9c3d370f3fe /app/assets/javascripts/pipelines/mixins/pipelines.js | |
parent | 6c76e81bbf76cf85f532d3b5601c16d77c9e4544 (diff) | |
download | gitlab-ce-0bc8440d4eb401a86bd154514425a73213e80063.tar.gz |
Stop polling and fetch the table
Diffstat (limited to 'app/assets/javascripts/pipelines/mixins/pipelines.js')
-rw-r--r-- | app/assets/javascripts/pipelines/mixins/pipelines.js | 13 |
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; |