BigW Consortium Gitlab

Commit a0a0a570 by Regis

about to pull pipeline_url change

parent 0c835170
...@@ -30,12 +30,9 @@ ...@@ -30,12 +30,9 @@
created() { created() {
const url = window.location.toString(); const url = window.location.toString();
if (~url.indexOf('?')) this.pagenum = url.split('?')[1].split('=')[1]; if (~url.indexOf('?')) this.pagenum = url.split('?')[1].split('=')[1];
this.store.fetchDataLoop.call(this, Vue, this.pagenum); this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
}, },
methods: { methods: {
shortsha(pipeline) {
return pipeline.sha.slice(0, 8);
},
changepage(event, last) { changepage(event, last) {
const text = event.target.innerText; const text = event.target.innerText;
if (text === '...') return; if (text === '...') return;
...@@ -47,7 +44,8 @@ ...@@ -47,7 +44,8 @@
window.history.pushState({}, null, `?p=${this.pagenum}`); window.history.pushState({}, null, `?p=${this.pagenum}`);
clearInterval(this.intervalId); clearInterval(this.intervalId);
this.store.fetchDataLoop.call(this, Vue, this.pagenum); debugger
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
}, },
pipelineurl(id) { pipelineurl(id) {
return `pipelines/${id}`; return `pipelines/${id}`;
...@@ -72,7 +70,7 @@ ...@@ -72,7 +70,7 @@
</vue-pipeline-url> </vue-pipeline-url>
<vue-branch-commit <vue-branch-commit
:pipeline='pipeline' :pipeline='pipeline'
:shortsha='shortsha' :shortsha='pipeline.commit.shortsha'
> >
</vue-branch-commit> </vue-branch-commit>
<vue-stages></vue-stages> <vue-stages></vue-stages>
......
...@@ -2,17 +2,14 @@ ...@@ -2,17 +2,14 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
((gl) => { ((gl) => {
const api = '/api/v3/projects';
const paginate = '?per_page=5&page=';
gl.PipelineStore = class { gl.PipelineStore = class {
fetchDataLoop(Vue, pageNum) { fetchDataLoop(Vue, pageNum, url) {
const goFetch = () => const goFetch = () =>
// const url = `${api}/${this.scope}/pipelines${paginate}${pageNum}` this.$http.get(`${url}?page=${pageNum}`)
this.$http.get('/gitlab-org/gitlab-shell/pipelines.json?page=1')
.then((response) => { .then((response) => {
debugger debugger
Vue.set(this, 'pipelines', JSON.parse(response.body)); const res = JSON.parse(response.body)
Vue.set(this, 'pipelines', res.pipelines);
}, () => new Flash( }, () => new Flash(
'Something went wrong on our end.' 'Something went wrong on our end.'
)); ));
......
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