From 5b390de1b63179d1d6c84a907935d77e5d0d44c0 Mon Sep 17 00:00:00 2001 From: "Grot (@grafanabot)" <43478413+grafanabot@users.noreply.github.com> Date: Tue, 28 Jun 2022 04:38:58 -0400 Subject: [PATCH] Alerting: Add legacy indicator to navbar (#49511) (#49614) * update id and add translation key * remove logs (cherry picked from commit e3a51a4aa82357a39f81a242a05e9aa7d8b154e9) Co-authored-by: Peter Holmberg Co-authored-by: Peter Holmberg --- lerna.json | 4 +--- pkg/api/index.go | 2 +- public/app/core/components/NavBar/navBarItem-translations.ts | 1 + public/locales/en/messages.po | 4 ++++ public/locales/es/messages.po | 4 ++++ public/locales/fr/messages.po | 4 ++++ public/locales/pseudo-LOCALE/messages.po | 4 ++++ 7 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lerna.json b/lerna.json index ef75ebcb61b..55823c420cd 100644 --- a/lerna.json +++ b/lerna.json @@ -1,8 +1,6 @@ { "npmClient": "yarn", "useWorkspaces": true, - "packages": [ - "packages/*" - ], + "packages": ["packages/*"], "version": "9.0.1" } diff --git a/pkg/api/index.go b/pkg/api/index.go index ddcf35c5c22..eaa739623a9 100644 --- a/pkg/api/index.go +++ b/pkg/api/index.go @@ -490,7 +490,7 @@ func (hs *HTTPServer) buildLegacyAlertNavLinks(c *models.ReqContext) []*dtos.Nav { Text: "Alerting", SubTitle: "Alert rules and notifications", - Id: "alerting", + Id: "alerting-legacy", Icon: "bell", Url: hs.Cfg.AppSubURL + "/alerting/list", Children: alertChildNavs, diff --git a/public/app/core/components/NavBar/navBarItem-translations.ts b/public/app/core/components/NavBar/navBarItem-translations.ts index 04e3951d0a5..0869ee3c935 100644 --- a/public/app/core/components/NavBar/navBarItem-translations.ts +++ b/public/app/core/components/NavBar/navBarItem-translations.ts @@ -26,6 +26,7 @@ const TRANSLATED_MENU_ITEMS: Record = { explore: defineMessage({ id: 'nav.explore', message: 'Explore' }), alerting: defineMessage({ id: 'nav.alerting', message: 'Alerting' }), + 'alerting-legacy': defineMessage({ id: 'nav.alerting-legacy', message: 'Alerting (legacy)' }), 'alert-list': defineMessage({ id: 'nav.alerting-list', message: 'Alert rules' }), receivers: defineMessage({ id: 'nav.alerting-receivers', message: 'Contact points' }), 'am-routes': defineMessage({ id: 'nav.alerting-am-routes', message: 'Notification policies' }), diff --git a/public/locales/en/messages.po b/public/locales/en/messages.po index daceaecb9ee..6f93741ead5 100644 --- a/public/locales/en/messages.po +++ b/public/locales/en/messages.po @@ -38,6 +38,10 @@ msgstr "Notification channels" msgid "nav.alerting-groups" msgstr "Groups" +#: public/app/core/components/NavBar/navBarItem-translations.ts +msgid "nav.alerting-legacy" +msgstr "Alerting (legacy)" + #: public/app/core/components/NavBar/navBarItem-translations.ts msgid "nav.alerting-list" msgstr "Alert rules" diff --git a/public/locales/es/messages.po b/public/locales/es/messages.po index 613d0bb85ef..475712eebec 100644 --- a/public/locales/es/messages.po +++ b/public/locales/es/messages.po @@ -38,6 +38,10 @@ msgstr "" msgid "nav.alerting-groups" msgstr "" +#: public/app/core/components/NavBar/navBarItem-translations.ts +msgid "nav.alerting-legacy" +msgstr "" + #: public/app/core/components/NavBar/navBarItem-translations.ts msgid "nav.alerting-list" msgstr "" diff --git a/public/locales/fr/messages.po b/public/locales/fr/messages.po index 0bcf5605aea..d01ad3a3ddb 100644 --- a/public/locales/fr/messages.po +++ b/public/locales/fr/messages.po @@ -38,6 +38,10 @@ msgstr "" msgid "nav.alerting-groups" msgstr "" +#: public/app/core/components/NavBar/navBarItem-translations.ts +msgid "nav.alerting-legacy" +msgstr "" + #: public/app/core/components/NavBar/navBarItem-translations.ts msgid "nav.alerting-list" msgstr "" diff --git a/public/locales/pseudo-LOCALE/messages.po b/public/locales/pseudo-LOCALE/messages.po index f89907d77b1..919f781ab45 100644 --- a/public/locales/pseudo-LOCALE/messages.po +++ b/public/locales/pseudo-LOCALE/messages.po @@ -38,6 +38,10 @@ msgstr "" msgid "nav.alerting-groups" msgstr "" +#: public/app/core/components/NavBar/navBarItem-translations.ts +msgid "nav.alerting-legacy" +msgstr "" + #: public/app/core/components/NavBar/navBarItem-translations.ts msgid "nav.alerting-list" msgstr ""