debian-mirror-gitlab/app/assets/javascripts/environments/mixins/canary_callout_mixin.js

27 lines
941 B
JavaScript
Raw Normal View History

2020-05-24 23:13:21 +05:30
import { parseBoolean } from '~/lib/utils/common_utils';
2019-07-07 11:18:12 +05:30
export default {
2020-05-24 23:13:21 +05:30
data() {
2020-11-24 15:15:51 +05:30
const data = this.$options.el.dataset;
2020-05-24 23:13:21 +05:30
return {
canaryDeploymentFeatureId: data.environmentsDataCanaryDeploymentFeatureId,
showCanaryDeploymentCallout: parseBoolean(data.environmentsDataShowCanaryDeploymentCallout),
userCalloutsPath: data.environmentsDataUserCalloutsPath,
lockPromotionSvgPath: data.environmentsDataLockPromotionSvgPath,
helpCanaryDeploymentsPath: data.environmentsDataHelpCanaryDeploymentsPath,
};
},
2019-07-07 11:18:12 +05:30
computed: {
2020-05-24 23:13:21 +05:30
canaryCalloutProps() {
return {
canaryDeploymentFeatureId: this.canaryDeploymentFeatureId,
showCanaryDeploymentCallout: this.showCanaryDeploymentCallout,
userCalloutsPath: this.userCalloutsPath,
lockPromotionSvgPath: this.lockPromotionSvgPath,
helpCanaryDeploymentsPath: this.helpCanaryDeploymentsPath,
};
},
2019-07-07 11:18:12 +05:30
},
};