BigW Consortium Gitlab

Commit 308e0eb5 by Regis

have polling working

parent 8658c978
...@@ -4,12 +4,17 @@ ...@@ -4,12 +4,17 @@
((gl) => { ((gl) => {
gl.PipelineStore = class { gl.PipelineStore = class {
fetchData(Vue) { fetchData(Vue) {
const goFetch = vue =>
this.$http.get(`/api/v3/projects/${this.scope}/pipelines`) this.$http.get(`/api/v3/projects/${this.scope}/pipelines`)
.then((response) => { .then((response) => {
Vue.set(this, 'pipelines', JSON.parse(response.body)); vue.set(this, 'pipelines', JSON.parse(response.body));
}, () => { }, () => {
Vue.set(this, 'pipelines', []); vue.set(this, 'pipelines', []);
}); });
goFetch(Vue);
setInterval(() => { console.log('DID IT'); goFetch(Vue) }, 3000);
} }
}; };
})(window.gl || (window.gl = {})); })(window.gl || (window.gl = {}));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment