about to pull pipeline_url change
This commit is contained in:
parent
0c83517039
commit
a0a0a57092
2 changed files with 8 additions and 13 deletions
|
@ -30,12 +30,9 @@
|
|||
created() {
|
||||
const url = window.location.toString();
|
||||
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: {
|
||||
shortsha(pipeline) {
|
||||
return pipeline.sha.slice(0, 8);
|
||||
},
|
||||
changepage(event, last) {
|
||||
const text = event.target.innerText;
|
||||
if (text === '...') return;
|
||||
|
@ -47,7 +44,8 @@
|
|||
|
||||
window.history.pushState({}, null, `?p=${this.pagenum}`);
|
||||
clearInterval(this.intervalId);
|
||||
this.store.fetchDataLoop.call(this, Vue, this.pagenum);
|
||||
debugger
|
||||
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
|
||||
},
|
||||
pipelineurl(id) {
|
||||
return `pipelines/${id}`;
|
||||
|
@ -72,7 +70,7 @@
|
|||
</vue-pipeline-url>
|
||||
<vue-branch-commit
|
||||
:pipeline='pipeline'
|
||||
:shortsha='shortsha'
|
||||
:shortsha='pipeline.commit.shortsha'
|
||||
>
|
||||
</vue-branch-commit>
|
||||
<vue-stages></vue-stages>
|
||||
|
|
|
@ -2,17 +2,14 @@
|
|||
/* eslint-disable no-param-reassign */
|
||||
|
||||
((gl) => {
|
||||
const api = '/api/v3/projects';
|
||||
const paginate = '?per_page=5&page=';
|
||||
|
||||
gl.PipelineStore = class {
|
||||
fetchDataLoop(Vue, pageNum) {
|
||||
fetchDataLoop(Vue, pageNum, url) {
|
||||
const goFetch = () =>
|
||||
// const url = `${api}/${this.scope}/pipelines${paginate}${pageNum}`
|
||||
this.$http.get('/gitlab-org/gitlab-shell/pipelines.json?page=1')
|
||||
this.$http.get(`${url}?page=${pageNum}`)
|
||||
.then((response) => {
|
||||
debugger
|
||||
Vue.set(this, 'pipelines', JSON.parse(response.body));
|
||||
const res = JSON.parse(response.body)
|
||||
Vue.set(this, 'pipelines', res.pipelines);
|
||||
}, () => new Flash(
|
||||
'Something went wrong on our end.'
|
||||
));
|
||||
|
|
Loading…
Reference in a new issue