BigW Consortium Gitlab

Commit 87d4d235 by Regis

remove commit endpoint callprep for backend api to be updated or new endpoint to be built

parent a42140d0
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
data() { data() {
return { return {
pipelines: [], pipelines: [],
commits: [],
currentPage: '', currentPage: '',
intervalId: '', intervalId: '',
}; };
...@@ -19,7 +18,6 @@ ...@@ -19,7 +18,6 @@
'store', 'store',
], ],
created() { created() {
this.store.fetchCommits.call(this, Vue);
this.store.fetchDataLoop.call(this, Vue); this.store.fetchDataLoop.call(this, Vue);
}, },
methods: { methods: {
......
...@@ -4,35 +4,25 @@ ...@@ -4,35 +4,25 @@
((gl) => { ((gl) => {
const api = '/api/v3/projects'; const api = '/api/v3/projects';
const goFetch = (that, vue) =>
that.$http.get(
`${api}/${that.scope}/pipelines?per_page=5&page=1`
)
.then((response) => {
vue.set(that, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
gl.PipelineStore = class { gl.PipelineStore = class {
fetchDataLoop(Vue) { fetchDataLoop(Vue) {
const goFetch = () =>
this.$http.get(
`${api}/${this.scope}/pipelines?per_page=5&page=1`
)
.then((response) => {
Vue.set(this, 'pipelines', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
});
goFetch();
// eventually clearInterval(this.intervalId) // eventually clearInterval(this.intervalId)
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
console.log('DID IT'); console.log('DID IT');
goFetch(this, Vue); goFetch();
}, 30000); }, 30000);
} }
fetchCommits(vue) {
this.$http.get(
`${api}/${this.scope}/repository/commits?per_page=5&page=1`
)
.then((response) => {
vue.set(this, 'commits', JSON.parse(response.body));
}, () => {
console.error('API Error for Pipelines');
})
.then(() => goFetch(this, vue));
}
}; };
})(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