debian-mirror-gitlab/app/assets/javascripts/terraform/index.js

33 lines
737 B
JavaScript
Raw Normal View History

2021-01-29 00:20:46 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import TerraformList from './components/terraform_list.vue';
import createDefaultClient from '~/lib/graphql';
Vue.use(VueApollo);
export default () => {
const el = document.querySelector('#js-terraform-list');
if (!el) {
return null;
}
const defaultClient = createDefaultClient();
const { emptyStateImage, projectPath } = el.dataset;
return new Vue({
el,
apolloProvider: new VueApollo({ defaultClient }),
render(createElement) {
return createElement(TerraformList, {
props: {
emptyStateImage,
projectPath,
2021-02-22 17:27:13 +05:30
terraformAdmin: el.hasAttribute('data-terraform-admin'),
2021-01-29 00:20:46 +05:30
},
});
},
});
};