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