debian-mirror-gitlab/app/assets/javascripts/pipelines/pipeline_details_dag.js

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

43 lines
742 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import Dag from './components/dag/dag.vue';
Vue.use(VueApollo);
2021-04-29 21:17:54 +05:30
const createDagApp = (apolloProvider) => {
2021-01-29 00:20:46 +05:30
const el = document.querySelector('#js-pipeline-dag-vue');
2021-03-11 19:13:27 +05:30
if (!el) {
2020-10-24 23:57:45 +05:30
return;
}
2021-01-29 00:20:46 +05:30
const {
aboutDagDocPath,
dagDocPath,
emptySvgPath,
pipelineProjectPath,
pipelineIid,
} = el?.dataset;
2020-10-24 23:57:45 +05:30
// eslint-disable-next-line no-new
new Vue({
el,
components: {
Dag,
},
apolloProvider,
provide: {
2021-01-29 00:20:46 +05:30
aboutDagDocPath,
dagDocPath,
emptySvgPath,
2020-10-24 23:57:45 +05:30
pipelineProjectPath,
pipelineIid,
},
render(createElement) {
return createElement('dag', {});
},
});
};
export default createDagApp;