mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Add doc titles to ES UI apps (#71045)
* Add doc titles to CCR, ILM, Index Management, Ingest Node Pipelines, License Management, Remote Clusters, Rollup Jobs, Watcher, and Upgrade Assistant. Clear doc title when leaving Dev Tools. * Refactor Watcher boot file to follow index-oriented pattern of other plugins.
This commit is contained in:
parent
1cde692ab7
commit
a540cafb85
14 changed files with 151 additions and 42 deletions
|
@ -7,6 +7,7 @@
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { CoreSetup, Plugin, CoreStart, PluginInitializerContext } from 'kibana/public';
|
||||
|
||||
import { PLUGIN } from '../common/constants';
|
||||
import { init as initBreadcrumbs } from './application/services/breadcrumb';
|
||||
import { init as initDocumentation } from './application/services/documentation';
|
||||
import { init as initHttp } from './application/services/http';
|
||||
|
@ -43,11 +44,14 @@ export class RemoteClustersUIPlugin
|
|||
mount: async ({ element, setBreadcrumbs, history }) => {
|
||||
const [core] = await getStartServices();
|
||||
const {
|
||||
chrome: { docTitle },
|
||||
i18n: { Context: i18nContext },
|
||||
docLinks,
|
||||
fatalErrors,
|
||||
} = core;
|
||||
|
||||
docTitle.change(PLUGIN.getI18nName());
|
||||
|
||||
// Initialize services
|
||||
initBreadcrumbs(setBreadcrumbs);
|
||||
initDocumentation(docLinks);
|
||||
|
@ -58,7 +62,17 @@ export class RemoteClustersUIPlugin
|
|||
const isCloudEnabled = Boolean(cloud?.isCloudEnabled);
|
||||
|
||||
const { renderApp } = await import('./application');
|
||||
return renderApp(element, i18nContext, { isCloudEnabled }, history);
|
||||
const unmountAppCallback = await renderApp(
|
||||
element,
|
||||
i18nContext,
|
||||
{ isCloudEnabled },
|
||||
history
|
||||
);
|
||||
|
||||
return () => {
|
||||
docTitle.reset();
|
||||
unmountAppCallback();
|
||||
};
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue