diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 09:08:42 +0000 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/assets/javascripts/pipelines/pipeline_details_bundle.js | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) | |
download | gitlab-ce-b76ae638462ab0f673e5915986070518dd3f9ad3.tar.gz |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/pipelines/pipeline_details_bundle.js')
-rw-r--r-- | app/assets/javascripts/pipelines/pipeline_details_bundle.js | 66 |
1 files changed, 6 insertions, 60 deletions
diff --git a/app/assets/javascripts/pipelines/pipeline_details_bundle.js b/app/assets/javascripts/pipelines/pipeline_details_bundle.js index e8d5ed175ba..c6e767d5424 100644 --- a/app/assets/javascripts/pipelines/pipeline_details_bundle.js +++ b/app/assets/javascripts/pipelines/pipeline_details_bundle.js @@ -3,15 +3,12 @@ import createFlash from '~/flash'; import { parseBoolean } from '~/lib/utils/common_utils'; import { __ } from '~/locale'; import Translate from '~/vue_shared/translate'; -import PipelineGraphLegacy from './components/graph/graph_component_legacy.vue'; import TestReports from './components/test_reports/test_reports.vue'; -import GraphBundleMixin from './mixins/graph_pipeline_bundle_mixin'; import createDagApp from './pipeline_details_dag'; import { createPipelinesDetailApp } from './pipeline_details_graph'; import { createPipelineHeaderApp } from './pipeline_details_header'; import { apolloProvider } from './pipeline_shared_client'; import createTestReportsStore from './stores/test_reports'; -import { reportToSentry } from './utils'; Vue.use(Translate); @@ -22,44 +19,6 @@ const SELECTORS = { PIPELINE_TESTS: '#js-pipeline-tests-detail', }; -const createLegacyPipelinesDetailApp = (mediator) => { - if (!document.querySelector(SELECTORS.PIPELINE_GRAPH)) { - return; - } - // eslint-disable-next-line no-new - new Vue({ - el: SELECTORS.PIPELINE_GRAPH, - components: { - PipelineGraphLegacy, - }, - mixins: [GraphBundleMixin], - data() { - return { - mediator, - }; - }, - errorCaptured(err, _vm, info) { - reportToSentry('pipeline_details_bundle_legacy_details', `error: ${err}, info: ${info}`); - }, - render(createElement) { - return createElement('pipeline-graph-legacy', { - props: { - isLoading: this.mediator.state.isLoading, - pipeline: this.mediator.store.state.pipeline, - mediator: this.mediator, - }, - on: { - refreshPipelineGraph: this.requestRefreshPipelineGraph, - onResetDownstream: (parentPipeline, pipeline) => - this.resetDownstreamPipelines(parentPipeline, pipeline), - onClickUpstreamPipeline: (pipeline) => this.clickUpstreamPipeline(pipeline), - onClickDownstreamPipeline: (pipeline) => this.clickDownstreamPipeline(pipeline), - }, - }); - }, - }); -}; - const createTestDetails = () => { const el = document.querySelector(SELECTORS.PIPELINE_TESTS); const { blobPath, emptyStateImagePath, hasTestReport, summaryEndpoint, suiteEndpoint } = @@ -88,9 +47,6 @@ const createTestDetails = () => { }; export default async function initPipelineDetailsBundle() { - const canShowNewPipelineDetails = - gon.features.graphqlPipelineDetails || gon.features.graphqlPipelineDetailsUsers; - const { dataset } = document.querySelector(SELECTORS.PIPELINE_DETAILS); try { @@ -101,22 +57,12 @@ export default async function initPipelineDetailsBundle() { }); } - if (canShowNewPipelineDetails) { - try { - createPipelinesDetailApp(SELECTORS.PIPELINE_GRAPH, apolloProvider, dataset); - } catch { - createFlash({ - message: __('An error occurred while loading the pipeline.'), - }); - } - } else { - const { default: PipelinesMediator } = await import( - /* webpackChunkName: 'PipelinesMediator' */ './pipeline_details_mediator' - ); - const mediator = new PipelinesMediator({ endpoint: dataset.endpoint }); - mediator.fetchPipeline(); - - createLegacyPipelinesDetailApp(mediator); + try { + createPipelinesDetailApp(SELECTORS.PIPELINE_GRAPH, apolloProvider, dataset); + } catch { + createFlash({ + message: __('An error occurred while loading the pipeline.'), + }); } createDagApp(apolloProvider); |