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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.1 KiB
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import Vue from 'vue';
2020-11-24 15:15:51 +05:30
import VueApollo from 'vue-apollo';
2021-03-11 19:13:27 +05:30
import createDefaultClient from '~/lib/graphql';
2022-06-21 17:19:12 +05:30
import Translate from '~/vue_shared/translate';
2021-03-11 19:13:27 +05:30
import environmentsFolderApp from './environments_folder_view.vue';
2018-03-17 18:26:18 +05:30
Vue.use(Translate);
2020-11-24 15:15:51 +05:30
Vue.use(VueApollo);
2017-08-17 22:00:37 +05:30
2020-11-24 15:15:51 +05:30
const apolloProvider = new VueApollo({
2021-12-11 22:18:48 +05:30
defaultClient: createDefaultClient(),
2020-11-24 15:15:51 +05:30
});
export default () => {
const el = document.getElementById('environments-folder-list-view');
return new Vue({
el,
2018-12-13 13:39:08 +05:30
components: {
environmentsFolderApp,
},
2020-11-24 15:15:51 +05:30
apolloProvider,
provide: {
projectPath: el.dataset.projectPath,
},
2018-12-13 13:39:08 +05:30
data() {
2020-11-24 15:15:51 +05:30
const environmentsData = 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,
};
},
render(createElement) {
return createElement('environments-folder-app', {
props: {
endpoint: this.endpoint,
folderName: this.folderName,
cssContainerClass: this.cssContainerClass,
},
});
},
});
2020-11-24 15:15:51 +05:30
};