Commit 4d52fbba authored by Simon Knox's avatar Simon Knox

Prevent echarts from loading on MR page

Lazy load memory usage component only when we have
data for the chart.
Previously we were lazy importing the deployment
component, but that meant that the charts were loaded
every time (even when the deployments were collapsed)
parent 45da3d6d
......@@ -12,13 +12,12 @@ import {
CANCELED,
SKIPPED,
} from './constants';
import MemoryUsage from './memory_usage.vue';
export default {
name: 'DeploymentInfo',
components: {
GlLink,
MemoryUsage,
MemoryUsage: () => import('./memory_usage.vue'),
TooltipOnTruncate,
},
directives: {
......
......@@ -2,10 +2,11 @@
import { GlSprintf } from '@gitlab/ui';
import { n__ } from '~/locale';
import MrCollapsibleExtension from '../mr_collapsible_extension.vue';
import Deployment from './deployment.vue';
export default {
components: {
Deployment: () => import('./deployment.vue'),
Deployment,
GlSprintf,
MrCollapsibleExtension,
},
......
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