diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-28 21:09:35 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-28 21:09:35 +0000 |
commit | abe11a6a2c04112d0b7d6d4facfd0c8370f51831 (patch) | |
tree | b0c9e9e019417e7b438bf24c6a4a28acfc0fd95b /app/assets/javascripts | |
parent | 95e18e32833de71b46d73ead66c8f13e261af3f4 (diff) | |
download | gitlab-ce-abe11a6a2c04112d0b7d6d4facfd0c8370f51831.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
5 files changed, 50 insertions, 34 deletions
diff --git a/app/assets/javascripts/environments/folder/environments_folder_bundle.js b/app/assets/javascripts/environments/folder/environments_folder_bundle.js index c1bfe8d05fe..56896ac4d43 100644 --- a/app/assets/javascripts/environments/folder/environments_folder_bundle.js +++ b/app/assets/javascripts/environments/folder/environments_folder_bundle.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import canaryCalloutMixin from 'ee_else_ce/environments/mixins/canary_callout_mixin'; +import canaryCalloutMixin from '../mixins/canary_callout_mixin'; import environmentsFolderApp from './environments_folder_view.vue'; import { parseBoolean } from '../../lib/utils/common_utils'; import Translate from '../../vue_shared/translate'; diff --git a/app/assets/javascripts/environments/folder/environments_folder_view.vue b/app/assets/javascripts/environments/folder/environments_folder_view.vue index 30b02585692..e1e356a977f 100644 --- a/app/assets/javascripts/environments/folder/environments_folder_view.vue +++ b/app/assets/javascripts/environments/folder/environments_folder_view.vue @@ -1,5 +1,4 @@ <script> -import folderMixin from 'ee_else_ce/environments/mixins/environments_folder_view_mixin'; import environmentsMixin from '../mixins/environments_mixin'; import CIPaginationMixin from '../../vue_shared/mixins/ci_pagination_api_mixin'; import StopEnvironmentModal from '../components/stop_environment_modal.vue'; @@ -11,7 +10,7 @@ export default { DeleteEnvironmentModal, }, - mixins: [environmentsMixin, CIPaginationMixin, folderMixin], + mixins: [environmentsMixin, CIPaginationMixin], props: { endpoint: { @@ -30,6 +29,31 @@ export default { type: Boolean, required: true, }, + canaryDeploymentFeatureId: { + type: String, + required: false, + default: '', + }, + showCanaryDeploymentCallout: { + type: Boolean, + required: false, + default: false, + }, + userCalloutsPath: { + type: String, + required: false, + default: '', + }, + lockPromotionSvgPath: { + type: String, + required: false, + default: '', + }, + helpCanaryDeploymentsPath: { + type: String, + required: false, + default: '', + }, }, methods: { successCallback(resp) { diff --git a/app/assets/javascripts/environments/index.js b/app/assets/javascripts/environments/index.js index 9a68619d4f7..4848cb0f13d 100644 --- a/app/assets/javascripts/environments/index.js +++ b/app/assets/javascripts/environments/index.js @@ -1,5 +1,5 @@ import Vue from 'vue'; -import canaryCalloutMixin from 'ee_else_ce/environments/mixins/canary_callout_mixin'; +import canaryCalloutMixin from './mixins/canary_callout_mixin'; import environmentsComponent from './components/environments_app.vue'; import { parseBoolean } from '../lib/utils/common_utils'; import Translate from '../vue_shared/translate'; diff --git a/app/assets/javascripts/environments/mixins/canary_callout_mixin.js b/app/assets/javascripts/environments/mixins/canary_callout_mixin.js index f6d3d67b777..398576a31cb 100644 --- a/app/assets/javascripts/environments/mixins/canary_callout_mixin.js +++ b/app/assets/javascripts/environments/mixins/canary_callout_mixin.js @@ -1,5 +1,26 @@ +import { parseBoolean } from '~/lib/utils/common_utils'; + export default { + data() { + const data = document.querySelector(this.$options.el).dataset; + + return { + canaryDeploymentFeatureId: data.environmentsDataCanaryDeploymentFeatureId, + showCanaryDeploymentCallout: parseBoolean(data.environmentsDataShowCanaryDeploymentCallout), + userCalloutsPath: data.environmentsDataUserCalloutsPath, + lockPromotionSvgPath: data.environmentsDataLockPromotionSvgPath, + helpCanaryDeploymentsPath: data.environmentsDataHelpCanaryDeploymentsPath, + }; + }, computed: { - canaryCalloutProps() {}, + canaryCalloutProps() { + return { + canaryDeploymentFeatureId: this.canaryDeploymentFeatureId, + showCanaryDeploymentCallout: this.showCanaryDeploymentCallout, + userCalloutsPath: this.userCalloutsPath, + lockPromotionSvgPath: this.lockPromotionSvgPath, + helpCanaryDeploymentsPath: this.helpCanaryDeploymentsPath, + }; + }, }, }; diff --git a/app/assets/javascripts/environments/mixins/environments_folder_view_mixin.js b/app/assets/javascripts/environments/mixins/environments_folder_view_mixin.js deleted file mode 100644 index e793a7cadf2..00000000000 --- a/app/assets/javascripts/environments/mixins/environments_folder_view_mixin.js +++ /dev/null @@ -1,29 +0,0 @@ -export default { - props: { - canaryDeploymentFeatureId: { - type: String, - required: false, - default: '', - }, - showCanaryDeploymentCallout: { - type: Boolean, - required: false, - default: false, - }, - userCalloutsPath: { - type: String, - required: false, - default: '', - }, - lockPromotionSvgPath: { - type: String, - required: false, - default: '', - }, - helpCanaryDeploymentsPath: { - type: String, - required: false, - default: '', - }, - }, -}; |