summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRegis <boudinot.regis@yahoo.com>2016-12-16 15:46:15 -0700
committerRegis <boudinot.regis@yahoo.com>2016-12-16 15:46:15 -0700
commit1e237c9f906460ee13155ee63f91f42bb8f93d3a (patch)
treec361970dd3101bd6679493a6c2a95ea3f3d09e9c
parentb08f92928058b395d2d6666b13ccb113bd78efbf (diff)
downloadgitlab-ce-1e237c9f906460ee13155ee63f91f42bb8f93d3a.tar.gz
computed for actions and artifacts
-rw-r--r--app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es612
1 files changed, 10 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6 b/app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6
index 24640ba5fb8..491403c8b59 100644
--- a/app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6
+++ b/app/assets/javascripts/vue_pipelines_index/pipeline_actions.js.es6
@@ -6,6 +6,14 @@
props: [
'pipeline',
],
+ computed: {
+ actions() {
+ return this.pipeline.details.manual_actions.length > 0;
+ },
+ artifacts() {
+ return this.pipeline.details.artifacts.length > 0;
+ },
+ },
methods: {
download(name) {
return `Download ${name} artifacts`;
@@ -17,7 +25,7 @@
<div class="btn-group inline">
<div class="btn-group">
<a
- v-if='pipeline.details.manual_actions.length > 0'
+ v-if='actions'
class="dropdown-toggle btn btn-default js-pipeline-dropdown-manual-actions"
data-toggle="dropdown"
title="Manual build"
@@ -54,7 +62,7 @@
</div>
<div class="btn-group">
<a
- v-if='pipeline.details.artifacts.length > 0'
+ v-if='artifacts'
class="dropdown-toggle btn btn-default build-artifacts js-pipeline-dropdown-download"
data-toggle="dropdown"
type="button"