2020-11-27 15:09:34 +00:00
|
|
|
import Vue from 'vue';
|
|
|
|
import VueApollo from 'vue-apollo';
|
2021-02-14 18:09:20 +00:00
|
|
|
import PipelineGraphWrapper from './components/graph/graph_component_wrapper.vue';
|
2021-03-26 18:09:16 +00:00
|
|
|
import { reportToSentry } from './utils';
|
2020-11-27 15:09:34 +00:00
|
|
|
|
|
|
|
Vue.use(VueApollo);
|
|
|
|
|
2021-03-02 18:11:20 +00:00
|
|
|
const createPipelinesDetailApp = (
|
|
|
|
selector,
|
2021-03-16 09:11:17 +00:00
|
|
|
apolloProvider,
|
2021-03-02 18:11:20 +00:00
|
|
|
{ pipelineProjectPath, pipelineIid, metricsPath, graphqlResourceEtag } = {},
|
|
|
|
) => {
|
2020-11-27 15:09:34 +00:00
|
|
|
// eslint-disable-next-line no-new
|
|
|
|
new Vue({
|
|
|
|
el: selector,
|
|
|
|
components: {
|
|
|
|
PipelineGraphWrapper,
|
|
|
|
},
|
|
|
|
apolloProvider,
|
|
|
|
provide: {
|
2021-02-18 18:10:41 +00:00
|
|
|
metricsPath,
|
2020-11-27 15:09:34 +00:00
|
|
|
pipelineProjectPath,
|
|
|
|
pipelineIid,
|
2021-03-02 18:11:20 +00:00
|
|
|
graphqlResourceEtag,
|
2020-11-27 15:09:34 +00:00
|
|
|
},
|
2021-01-11 21:10:36 +00:00
|
|
|
errorCaptured(err, _vm, info) {
|
|
|
|
reportToSentry('pipeline_details_graph', `error: ${err}, info: ${info}`);
|
|
|
|
},
|
2020-11-27 15:09:34 +00:00
|
|
|
render(createElement) {
|
|
|
|
return createElement(PipelineGraphWrapper);
|
|
|
|
},
|
|
|
|
});
|
2020-11-12 18:09:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export { createPipelinesDetailApp };
|