Commit 905f7391 authored by Regis's avatar Regis

status icon and status components dynamic by scope

parent 35066c85
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
'vue-pipeline-url': gl.VuePipelineUrl, 'vue-pipeline-url': gl.VuePipelineUrl,
'vue-pipeline-head': gl.VuePipelineHead, 'vue-pipeline-head': gl.VuePipelineHead,
'vue-gl-pagination': gl.VueGlPagination, 'vue-gl-pagination': gl.VueGlPagination,
'vue-status-pipeline': gl.VueStatusPipeline, 'vue-status-scope': gl.VueStatusScope,
}, },
data() { data() {
return { return {
...@@ -54,11 +54,11 @@ ...@@ -54,11 +54,11 @@
<vue-pipeline-head></vue-pipeline-head> <vue-pipeline-head></vue-pipeline-head>
<tbody> <tbody>
<tr class="commit" v-for='pipeline in pipelines'> <tr class="commit" v-for='pipeline in pipelines'>
<vue-status-pipeline <vue-status-scope
:pipeline='pipeline' :scope='pipeline'
:pipelineurl='pipelineurl' :scopeurl='pipelineurl'
> >
</vue-status-pipeline> </vue-status-scope>
<vue-pipeline-url <vue-pipeline-url
:pipeline='pipeline' :pipeline='pipeline'
:pipelineurl='pipelineurl' :pipelineurl='pipelineurl'
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
((gl) => { ((gl) => {
gl.VueFailedPipeline = Vue.extend({ gl.VueFailedScope = Vue.extend({
components: { components: {
'vue-failed-icon': gl.VuePendingIcon, 'vue-failed-icon': gl.VuePendingIcon,
}, },
props: [ props: [
'pipeline', 'scope',
'pipelineurl', 'scopeurl',
], ],
template: ` template: `
<td class="commit-link"> <td class="commit-link">
<a :href='pipelineurl(pipeline.id)'> <a :href='scopeurl(scope.id)'>
<span class="ci-status ci-failed"> <span class="ci-status ci-failed">
<vue-failed-icon></vue-failed-icon> <vue-failed-icon></vue-failed-icon>
&nbsp;failed &nbsp;failed
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
((gl) => { ((gl) => {
gl.VuePendingPipeline = Vue.extend({ gl.VuePendingScope = Vue.extend({
components: { components: {
'vue-pending-icon': gl.VuePendingIcon, 'vue-pending-icon': gl.VuePendingIcon,
}, },
props: [ props: [
'pipeline', 'scope',
'pipelineurl', 'scopeurl',
], ],
template: ` template: `
<td class="commit-link"> <td class="commit-link">
<a :href='pipelineurl(pipeline.id)'> <a :href='scopeurl(scope.id)'>
<span class="ci-status ci-pending"> <span class="ci-status ci-pending">
<vue-pending-icon></vue-pending-icon> <vue-pending-icon></vue-pending-icon>
&nbsp;pending &nbsp;pending
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
((gl) => { ((gl) => {
gl.VueRunningPipeline = Vue.extend({ gl.VueRunningScope = Vue.extend({
components: { components: {
'vue-running-icon': gl.VueRunningIcon, 'vue-running-icon': gl.VueRunningIcon,
}, },
props: [ props: [
'pipeline', 'scope',
'pipelineurl', 'scopeurl',
], ],
template: ` template: `
<td class="commit-link"> <td class="commit-link">
<a :href='pipelineurl(pipeline.id)'> <a :href='scopeurl(scope.id)'>
<span class="ci-status ci-running"> <span class="ci-status ci-running">
<vue-running-icon></vue-running-icon> <vue-running-icon></vue-running-icon>
&nbsp;running &nbsp;running
......
...@@ -2,36 +2,36 @@ ...@@ -2,36 +2,36 @@
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
((gl) => { ((gl) => {
gl.VueStatusPipeline = Vue.extend({ gl.VueStatusScope = Vue.extend({
components: { components: {
'vue-running-pipeline': gl.VueRunningPipeline, 'vue-running-scope': gl.VueRunningScope,
'vue-pending-pipeline': gl.VuePendingPipeline, 'vue-pending-scope': gl.VuePendingScope,
'vue-failed-pipeline': gl.VueFailedPipeline, 'vue-failed-scope': gl.VueFailedScope,
}, },
props: [ props: [
'pipeline', 'scope',
'pipelineurl', 'scopeurl',
], ],
template: ` template: `
<td class="commit-link"> <td class="commit-link">
<vue-running-pipeline <vue-running-scope
v-if="pipeline.status === 'running'" v-if="scope.status === 'running'"
:pipeline='pipeline' :scope='scope'
:pipelineurl='pipelineurl' :scopeurl='scopeurl'
> >
</vue-running-pipeline> </vue-running-scope>
<vue-pending-pipeline <vue-pending-scope
v-if="pipeline.status === 'pending'" v-if="scope.status === 'pending'"
:pipeline='pipeline' :scope='scope'
:pipelineurl='pipelineurl' :scopeurl='scopeurl'
> >
</vue-pending-pipeline> </vue-pending-scope>
<vue-failed-pipeline <vue-failed-scope
v-if="pipeline.status === 'failed'" v-if="scope.status === 'failed'"
:pipeline='pipeline' :scope='scope'
:pipelineurl='pipelineurl' :scopeurl='scopeurl'
> >
</vue-failed-pipeline> </vue-failed-scope>
</td> </td>
`, `,
}); });
......
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