Commit 1e237c9f authored by Regis's avatar Regis

computed for actions and artifacts

parent b08f9292
...@@ -6,6 +6,14 @@ ...@@ -6,6 +6,14 @@
props: [ props: [
'pipeline', 'pipeline',
], ],
computed: {
actions() {
return this.pipeline.details.manual_actions.length > 0;
},
artifacts() {
return this.pipeline.details.artifacts.length > 0;
},
},
methods: { methods: {
download(name) { download(name) {
return `Download ${name} artifacts`; return `Download ${name} artifacts`;
...@@ -17,7 +25,7 @@ ...@@ -17,7 +25,7 @@
<div class="btn-group inline"> <div class="btn-group inline">
<div class="btn-group"> <div class="btn-group">
<a <a
v-if='pipeline.details.manual_actions.length > 0' v-if='actions'
class="dropdown-toggle btn btn-default js-pipeline-dropdown-manual-actions" class="dropdown-toggle btn btn-default js-pipeline-dropdown-manual-actions"
data-toggle="dropdown" data-toggle="dropdown"
title="Manual build" title="Manual build"
...@@ -54,7 +62,7 @@ ...@@ -54,7 +62,7 @@
</div> </div>
<div class="btn-group"> <div class="btn-group">
<a <a
v-if='pipeline.details.artifacts.length > 0' v-if='artifacts'
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download" class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
data-toggle="dropdown" data-toggle="dropdown"
type="button" type="button"
......
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