mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 01:13:23 -04:00
[customIntegrations] async load all components (#145166)
This commit is contained in:
parent
fdfeda4192
commit
565ccacf6b
3 changed files with 21 additions and 8 deletions
|
@ -20,7 +20,7 @@ pageLoadAssetSize:
|
|||
controls: 40000
|
||||
core: 435325
|
||||
crossClusterReplication: 65408
|
||||
customIntegrations: 44305
|
||||
customIntegrations: 22034
|
||||
dashboard: 82025
|
||||
dashboardEnhanced: 65646
|
||||
data: 454087
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License
|
||||
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
||||
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
||||
* Side Public License, v 1.
|
||||
*/
|
||||
|
||||
export { SampleClientReadme } from './components/fleet_integration/sample/sample_client_readme';
|
||||
export { ElasticsearchJsClientReadme } from './components/fleet_integration/elasticsearch_js/elasticsearch_js_readme';
|
||||
export { ElasticsearchPyClientReadme } from './components/fleet_integration/elasticsearch_py/elasticsearch_py_readme';
|
|
@ -22,10 +22,6 @@ import {
|
|||
|
||||
import { CustomIntegrationsServicesProvider } from './services';
|
||||
import { servicesFactory } from './services/kibana';
|
||||
import { SampleClientReadme } from './components/fleet_integration/sample/sample_client_readme';
|
||||
import { ElasticsearchJsClientReadme } from './components/fleet_integration/elasticsearch_js/elasticsearch_js_readme';
|
||||
import { ElasticsearchPyClientReadme } from './components/fleet_integration/elasticsearch_py/elasticsearch_py_readme';
|
||||
|
||||
export class CustomIntegrationsPlugin
|
||||
implements Plugin<CustomIntegrationsSetup, CustomIntegrationsStart>
|
||||
{
|
||||
|
@ -49,9 +45,15 @@ export class CustomIntegrationsPlugin
|
|||
const services = servicesFactory({ coreStart, startPlugins });
|
||||
|
||||
const languageClientsUiComponents = {
|
||||
sample: SampleClientReadme,
|
||||
javascript: ElasticsearchJsClientReadme,
|
||||
python: ElasticsearchPyClientReadme,
|
||||
sample: React.lazy(async () => ({
|
||||
default: (await import('./language_components')).SampleClientReadme,
|
||||
})),
|
||||
javascript: React.lazy(async () => ({
|
||||
default: (await import('./language_components')).ElasticsearchJsClientReadme,
|
||||
})),
|
||||
python: React.lazy(async () => ({
|
||||
default: (await import('./language_components')).ElasticsearchPyClientReadme,
|
||||
})),
|
||||
};
|
||||
|
||||
const ContextProvider: React.FC = ({ children }) => (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue