File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
x-pack/plugins/infra/public Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import { useLogStream } from '../../containers/logs/log_stream';
1717
1818import { ScrollableLogTextStreamView } from '../logging/log_text_stream' ;
1919
20- interface LogStreamProps {
20+ export interface LogStreamProps {
2121 sourceId ?: string ;
2222 startTimestamp : number ;
2323 endTimestamp : number ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+ * or more contributor license agreements. Licensed under the Elastic License;
4+ * you may not use this file except in compliance with the Elastic License.
5+ */
6+
7+ import React from 'react' ;
8+ import type { LogStreamProps } from './' ;
9+
10+ const LazyLogStream = React . lazy ( ( ) => import ( './' ) ) ;
11+
12+ export const LazyLogStreamWrapper : React . FC < LogStreamProps > = ( props ) => (
13+ < React . Suspense fallback = { < div /> } >
14+ < LazyLogStream { ...props } />
15+ </ React . Suspense >
16+ ) ;
Original file line number Diff line number Diff line change 33 * or more contributor license agreements. Licensed under the Elastic License;
44 * you may not use this file except in compliance with the Elastic License.
55 */
6- import { lazy } from 'react' ;
76import { PluginInitializer , PluginInitializerContext } from 'kibana/public' ;
87import { Plugin } from './plugin' ;
98import {
@@ -28,4 +27,4 @@ export { InfraFormatterType } from './lib/lib';
2827export type InfraAppId = 'logs' | 'metrics' ;
2928
3029// Shared components
31- export const LogStream = lazy ( ( ) => import ( './components/log_stream' ) ) ;
30+ export { LazyLogStreamWrapper as LogStream } from './components/log_stream/lazy_log_stream_wrapper' ;
You can’t perform that action at this time.
0 commit comments