Commit 308e0eb5 authored by Regis's avatar Regis

have polling working

parent 8658c978
......@@ -4,12 +4,17 @@
((gl) => {
gl.PipelineStore = class {
fetchData(Vue) {
this.$http.get(`/api/v3/projects/${this.scope}/pipelines`)
.then((response) => {
Vue.set(this, 'pipelines', JSON.parse(response.body));
const goFetch = vue =>
this.$http.get(`/api/v3/projects/${this.scope}/pipelines`)
.then((response) => {
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 = {}));
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