summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/commit/pipelines/pipelines_store.js.es6')
-rw-r--r--app/assets/javascripts/commit/pipelines/pipelines_store.js.es648
1 files changed, 0 insertions, 48 deletions
diff --git a/app/assets/javascripts/commit/pipelines/pipelines_store.js.es6 b/app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
deleted file mode 100644
index f1b80e45444..00000000000
--- a/app/assets/javascripts/commit/pipelines/pipelines_store.js.es6
+++ /dev/null
@@ -1,48 +0,0 @@
-/* eslint-disable no-underscore-dangle*/
-/**
- * Pipelines' Store for commits view.
- *
- * Used to store the Pipelines rendered in the commit view in the pipelines table.
- */
-require('../../vue_realtime_listener');
-
-class PipelinesStore {
- constructor() {
- this.state = {};
- this.state.pipelines = [];
- }
-
- storePipelines(pipelines = []) {
- this.state.pipelines = pipelines;
-
- return pipelines;
- }
-
- /**
- * Once the data is received we will start the time ago loops.
- *
- * Everytime a request is made like retry or cancel a pipeline, every 10 seconds we
- * update the time to show how long as passed.
- *
- */
- static startTimeAgoLoops() {
- const startTimeLoops = () => {
- this.timeLoopInterval = setInterval(() => {
- this.$children[0].$children.reduce((acc, component) => {
- const timeAgoComponent = component.$children.filter(el => el.$options._componentTag === 'time-ago')[0];
- acc.push(timeAgoComponent);
- return acc;
- }, []).forEach(e => e.changeTime());
- }, 10000);
- };
-
- startTimeLoops();
-
- const removeIntervals = () => clearInterval(this.timeLoopInterval);
- const startIntervals = () => startTimeLoops();
-
- gl.VueRealtimeListener(removeIntervals, startIntervals);
- }
-}
-
-module.exports = PipelinesStore;