diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-04-09 15:06:06 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-04-13 18:57:08 +0100 |
commit | 6c76e81bbf76cf85f532d3b5601c16d77c9e4544 (patch) | |
tree | 4a7558eb23bf6c7af2b480cb0e8e77b03f8e27e8 /app/assets/javascripts/pipelines/mixins/pipelines.js | |
parent | ab98308db7d907e5fad53d2b1e3435960a1665cd (diff) | |
download | gitlab-ce-6c76e81bbf76cf85f532d3b5601c16d77c9e4544.tar.gz |
[ci skip] Updates table when stage is clicked
Diffstat (limited to 'app/assets/javascripts/pipelines/mixins/pipelines.js')
-rw-r--r-- | app/assets/javascripts/pipelines/mixins/pipelines.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/pipelines/mixins/pipelines.js b/app/assets/javascripts/pipelines/mixins/pipelines.js index 522a4277bd7..05143c43173 100644 --- a/app/assets/javascripts/pipelines/mixins/pipelines.js +++ b/app/assets/javascripts/pipelines/mixins/pipelines.js @@ -52,14 +52,29 @@ export default { }); eventHub.$on('postAction', this.postAction); + eventHub.$on('clickedDropdown', this.updateTable); }, beforeDestroy() { eventHub.$off('postAction', this.postAction); + eventHub.$off('clickedDropdown', this.updateTable); }, destroyed() { this.poll.stop(); }, methods: { + updateTable() { + // Cancel ongoing request + if (this.isMakingRequest) { + + } + + // Stop polling + this.poll.stop(); + // make new request + this.fetchPipelines(); + // restart polling + this.poll.restart(); + }, fetchPipelines() { if (!this.isMakingRequest) { this.isLoading = true; |