diff options
author | Regis <boudinot.regis@yahoo.com> | 2016-11-29 20:44:00 -0600 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2016-11-29 20:44:00 -0600 |
commit | 649d1eb23073543ceed995124c1cb67aabb8bfc2 (patch) | |
tree | 1edceca59e2399f1cbe69ee2af444148f769caf0 /app/assets/javascripts/vue_pipelines_index/store.js.es6 | |
parent | 872b0d17039644af6037d1a5b041e04b5f054406 (diff) | |
download | gitlab-ce-649d1eb23073543ceed995124c1cb67aabb8bfc2.tar.gz |
new line for skipped - use logic gate for REALTIME true or false
Diffstat (limited to 'app/assets/javascripts/vue_pipelines_index/store.js.es6')
-rw-r--r-- | app/assets/javascripts/vue_pipelines_index/store.js.es6 | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/store.js.es6 b/app/assets/javascripts/vue_pipelines_index/store.js.es6 index a46bdc47491..3ec627d24d0 100644 --- a/app/assets/javascripts/vue_pipelines_index/store.js.es6 +++ b/app/assets/javascripts/vue_pipelines_index/store.js.es6 @@ -2,6 +2,7 @@ /* eslint-disable no-param-reassign */ ((gl) => { + const REALTIME = false; const PAGINATION_LIMIT = 31; const SLICE_LIMIT = 29; @@ -81,17 +82,19 @@ resourceChecker(); goFetch(); - // this.intervalId = setInterval(() => { - // if (this.updatedAt) { - // resourceChecker(); - // if (Vue.activeResources > 1) return; - // goUpdate(); - // } - // }, 3000); + if (REALTIME) { + this.intervalId = setInterval(() => { + if (this.updatedAt) { + resourceChecker(); + if (Vue.activeResources > 1) return; + goUpdate(); + } + }, 3000); - // window.onbeforeunload = function removePipelineInterval() { - // clearInterval(this.intervalId); - // }; + window.onbeforeunload = function removePipelineInterval() { + clearInterval(this.intervalId); + }; + } } }; })(window.gl || (window.gl = {})); |