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

38 lines
846 B
JavaScript
Raw Normal View History

2021-02-22 17:27:13 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
import createDefaultClient from '~/lib/graphql';
import PipelineGraphWrapper from './components/graph/graph_component_wrapper.vue';
import { GRAPHQL } from './components/graph/constants';
Vue.use(VueApollo);
const apolloProvider = new VueApollo({
defaultClient: createDefaultClient(
{},
{
batchMax: 2,
},
),
});
const createPipelinesDetailApp = (selector, pipelineProjectPath, pipelineIid) => {
// eslint-disable-next-line no-new
new Vue({
el: selector,
components: {
PipelineGraphWrapper,
},
apolloProvider,
provide: {
pipelineProjectPath,
pipelineIid,
dataMethod: GRAPHQL,
},
render(createElement) {
return createElement(PipelineGraphWrapper);
},
});
2021-01-29 00:20:46 +05:30
};
export { createPipelinesDetailApp };