Skip to content
3 changes: 3 additions & 0 deletions x-pack/plugins/search_playground/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export class SearchPlaygroundPlugin
async mount({ element, history }: AppMountParameters) {
const { renderApp } = await import('./application');
const [coreStart, depsStart] = await core.getStartServices();

coreStart.chrome.docTitle.change(PLUGIN_NAME);

const startDeps: AppPluginStartDependencies = {
...depsStart,
history,
Expand Down
22 changes: 15 additions & 7 deletions x-pack/plugins/serverless_search/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,22 @@ export class ServerlessSearchPlugin
},
}),
});

const homeTitle = i18n.translate('xpack.serverlessSearch.app.home.title', {
defaultMessage: 'Home',
});

if (useSearchHomepage) {
core.application.register({
id: 'serverlessHomeRedirect',
title: i18n.translate('xpack.serverlessSearch.app.home.title', {
defaultMessage: 'Home',
}),
title: homeTitle,
appRoute: '/app/elasticsearch',
euiIconType: 'logoElastic',
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
visibleIn: [],
async mount({}: AppMountParameters) {
const [coreStart] = await core.getStartServices();
coreStart.chrome.docTitle.change(homeTitle);
coreStart.application.navigateToApp('searchHomepage');
return () => {};
},
Expand All @@ -102,6 +106,7 @@ export class ServerlessSearchPlugin
const { renderApp } = await import('./application/elasticsearch');
const [coreStart, services] = await core.getStartServices();
docLinks.setDocLinks(coreStart.docLinks.links);
coreStart.chrome.docTitle.change(homeTitle);
let user: AuthenticatedUser | undefined;
try {
const response = await coreStart.security.authc.getCurrentUser();
Expand All @@ -114,20 +119,23 @@ export class ServerlessSearchPlugin
},
});

const connectorsTitle = i18n.translate('xpack.serverlessSearch.app.connectors.title', {
defaultMessage: 'Connectors',
});

core.application.register({
id: 'serverlessConnectors',
title: i18n.translate('xpack.serverlessSearch.app.connectors.title', {
defaultMessage: 'Connectors',
}),
title: connectorsTitle,
appRoute: '/app/connectors',
euiIconType: 'logoElastic',
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
visibleIn: [],
async mount({ element, history }: AppMountParameters) {
const { renderApp } = await import('./application/connectors');
const [coreStart, services] = await core.getStartServices();

coreStart.chrome.docTitle.change(connectorsTitle);
docLinks.setDocLinks(coreStart.docLinks.links);

return await renderApp(element, coreStart, { history, ...services }, queryClient);
},
});
Expand Down