[Synthetics] Update nav for app (#158535)

This commit is contained in:
Shahzad 2023-06-02 16:33:42 +02:00 committed by GitHub
parent 11c4578db7
commit 48c8aa6419
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 6 deletions

View file

@ -168,6 +168,7 @@ export class UptimePlugin
});
registerUptimeRoutesWithNavigation(core, plugins);
registerSyntheticsRoutesWithNavigation(core, plugins);
core.getStartServices().then(([coreStart, clientPluginsStart]) => {});
@ -301,13 +302,37 @@ function registerUptimeRoutesWithNavigation(
path: '/certificates',
matchFullPath: true,
},
],
},
];
}
return [];
})
)
);
}
function registerSyntheticsRoutesWithNavigation(
core: CoreSetup<ClientPluginsStart, unknown>,
plugins: ClientPluginsSetup
) {
plugins.observabilityShared.navigation.registerSections(
from(core.getStartServices()).pipe(
map(([coreStart]) => {
if (coreStart.application.capabilities.uptime.show) {
return [
{
label: 'Synthetics',
sortKey: 499,
entries: [
{
label: i18n.translate('xpack.synthetics.overview.headingBetaSection', {
defaultMessage: 'Synthetics',
label: i18n.translate('xpack.synthetics.overview.SyntheticsHeading', {
defaultMessage: 'Monitors',
}),
app: 'synthetics',
path: OVERVIEW_ROUTE,
matchFullPath: false,
matchFullPath: true,
ignoreTrailingSlash: true,
isNewFeature: true,
},

View file

@ -36773,7 +36773,6 @@
"xpack.synthetics.overview.groupPopover.project.label": "Projet",
"xpack.synthetics.overview.groupPopover.tag.label": "Balise",
"xpack.synthetics.overview.heading": "Moniteurs",
"xpack.synthetics.overview.headingBetaSection": "Synthetics",
"xpack.synthetics.overview.monitors.label": "Moniteurs",
"xpack.synthetics.overview.noMonitorsFoundContent": "Essayez d'affiner votre recherche.",
"xpack.synthetics.overview.noMonitorsFoundHeading": "Aucun moniteur trouvé",

View file

@ -36754,7 +36754,6 @@
"xpack.synthetics.overview.groupPopover.project.label": "プロジェクト",
"xpack.synthetics.overview.groupPopover.tag.label": "タグ",
"xpack.synthetics.overview.heading": "監視",
"xpack.synthetics.overview.headingBetaSection": "Synthetics",
"xpack.synthetics.overview.monitors.label": "監視",
"xpack.synthetics.overview.noMonitorsFoundContent": "検索を更新してください。",
"xpack.synthetics.overview.noMonitorsFoundHeading": "モニターが見つかりません",

View file

@ -36748,7 +36748,6 @@
"xpack.synthetics.overview.groupPopover.project.label": "项目",
"xpack.synthetics.overview.groupPopover.tag.label": "标签",
"xpack.synthetics.overview.heading": "监测",
"xpack.synthetics.overview.headingBetaSection": "Synthetics",
"xpack.synthetics.overview.monitors.label": "监测",
"xpack.synthetics.overview.noMonitorsFoundContent": "请尝试优化您的搜索。",
"xpack.synthetics.overview.noMonitorsFoundHeading": "未找到任何监测",