Commit ea86d8f4 authored by Emily Ring's avatar Emily Ring

Moved environment_item_mixin out of ee folder

parent 22ef029a
......@@ -9,7 +9,6 @@ import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link
import CommitComponent from '~/vue_shared/components/commit.vue';
import Icon from '~/vue_shared/components/icon.vue';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate.vue';
import environmentItemMixin from 'ee_else_ce/environments/mixins/environment_item_mixin';
import eventHub from '../event_hub';
import ActionsComponent from './environment_actions.vue';
import ExternalUrlComponent from './environment_external_url.vue';
......@@ -44,7 +43,7 @@ export default {
directives: {
GlTooltip: GlTooltipDirective,
},
mixins: [environmentItemMixin, timeagoMixin],
mixins: [timeagoMixin],
props: {
canReadEnvironment: {
......@@ -65,6 +64,9 @@ export default {
},
computed: {
deployIconName() {
return this.model.isDeployBoardVisible ? 'chevron-down' : 'chevron-right';
},
/**
* Verifies if `last_deployment` key exists in the current Environment.
* This key is required to render most of the html - this method works has
......@@ -210,6 +212,10 @@ export default {
}));
},
shouldRenderDeployBoard() {
return this.model.hasDeployBoard;
},
/**
* Builds the string used in the user image alt attribute.
*
......@@ -501,6 +507,9 @@ export default {
},
methods: {
toggleDeployBoard() {
eventHub.$emit('toggleDeployBoard', this.model);
},
onClickFolder() {
eventHub.$emit('toggleFolder', this.model);
},
......
export default {
computed: {
deployIconName() {
return '';
},
shouldRenderDeployBoard() {
return false;
},
},
methods: {
toggleDeployBoard() {},
},
};
import eventHub from '~/environments/event_hub';
export default {
computed: {
deployIconName() {
return this.model.isDeployBoardVisible ? 'chevron-down' : 'chevron-right';
},
shouldRenderDeployBoard() {
return this.model.hasDeployBoard;
},
},
methods: {
toggleDeployBoard() {
eventHub.$emit('toggleDeployBoard', this.model);
},
},
};
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