-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5a536bd
commit ef2f1ab
Showing
2 changed files
with
48 additions
and
28 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
x-pack/plugins/ingest_pipelines/public/application/mount_management_section.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { CoreSetup } from 'src/core/public'; | ||
import { ManagementAppMountParams } from 'src/plugins/management/public'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
import { documentationService, uiMetricService, apiService } from './services'; | ||
import { renderApp } from '.'; | ||
|
||
export async function mountManagementSection( | ||
coreSetup: CoreSetup, | ||
params: ManagementAppMountParams | ||
) { | ||
const { element, setBreadcrumbs } = params; | ||
const [coreStart] = await coreSetup.getStartServices(); | ||
const { | ||
docLinks, | ||
i18n: { Context: I18nContext }, | ||
} = coreStart; | ||
|
||
documentationService.setup(docLinks); | ||
|
||
setBreadcrumbs([ | ||
{ | ||
text: i18n.translate('xpack.ingestPipelines.breadcrumbsTitle', { | ||
defaultMessage: 'Ingest Pipelines', | ||
}), | ||
}, | ||
]); | ||
|
||
const services = { | ||
setBreadcrumbs, | ||
metric: uiMetricService, | ||
documentation: documentationService, | ||
api: apiService, | ||
}; | ||
|
||
return renderApp(element, I18nContext, services); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters