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

39 lines
1 KiB
JavaScript
Raw Normal View History

2020-04-22 19:07:51 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import { parseBoolean } from '~/lib/utils/common_utils';
import App from './components/jira_import_app.vue';
Vue.use(VueApollo);
const defaultClient = createDefaultClient();
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: {
inProgressIllustration: el.dataset.inProgressIllustration,
isJiraConfigured: parseBoolean(el.dataset.isJiraConfigured),
issuesPath: el.dataset.issuesPath,
2020-05-24 23:13:21 +05:30
jiraIntegrationPath: el.dataset.jiraIntegrationPath,
2020-07-28 23:09:34 +05:30
projectId: el.dataset.projectId,
2020-04-22 19:07:51 +05:30
projectPath: el.dataset.projectPath,
setupIllustration: el.dataset.setupIllustration,
},
});
},
});
}