BigW Consortium Gitlab

Commit 86be72ae by Regis

add artifact and action functionality - branch name back in

parent 634e9272
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<a <a
class="monospace branch-name" class="monospace branch-name"
:href='pipeline.commit.commit_url' :href='pipeline.commit.commit_url'
>
{{pipeline.ref.name}} {{pipeline.ref.name}}
</a> </a>
<div class="icon-container commit-icon"> <div class="icon-container commit-icon">
......
...@@ -3,7 +3,14 @@ ...@@ -3,7 +3,14 @@
((gl) => { ((gl) => {
gl.VuePipelineActions = Vue.extend({ gl.VuePipelineActions = Vue.extend({
// props: ['builds'], props: [
'pipeline',
],
methods: {
download(name) {
return `Download ${name} artifacts`;
},
},
template: ` template: `
<td class="pipeline-actions hidden-xs"> <td class="pipeline-actions hidden-xs">
<div class="controls pull-right"> <div class="controls pull-right">
...@@ -20,11 +27,8 @@ ...@@ -20,11 +27,8 @@
<i class="fa fa-caret-down"></i> <i class="fa fa-caret-down"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-align-right">
<li> <li v-for='action in pipeline.details.manual_actions'>
<!-- <a rel="nofollow" data-method="post" :href='action.url'>
Need builds ID for Play
-->
<a rel="nofollow" data-method="post" href="./builds/449/play">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 11" class="icon-play"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 11" class="icon-play">
<path <path
fill-rule="evenodd" fill-rule="evenodd"
...@@ -32,7 +36,7 @@ ...@@ -32,7 +36,7 @@
> >
</path> </path>
</svg> </svg>
<span>Production</span> <span>{{action.name}}</span>
</a> </a>
</li> </li>
</ul> </ul>
...@@ -43,19 +47,13 @@ ...@@ -43,19 +47,13 @@
<i class="fa fa-caret-down"></i> <i class="fa fa-caret-down"></i>
</a> </a>
<ul class="dropdown-menu dropdown-menu-align-right"> <ul class="dropdown-menu dropdown-menu-align-right">
<li> <li v-for='artifact in pipeline.details.artifacts'>
<!-- <a
Need builds ID for OSX and LINUX rel="nofollow"
--> :href='artifact.url'
<a rel="nofollow" href="./builds/437/artifacts/download"> >
<i class="fa fa-download"></i>
<span>Download 'build:osx' artifacts</span>
</a>
</li>
<li>
<a rel="nofollow" href="./builds/436/artifacts/download">
<i class="fa fa-download"></i> <i class="fa fa-download"></i>
<span>Download 'build:linux' artifacts</span> <span>{{download(artifact.name)}}</span>
</a> </a>
</li> </li>
</ul> </ul>
...@@ -63,13 +61,26 @@ ...@@ -63,13 +61,26 @@
</div> </div>
<div class="cancel-retry-btns inline"> <div class="cancel-retry-btns inline">
<a <a
v-if='!pipeline.cancel_url'
class="btn has-tooltip" class="btn has-tooltip"
title="Retry" title="Retry"
rel="nofollow" rel="nofollow"
data-method="post" data-method="post"
href="pipelines/retry"> :href='pipeline.retry_url'
>
<i class="fa fa-repeat"></i> <i class="fa fa-repeat"></i>
</a> </a>
<a
v-if='pipeline.cancel_url'
class="btn btn-remove has-tooltip"
title=""
rel="nofollow"
data-method="post"
href="/gitlab-org/gitlab-ce/pipelines/4950216/cancel"
data-original-title="Cancel"
>
<i class="fa fa-remove"></i>
</a>
</div> </div>
</div> </div>
</td> </td>
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
((gl) => { ((gl) => {
gl.VuePipeLines = Vue.extend({ gl.VuePipeLines = Vue.extend({
components: { components: {
'vue-running-pipeline': gl.VueRunningPipeline, 'running-pipeline': gl.VueRunningPipeline,
'vue-stages': gl.VueStages, 'stages': gl.VueStages,
'vue-pipeline-actions': gl.VuePipelineActions, 'pipeline-actions': gl.VuePipelineActions,
'vue-branch-commit': gl.VueBranchCommit, 'branch-commit': gl.VueBranchCommit,
'vue-pipeline-url': gl.VuePipelineUrl, 'pipeline-url': gl.VuePipelineUrl,
'vue-pipeline-head': gl.VuePipelineHead, 'pipeline-head': gl.VuePipelineHead,
'vue-gl-pagination': gl.VueGlPagination, 'gl-pagination': gl.VueGlPagination,
'vue-status-scope': gl.VueStatusScope, 'status-scope': gl.VueStatusScope,
'vue-time-ago': gl.VueTimeAgo, 'time-ago': gl.VueTimeAgo,
}, },
data() { data() {
return { return {
...@@ -54,26 +54,26 @@ ...@@ -54,26 +54,26 @@
<div> <div>
<div class="table-holder"> <div class="table-holder">
<table class="table ci-table"> <table class="table ci-table">
<vue-pipeline-head></vue-pipeline-head> <pipeline-head></pipeline-head>
<tbody> <tbody>
<tr class="commit" v-for='pipeline in pipelines'> <tr class="commit" v-for='pipeline in pipelines'>
<vue-status-scope :pipeline='pipeline'></vue-status-scope> <status-scope :pipeline='pipeline'></status-scope>
<vue-pipeline-url :pipeline='pipeline'></vue-pipeline-url> <pipeline-url :pipeline='pipeline'></pipeline-url>
<vue-branch-commit :pipeline='pipeline'></vue-branch-commit> <branch-commit :pipeline='pipeline'></branch-commit>
<vue-stages :pipeline='pipeline'></vue-stages> <stages :pipeline='pipeline'></stages>
<vue-time-ago :pipeline='pipeline'></vue-time-ago> <time-ago :pipeline='pipeline'></time-ago>
<vue-pipeline-actions></vue-pipeline-actions> <pipeline-actions :pipeline='pipeline'></pipeline-actions>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</div> </div>
<vue-gl-pagination <gl-pagination
v-if='count.all > 0' v-if='count.all > 0'
:pagenum='pagenum' :pagenum='pagenum'
:changepage='changepage' :changepage='changepage'
:count='count.all' :count='count.all'
> >
</vue-gl-pagination> </gl-pagination>
</div> </div>
`, `,
}); });
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
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);
......
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