debian-mirror-gitlab/app/assets/javascripts/environments/folder/environments_folder_bundle.js

38 lines
1.2 KiB
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2020-05-24 23:13:21 +05:30
import canaryCalloutMixin from '../mixins/canary_callout_mixin';
2018-03-17 18:26:18 +05:30
import environmentsFolderApp from './environments_folder_view.vue';
2019-02-15 15:39:39 +05:30
import { parseBoolean } from '../../lib/utils/common_utils';
2018-03-17 18:26:18 +05:30
import Translate from '../../vue_shared/translate';
Vue.use(Translate);
2017-08-17 22:00:37 +05:30
2018-12-13 13:39:08 +05:30
export default () =>
new Vue({
el: '#environments-folder-list-view',
components: {
environmentsFolderApp,
},
2019-05-18 00:54:41 +05:30
mixins: [canaryCalloutMixin],
2018-12-13 13:39:08 +05:30
data() {
const environmentsData = document.querySelector(this.$options.el).dataset;
2018-03-17 18:26:18 +05:30
2018-12-13 13:39:08 +05:30
return {
2019-03-02 22:35:43 +05:30
endpoint: environmentsData.environmentsDataEndpoint,
folderName: environmentsData.environmentsDataFolderName,
2018-12-13 13:39:08 +05:30
cssContainerClass: environmentsData.cssClass,
2019-03-02 22:35:43 +05:30
canReadEnvironment: parseBoolean(environmentsData.environmentsDataCanReadEnvironment),
2018-12-13 13:39:08 +05:30
};
},
render(createElement) {
return createElement('environments-folder-app', {
props: {
endpoint: this.endpoint,
folderName: this.folderName,
cssContainerClass: this.cssContainerClass,
canReadEnvironment: this.canReadEnvironment,
2019-05-18 00:54:41 +05:30
...this.canaryCalloutProps,
2018-12-13 13:39:08 +05:30
},
});
},
});