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

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

36 lines
866 B
JavaScript
Raw Normal View History

2021-02-22 17:27:13 +05:30
import Vue from 'vue';
import VueApollo from 'vue-apollo';
2021-03-11 19:13:27 +05:30
import PipelineGraphWrapper from './components/graph/graph_component_wrapper.vue';
2021-04-29 21:17:54 +05:30
import { reportToSentry } from './utils';
2021-02-22 17:27:13 +05:30
Vue.use(VueApollo);
2021-04-17 20:07:23 +05:30
const createPipelinesDetailApp = (
selector,
2021-04-29 21:17:54 +05:30
apolloProvider,
2021-04-17 20:07:23 +05:30
{ pipelineProjectPath, pipelineIid, metricsPath, graphqlResourceEtag } = {},
) => {
2021-02-22 17:27:13 +05:30
// eslint-disable-next-line no-new
new Vue({
el: selector,
components: {
PipelineGraphWrapper,
},
apolloProvider,
provide: {
2021-04-17 20:07:23 +05:30
metricsPath,
2021-02-22 17:27:13 +05:30
pipelineProjectPath,
pipelineIid,
2021-04-17 20:07:23 +05:30
graphqlResourceEtag,
2021-02-22 17:27:13 +05:30
},
2021-03-08 18:12:59 +05:30
errorCaptured(err, _vm, info) {
reportToSentry('pipeline_details_graph', `error: ${err}, info: ${info}`);
},
2021-02-22 17:27:13 +05:30
render(createElement) {
return createElement(PipelineGraphWrapper);
},
});
2021-01-29 00:20:46 +05:30
};
export { createPipelinesDetailApp };