2020-04-07 08:09:34 -04:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueApollo from 'vue-apollo';
|
|
|
|
import createDefaultClient from '~/lib/graphql';
|
2020-04-09 14:09:34 -04:00
|
|
|
import { parseBoolean } from '~/lib/utils/common_utils';
|
2020-04-07 08:09:34 -04:00
|
|
|
import App from './components/jira_import_app.vue';
|
|
|
|
|
|
|
|
Vue.use(VueApollo);
|
|
|
|
|
2020-09-25 05:09:40 -04:00
|
|
|
const defaultClient = createDefaultClient({}, { assumeImmutableResults: true });
|
2020-04-07 08:09:34 -04:00
|
|
|
|
|
|
|
const apolloProvider = new VueApollo({
|
|
|
|
defaultClient,
|
|
|
|
});
|
|
|
|
|
|
|
|
export default function mountJiraImportApp() {
|
|
|
|
const el = document.querySelector('.js-jira-import-root');
|
|
|
|
if (!el) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return new Vue({
|
|
|
|
el,
|
|
|
|
apolloProvider,
|
|
|
|
render(createComponent) {
|
|
|
|
return createComponent(App, {
|
|
|
|
props: {
|
2020-04-21 11:21:10 -04:00
|
|
|
inProgressIllustration: el.dataset.inProgressIllustration,
|
2020-04-09 14:09:34 -04:00
|
|
|
isJiraConfigured: parseBoolean(el.dataset.isJiraConfigured),
|
2020-04-21 11:21:10 -04:00
|
|
|
issuesPath: el.dataset.issuesPath,
|
2020-04-23 08:09:46 -04:00
|
|
|
jiraIntegrationPath: el.dataset.jiraIntegrationPath,
|
2020-07-15 11:09:21 -04:00
|
|
|
projectId: el.dataset.projectId,
|
2020-04-07 08:09:34 -04:00
|
|
|
projectPath: el.dataset.projectPath,
|
2020-04-09 14:09:34 -04:00
|
|
|
setupIllustration: el.dataset.setupIllustration,
|
2020-04-07 08:09:34 -04:00
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
}
|