BigW Consortium Gitlab

Commit df1b15e3 by Regis

loading icon - rename component keys

parent a1f281e9
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
((gl) => { ((gl) => {
gl.VuePipeLines = Vue.extend({ gl.VuePipeLines = Vue.extend({
components: { components: {
'running-pipeline': gl.VueRunningPipeline, runningPipeline: gl.VueRunningPipeline,
'stages': gl.VueStages, pipelineActions: gl.VuePipelineActions,
'pipeline-actions': gl.VuePipelineActions, stages: gl.VueStages,
'branch-commit': gl.VueBranchCommit, branchCommit: gl.VueBranchCommit,
'pipeline-url': gl.VuePipelineUrl, pipelineUrl: gl.VuePipelineUrl,
'pipeline-head': gl.VuePipelineHead, pipelineHead: gl.VuePipelineHead,
'gl-pagination': gl.VueGlPagination, glPagination: gl.VueGlPagination,
'status-scope': gl.VueStatusScope, statusScope: gl.VueStatusScope,
'time-ago': gl.VueTimeAgo, timeAgo: gl.VueTimeAgo,
}, },
data() { data() {
return { return {
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
all: 0, all: 0,
running_or_pending: 0, running_or_pending: 0,
}, },
pageRequest: false,
}; };
}, },
props: [ props: [
...@@ -47,12 +48,16 @@ ...@@ -47,12 +48,16 @@
window.history.pushState({}, null, `?p=${this.pagenum}`); window.history.pushState({}, null, `?p=${this.pagenum}`);
clearInterval(this.intervalId); clearInterval(this.intervalId);
this.pageRequest = true;
this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope); this.store.fetchDataLoop.call(this, Vue, this.pagenum, this.scope);
}, },
}, },
template: ` template: `
<div> <div>
<div class="table-holder"> <div class="pipeline-loading-status" v-if='pipelines.length < 1'>
<i class="fa fa-spinner fa-spin"></i>
</div>
<div class="table-holder" v-if='pipelines.length > 0'>
<table class="table ci-table"> <table class="table ci-table">
<pipeline-head></pipeline-head> <pipeline-head></pipeline-head>
<tbody> <tbody>
...@@ -67,6 +72,9 @@ ...@@ -67,6 +72,9 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="pipeline-loading-status" v-if='pageRequest'>
<i class="fa fa-spinner fa-spin"></i>
</div>
<gl-pagination <gl-pagination
v-if='count.all > 0' v-if='count.all > 0'
:pagenum='pagenum' :pagenum='pagenum'
......
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
this.$http.get(`${url}?page=${pageNum}`) this.$http.get(`${url}?page=${pageNum}`)
.then((response) => { .then((response) => {
const res = JSON.parse(response.body); const res = JSON.parse(response.body);
debugger
Vue.set(this, 'updatedAt', res.updated_at); Vue.set(this, 'updatedAt', res.updated_at);
Vue.set(this, 'pipelines', res.pipelines); Vue.set(this, 'pipelines', res.pipelines);
Vue.set(this, 'count', res.count); Vue.set(this, 'count', res.count);
this.pageRequest = false;
}, () => 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