RestoreDashboards: Adjust path (#89233)

* refactor: change path

* fix: page headline

* refactor: remove condition
This commit is contained in:
Laura Benz 2024-06-18 17:24:48 +02:00 committed by GitHub
parent 50244ed4a1
commit 34b3dbdbf3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 10 deletions

View File

@ -165,6 +165,10 @@ func (hs *HTTPServer) registerRoutes() {
)
}
if hs.Features.IsEnabledGlobally(featuremgmt.FlagDashboardRestore) {
r.Get("/dashboard/recently-deleted", reqSignedIn, hs.Index)
}
r.Get("/explore", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
r.Get("/playlists/", reqSignedIn, hs.Index)

View File

@ -358,8 +358,8 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
Text: "Recently Deleted",
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
Id: "dashboards/recentlyDeleted",
Url: s.cfg.AppSubURL + "/dashboard/recentlyDeleted",
Id: "dashboards/recently-deleted",
Url: s.cfg.AppSubURL + "/dashboard/recently-deleted",
})
}
}

View File

@ -40,8 +40,8 @@ export function getNavTitle(navId: string | undefined) {
return t('nav.reporting.title', 'Reporting');
case 'dashboards/public':
return t('nav.public.title', 'Public dashboards');
case 'dashboards/recentlyDeleted':
return t('nav.recentlyDeleted.title', 'Recently Deleted');
case 'dashboards/recently-deleted':
return t('nav.recently-deleted.title', 'Recently Deleted');
case 'dashboards/new':
return t('nav.new-dashboard.title', 'New dashboard');
case 'dashboards/folder/new':
@ -208,9 +208,9 @@ export function getNavSubTitle(navId: string | undefined) {
);
case 'dashboards/library-panels':
return t('nav.library-panels.subtitle', 'Reusable panels that can be added to multiple dashboards');
case 'dashboards/recentlyDeleted':
case 'dashboards/recently-deleted':
return t(
'nav.recentlyDeleted.subtitle',
'nav.recently-deleted.subtitle',
'Any items listed here for more than 30 days will be automatically deleted.'
);
case 'alerting':

View File

@ -34,7 +34,7 @@ const RecentlyDeletedPage = memo(() => {
}, [dispatch, stateManager]);
return (
<Page navId="dashboards/recentlyDeleted">
<Page navId="dashboards/recently-deleted">
<Page.Contents>
<ActionRow
state={searchState}

View File

@ -436,7 +436,7 @@ export function getAppRoutes(): RouteDescriptor[] {
),
},
config.featureToggles.dashboardRestore && {
path: '/dashboard/recentlyDeleted',
path: '/dashboard/recently-deleted',
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
component: SafeDynamicImport(
() => import(/* webpackChunkName: "RecentlyDeletedPage" */ 'app/features/browse-dashboards/RecentlyDeletedPage')

View File

@ -1184,7 +1184,7 @@
"public": {
"title": "Public dashboards"
},
"recentlyDeleted": {
"recently-deleted": {
"subtitle": "Any items listed here for more than 30 days will be automatically deleted.",
"title": "Recently Deleted"
},

View File

@ -1184,7 +1184,7 @@
"public": {
"title": "Pūþľįč đäşĥþőäřđş"
},
"recentlyDeleted": {
"recently-deleted": {
"subtitle": "Åʼny įŧęmş ľįşŧęđ ĥęřę ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ.",
"title": "Ŗęčęʼnŧľy Đęľęŧęđ"
},