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:
Diffstat (limited to 'app/assets/javascripts/environments/components/canary_ingress.vue')
-rw-r--r--app/assets/javascripts/environments/components/canary_ingress.vue15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/assets/javascripts/environments/components/canary_ingress.vue b/app/assets/javascripts/environments/components/canary_ingress.vue
index 02d660a91c1..30f3f9dfc75 100644
--- a/app/assets/javascripts/environments/components/canary_ingress.vue
+++ b/app/assets/javascripts/environments/components/canary_ingress.vue
@@ -17,6 +17,11 @@ export default {
required: true,
type: Object,
},
+ graphql: {
+ required: false,
+ type: Boolean,
+ default: false,
+ },
},
ingressOptions: Array(100 / 5 + 1)
.fill(0)
@@ -47,11 +52,17 @@ export default {
canaryWeightId() {
return uniqueId('canary-weight-');
},
+ weight() {
+ if (this.graphql) {
+ return this.canaryIngress.canaryWeight;
+ }
+ return this.canaryIngress.canary_weight;
+ },
stableWeight() {
- return (100 - this.canaryIngress.canary_weight).toString();
+ return (100 - this.weight).toString();
},
canaryWeight() {
- return this.canaryIngress.canary_weight.toString();
+ return this.weight.toString();
},
},
methods: {