DashboardLibrary: Restore New dashboard naming (#115184)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { t } from '@grafana/i18n';
|
||||
import { config } from '@grafana/runtime';
|
||||
// Maps the ID of the nav item to a translated phrase to later pass to <Trans />
|
||||
// Because the navigation content is dynamic (defined in the backend), we can not use
|
||||
// the normal inline message definition method.
|
||||
@@ -49,9 +48,7 @@ export function getNavTitle(navId: string | undefined) {
|
||||
case 'dashboards/recently-deleted':
|
||||
return t('nav.recently-deleted.title', 'Recently deleted');
|
||||
case 'dashboards/new':
|
||||
return config.featureToggles.dashboardTemplates
|
||||
? t('nav.new-dashboard.empty-title', 'Empty dashboard')
|
||||
: t('nav.new-dashboard.title', 'New dashboard');
|
||||
return t('nav.new-dashboard.title', 'New dashboard');
|
||||
case 'dashboards/folder/new':
|
||||
return t('nav.new-folder.title', 'New folder');
|
||||
case 'dashboards/import':
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
// TODO: remove this when new Browse Dashboards UI is no longer feature flagged
|
||||
|
||||
import { t } from '@grafana/i18n';
|
||||
import { config } from '@grafana/runtime';
|
||||
|
||||
export function getSearchPlaceholder(includePanels = false) {
|
||||
return includePanels
|
||||
@@ -11,9 +10,7 @@ export function getSearchPlaceholder(includePanels = false) {
|
||||
}
|
||||
|
||||
export function getNewDashboardPhrase() {
|
||||
return config.featureToggles.dashboardTemplates
|
||||
? t('search.dashboard-actions.empty-dashboard', 'Empty dashboard')
|
||||
: t('search.dashboard-actions.new-dashboard', 'New dashboard');
|
||||
return t('search.dashboard-actions.new-dashboard', 'New dashboard');
|
||||
}
|
||||
|
||||
export function getNewTemplateDashboardPhrase() {
|
||||
|
||||
@@ -10724,7 +10724,6 @@
|
||||
"title": "New"
|
||||
},
|
||||
"new-dashboard": {
|
||||
"empty-title": "Empty dashboard",
|
||||
"title": "New dashboard"
|
||||
},
|
||||
"new-folder": {
|
||||
@@ -12634,7 +12633,6 @@
|
||||
}
|
||||
},
|
||||
"dashboard-actions": {
|
||||
"empty-dashboard": "Empty dashboard",
|
||||
"import": "Import",
|
||||
"new": "New",
|
||||
"new-dashboard": "New dashboard",
|
||||
|
||||
Reference in New Issue
Block a user