summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/environments/components/environments_table.vue
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-12-15 21:09:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-15 21:09:53 +0000
commite32167eb636d14acd5e431ccc1e367f9a57d8a4e (patch)
tree6abf2993e8ec10e2690c6b2fcda55cbc8fba3a57 /app/assets/javascripts/environments/components/environments_table.vue
parentb07852468f800d751ddecc9e327119d7295f538e (diff)
downloadgitlab-ce-e32167eb636d14acd5e431ccc1e367f9a57d8a4e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/environments/components/environments_table.vue')
-rw-r--r--app/assets/javascripts/environments/components/environments_table.vue15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/environments/components/environments_table.vue b/app/assets/javascripts/environments/components/environments_table.vue
index 3cfff686c01..d13c7204285 100644
--- a/app/assets/javascripts/environments/components/environments_table.vue
+++ b/app/assets/javascripts/environments/components/environments_table.vue
@@ -15,6 +15,7 @@ export default {
CanaryDeploymentCallout: () =>
import('ee_component/environments/components/canary_deployment_callout.vue'),
EnvironmentAlert: () => import('ee_component/environments/components/environment_alert.vue'),
+ CanaryUpdateModal: () => import('ee_component/environments/components/canary_update_modal.vue'),
},
props: {
environments: {
@@ -58,6 +59,12 @@ export default {
default: '',
},
},
+ data() {
+ return {
+ canaryWeight: 0,
+ environmentToChange: null,
+ };
+ },
computed: {
sortedEnvironments() {
return this.sortEnvironments(this.environments).map(env =>
@@ -144,11 +151,16 @@ export default {
sortBy(env => (env.isFolder ? -1 : 1)),
)(environments);
},
+ changeCanaryWeight(model, weight) {
+ this.environmentToChange = model;
+ this.canaryWeight = weight;
+ },
},
};
</script>
<template>
<div class="ci-table" role="grid">
+ <canary-update-modal :environment="environmentToChange" :weight="canaryWeight" />
<div class="gl-responsive-table-row table-row-header" role="row">
<div class="table-section" :class="tableData.name.spacing" role="columnheader">
{{ tableData.name.title }}
@@ -179,6 +191,7 @@ export default {
:model="model"
:can-read-environment="canReadEnvironment"
:table-data="tableData"
+ data-qa-selector="environment_item"
/>
<div
@@ -193,6 +206,7 @@ export default {
:is-loading="model.isLoadingDeployBoard"
:is-empty="model.isEmptyDeployBoard"
:logs-path="model.logs_path"
+ @changeCanaryWeight="changeCanaryWeight(model, $event)"
/>
</div>
</div>
@@ -215,6 +229,7 @@ export default {
:model="children"
:can-read-environment="canReadEnvironment"
:table-data="tableData"
+ data-qa-selector="environment_item"
/>
<div :key="`sub-div-${i}`">