2017-08-17 22:00:37 +05:30
|
|
|
import Vue from 'vue';
|
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,
|
|
|
|
},
|
|
|
|
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 {
|
|
|
|
endpoint: environmentsData.endpoint,
|
|
|
|
folderName: environmentsData.folderName,
|
|
|
|
cssContainerClass: environmentsData.cssClass,
|
2019-02-15 15:39:39 +05:30
|
|
|
canCreateDeployment: parseBoolean(environmentsData.canCreateDeployment),
|
|
|
|
canReadEnvironment: parseBoolean(environmentsData.canReadEnvironment),
|
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,
|
|
|
|
canCreateDeployment: this.canCreateDeployment,
|
|
|
|
canReadEnvironment: this.canReadEnvironment,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|