提交 308e0eb5 编写于 作者: R Regis

have polling working

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册