Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-02-09 17:49:13 +0300
committerFilipa Lacerda <filipa@gitlab.com>2017-02-12 16:58:23 +0300
commitfb35980893f918f7dbad0f433447c6df13a1c757 (patch)
treeb71a6ade92eab8608cbd89eb76c3ac6e482b98ea /app/assets/javascripts/environments
parent991a7ae86055df2d0eb619e1d29a1e24e322c741 (diff)
Verify `latest` key is present when needed
Diffstat (limited to 'app/assets/javascripts/environments')
-rw-r--r--app/assets/javascripts/environments/components/environment_item.js.es612
1 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/environments/components/environment_item.js.es6 b/app/assets/javascripts/environments/components/environment_item.js.es6
index 7805152b173..d3ca4cb8dde 100644
--- a/app/assets/javascripts/environments/components/environment_item.js.es6
+++ b/app/assets/javascripts/environments/components/environment_item.js.es6
@@ -355,6 +355,18 @@ module.exports = Vue.component('environment-item', {
!this.$options.isObjectEmpty(this.model.latest.last_deployment.deployable);
},
+ buildPath(){
+ return this.model.latest &&
+ this.model.latest.last_deployment &&
+ this.model.latest.last_deployment.deployable &&
+ this.model.latest.last_deployment.deployable.build_path ||
+ '';
+ },
+
+ externalURL() {
+ return this.model.latest && this.model.latest.external_url || '';
+ },
+
/**
* Verifies the presence of all the keys needed to render the buil_path.
*