Commit 725ba04e authored by Regis's avatar Regis

wip

parent d57faaa0
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
((gl) => { ((gl) => {
gl.VueStage = Vue.extend({ gl.VueStage = Vue.extend({
data() {
return {
request: false,
builds: '<ul></ul>',
};
},
props: ['stage', 'svgs', 'match'], props: ['stage', 'svgs', 'match'],
computed: { computed: {
buildStatus() { buildStatus() {
...@@ -14,15 +20,51 @@ ...@@ -14,15 +20,51 @@
svg() { svg() {
return this.svgs[this.match(this.stage.status.icon)]; return this.svgs[this.match(this.stage.status.icon)];
}, },
spanClass() {
return `ci-status-icon ci-status-icon-${this.stage.status.group}`;
},
}, },
template: ` template: `
<a <div class="stage-container mini-pipeline-graph">
:class='tooltip' <div class="dropdown inline build-content">
:title='buildStatus' <button
:href='stage.path' class="has-tooltip builds-dropdown js-builds-dropdown-button"
v-html='svg' data-placement="top"
> data-stage-endpoint='stage.status.endpoint'
</a> data-title='stage.status.type'
data-toggle="dropdown"
type="button"
>
<span :class='tooltip'>
<span class="mini-pipeline-graph-icon-container">
<span
:class='spanClass'
:v-html='svg'
>
</span>
<i class="fa fa-caret-down dropdown-caret"></i>
</span>
</span>
</button>
<div class="js-builds-dropdown-container">
<div class="dropdown-menu grouped-pipeline-dropdown">
<div class="arrow-up"></div>
<div
class="js-builds-dropdown-list"
v-if='request'
v-html='builds'
>
</div>
<div
class="js-builds-dropdown-loading builds-dropdown-loading"
v-if='!request'
>
<span class="fa fa-spinner fa-spin"></span>
</div>
</div>
</div>
</div>
</div>
`, `,
}); });
})(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