Commit db1f9ca0 authored by Emily Ring's avatar Emily Ring Committed by Natalia Tepluhina

Removed undeeded vue mixin

Combine environments_table_mixin.js with environments_table.vue
parent f79ec5e6
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
*/ */
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon } from '@gitlab/ui';
import { flow, reverse, sortBy } from 'lodash/fp'; import { flow, reverse, sortBy } from 'lodash/fp';
import environmentTableMixin from 'ee_else_ce/environments/mixins/environments_table_mixin';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import EnvironmentItem from './environment_item.vue'; import EnvironmentItem from './environment_item.vue';
...@@ -16,7 +15,6 @@ export default { ...@@ -16,7 +15,6 @@ export default {
CanaryDeploymentCallout: () => CanaryDeploymentCallout: () =>
import('ee_component/environments/components/canary_deployment_callout.vue'), import('ee_component/environments/components/canary_deployment_callout.vue'),
}, },
mixins: [environmentTableMixin],
props: { props: {
environments: { environments: {
type: Array, type: Array,
...@@ -33,6 +31,31 @@ export default { ...@@ -33,6 +31,31 @@ export default {
required: false, required: false,
default: false, default: false,
}, },
canaryDeploymentFeatureId: {
type: String,
required: false,
default: '',
},
helpCanaryDeploymentsPath: {
type: String,
required: false,
default: '',
},
lockPromotionSvgPath: {
type: String,
required: false,
default: '',
},
showCanaryDeploymentCallout: {
type: Boolean,
required: false,
default: false,
},
userCalloutsPath: {
type: String,
required: false,
default: '',
},
}, },
computed: { computed: {
sortedEnvironments() { sortedEnvironments() {
...@@ -79,9 +102,15 @@ export default { ...@@ -79,9 +102,15 @@ export default {
folderUrl(model) { folderUrl(model) {
return `${window.location.pathname}/folders/${model.folderName}`; return `${window.location.pathname}/folders/${model.folderName}`;
}, },
shouldRenderDeployBoard(model) {
return model.hasDeployBoard && model.isDeployBoardVisible;
},
shouldRenderFolderContent(env) { shouldRenderFolderContent(env) {
return env.isFolder && env.isOpen && env.children && env.children.length > 0; return env.isFolder && env.isOpen && env.children && env.children.length > 0;
}, },
shouldShowCanaryCallout(env) {
return env.showCanaryCallout && this.showCanaryDeploymentCallout;
},
sortEnvironments(environments) { sortEnvironments(environments) {
/* /*
* The sorting algorithm should sort in the following priorities: * The sorting algorithm should sort in the following priorities:
......
export default {
methods: {
shouldShowCanaryCallout() {
return false;
},
shouldRenderDeployBoard() {
return false;
},
},
};
export default {
props: {
canaryDeploymentFeatureId: {
type: String,
required: true,
},
showCanaryDeploymentCallout: {
type: Boolean,
required: true,
},
userCalloutsPath: {
type: String,
required: true,
},
lockPromotionSvgPath: {
type: String,
required: true,
},
helpCanaryDeploymentsPath: {
type: String,
required: true,
},
},
methods: {
shouldShowCanaryCallout(env) {
return env.showCanaryCallout && this.showCanaryDeploymentCallout;
},
shouldRenderDeployBoard(model) {
return model.hasDeployBoard && model.isDeployBoardVisible;
},
},
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment