Commit 03eaf018 authored by Andrew Fontaine's avatar Andrew Fontaine

Merge branch '276949-adjust-async-loading' into 'master'

Change loading, remove async on new graph

See merge request gitlab-org/gitlab!59187
parents 0067c3aa 02852646
...@@ -6,6 +6,8 @@ import PipelineGraphLegacy from './components/graph/graph_component_legacy.vue'; ...@@ -6,6 +6,8 @@ import PipelineGraphLegacy from './components/graph/graph_component_legacy.vue';
import TestReports from './components/test_reports/test_reports.vue'; import TestReports from './components/test_reports/test_reports.vue';
import GraphBundleMixin from './mixins/graph_pipeline_bundle_mixin'; import GraphBundleMixin from './mixins/graph_pipeline_bundle_mixin';
import createDagApp from './pipeline_details_dag'; 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 { apolloProvider } from './pipeline_shared_client';
import createTestReportsStore from './stores/test_reports'; import createTestReportsStore from './stores/test_reports';
import { reportToSentry } from './utils'; import { reportToSentry } from './utils';
...@@ -80,20 +82,19 @@ const createTestDetails = () => { ...@@ -80,20 +82,19 @@ const createTestDetails = () => {
}; };
export default async function initPipelineDetailsBundle() { export default async function initPipelineDetailsBundle() {
createTestDetails();
createDagApp(apolloProvider);
const canShowNewPipelineDetails = const canShowNewPipelineDetails =
gon.features.graphqlPipelineDetails || gon.features.graphqlPipelineDetailsUsers; gon.features.graphqlPipelineDetails || gon.features.graphqlPipelineDetailsUsers;
const { dataset } = document.querySelector(SELECTORS.PIPELINE_DETAILS); const { dataset } = document.querySelector(SELECTORS.PIPELINE_DETAILS);
if (canShowNewPipelineDetails) {
try { try {
const { createPipelinesDetailApp } = await import( createPipelineHeaderApp(SELECTORS.PIPELINE_HEADER, apolloProvider, dataset.graphqlResourceEtag);
/* webpackChunkName: 'createPipelinesDetailApp' */ './pipeline_details_graph' } catch {
); Flash(__('An error occurred while loading a section of this page.'));
}
if (canShowNewPipelineDetails) {
try {
createPipelinesDetailApp(SELECTORS.PIPELINE_GRAPH, apolloProvider, dataset); createPipelinesDetailApp(SELECTORS.PIPELINE_GRAPH, apolloProvider, dataset);
} catch { } catch {
Flash(__('An error occurred while loading the pipeline.')); Flash(__('An error occurred while loading the pipeline.'));
...@@ -108,12 +109,6 @@ export default async function initPipelineDetailsBundle() { ...@@ -108,12 +109,6 @@ export default async function initPipelineDetailsBundle() {
createLegacyPipelinesDetailApp(mediator); createLegacyPipelinesDetailApp(mediator);
} }
try { createDagApp(apolloProvider);
const { createPipelineHeaderApp } = await import( createTestDetails();
/* webpackChunkName: 'createPipelineHeaderApp' */ './pipeline_details_header'
);
createPipelineHeaderApp(SELECTORS.PIPELINE_HEADER, apolloProvider, dataset.graphqlResourceEtag);
} catch {
Flash(__('An error occurred while loading a section of this page.'));
}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment