summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2016-11-29 20:44:00 -0600
committerRegis <boudinot.regis@yahoo.com>2016-11-29 20:44:00 -0600
commit649d1eb23073543ceed995124c1cb67aabb8bfc2 (patch)
tree1edceca59e2399f1cbe69ee2af444148f769caf0
parent872b0d17039644af6037d1a5b041e04b5f054406 (diff)
downloadgitlab-ce-649d1eb23073543ceed995124c1cb67aabb8bfc2.tar.gz
new line for skipped - use logic gate for REALTIME true or false
-rw-r--r--app/assets/javascripts/vue_pipelines_index/pipelines.js.es63
-rw-r--r--app/assets/javascripts/vue_pipelines_index/store.js.es623
-rw-r--r--app/assets/javascripts/vue_pipelines_status/skipped.js.es62
3 files changed, 16 insertions, 12 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
index 006e38505e2..477d59ad2c3 100644
--- a/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/pipelines.js.es6
@@ -2,6 +2,7 @@
/* eslint-disable no-param-reassign, no-bitwise*/
((gl) => {
+ const REALTIME = false;
const SPREAD = '...';
const PREV = 'Prev';
const NEXT = 'Next';
@@ -55,7 +56,7 @@
if (text === FIRST) this.pagenum = 1;
window.history.pushState({}, null, `?p=${this.pagenum}`);
- // clearInterval(this.intervalId);
+ if (REALTIME) clearInterval(this.intervalId);
this.pageRequest = true;
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
},
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 = {}));
diff --git a/app/assets/javascripts/vue_pipelines_status/skipped.js.es6 b/app/assets/javascripts/vue_pipelines_status/skipped.js.es6
index 92d53c4a87e..da904010607 100644
--- a/app/assets/javascripts/vue_pipelines_status/skipped.js.es6
+++ b/app/assets/javascripts/vue_pipelines_status/skipped.js.es6
@@ -20,4 +20,4 @@
</td>
`,
});
-})(window.gl || (window.gl = {})); \ No newline at end of file
+})(window.gl || (window.gl = {}));