2021-03-11 19:13:27 +05:30
|
|
|
import Vue from 'vue';
|
|
|
|
import VueApollo from 'vue-apollo';
|
|
|
|
import createDefaultClient from '~/lib/graphql';
|
|
|
|
import SecurityConfigurationApp from './components/app.vue';
|
|
|
|
|
|
|
|
export const initStaticSecurityConfiguration = (el) => {
|
|
|
|
if (!el) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
Vue.use(VueApollo);
|
|
|
|
|
|
|
|
const apolloProvider = new VueApollo({
|
|
|
|
defaultClient: createDefaultClient(),
|
|
|
|
});
|
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
const { projectPath, upgradePath } = el.dataset;
|
2021-03-11 19:13:27 +05:30
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
apolloProvider,
|
|
|
|
provide: {
|
|
|
|
projectPath,
|
2021-04-17 20:07:23 +05:30
|
|
|
upgradePath,
|
2021-03-11 19:13:27 +05:30
|
|
|
},
|
|
|
|
render(createElement) {
|
|
|
|
return createElement(SecurityConfigurationApp);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|