2017-04-27 10:06:17 -04:00
|
|
|
import Vue from 'vue';
|
2020-04-28 17:09:35 -04:00
|
|
|
import canaryCalloutMixin from '../mixins/canary_callout_mixin';
|
2017-11-23 07:04:03 -05:00
|
|
|
import environmentsFolderApp from './environments_folder_view.vue';
|
2018-11-21 10:13:04 -05:00
|
|
|
import { parseBoolean } from '../../lib/utils/common_utils';
|
2017-11-23 07:04:03 -05:00
|
|
|
import Translate from '../../vue_shared/translate';
|
|
|
|
|
|
|
|
Vue.use(Translate);
|
2017-02-12 09:55:18 -05:00
|
|
|
|
2018-10-10 02:18:49 -04:00
|
|
|
export default () =>
|
|
|
|
new Vue({
|
|
|
|
el: '#environments-folder-list-view',
|
|
|
|
components: {
|
|
|
|
environmentsFolderApp,
|
|
|
|
},
|
2019-03-14 12:21:23 -04:00
|
|
|
mixins: [canaryCalloutMixin],
|
2018-10-10 02:18:49 -04:00
|
|
|
data() {
|
|
|
|
const environmentsData = document.querySelector(this.$options.el).dataset;
|
2017-11-23 07:04:03 -05:00
|
|
|
|
2018-10-10 02:18:49 -04:00
|
|
|
return {
|
2019-01-11 11:14:49 -05:00
|
|
|
endpoint: environmentsData.environmentsDataEndpoint,
|
|
|
|
folderName: environmentsData.environmentsDataFolderName,
|
2018-10-10 02:18:49 -04:00
|
|
|
cssContainerClass: environmentsData.cssClass,
|
2019-01-11 11:14:49 -05:00
|
|
|
canReadEnvironment: parseBoolean(environmentsData.environmentsDataCanReadEnvironment),
|
2018-10-10 02:18:49 -04:00
|
|
|
};
|
|
|
|
},
|
|
|
|
render(createElement) {
|
|
|
|
return createElement('environments-folder-app', {
|
|
|
|
props: {
|
|
|
|
endpoint: this.endpoint,
|
|
|
|
folderName: this.folderName,
|
|
|
|
cssContainerClass: this.cssContainerClass,
|
|
|
|
canReadEnvironment: this.canReadEnvironment,
|
2019-03-14 12:21:23 -04:00
|
|
|
...this.canaryCalloutProps,
|
2018-10-10 02:18:49 -04:00
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|