mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 16:42:09 +08:00
RestoreDashboards: Adjust path (#89233)
* refactor: change path * fix: page headline * refactor: remove condition
This commit is contained in:
@ -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("/explore", authorize(ac.EvalPermission(ac.ActionDatasourcesExplore)), hs.Index)
|
||||||
|
|
||||||
r.Get("/playlists/", reqSignedIn, hs.Index)
|
r.Get("/playlists/", reqSignedIn, hs.Index)
|
||||||
|
@ -358,8 +358,8 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
|
|||||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||||
Text: "Recently Deleted",
|
Text: "Recently Deleted",
|
||||||
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
|
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
|
||||||
Id: "dashboards/recentlyDeleted",
|
Id: "dashboards/recently-deleted",
|
||||||
Url: s.cfg.AppSubURL + "/dashboard/recentlyDeleted",
|
Url: s.cfg.AppSubURL + "/dashboard/recently-deleted",
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@ export function getNavTitle(navId: string | undefined) {
|
|||||||
return t('nav.reporting.title', 'Reporting');
|
return t('nav.reporting.title', 'Reporting');
|
||||||
case 'dashboards/public':
|
case 'dashboards/public':
|
||||||
return t('nav.public.title', 'Public dashboards');
|
return t('nav.public.title', 'Public dashboards');
|
||||||
case 'dashboards/recentlyDeleted':
|
case 'dashboards/recently-deleted':
|
||||||
return t('nav.recentlyDeleted.title', 'Recently Deleted');
|
return t('nav.recently-deleted.title', 'Recently Deleted');
|
||||||
case 'dashboards/new':
|
case 'dashboards/new':
|
||||||
return t('nav.new-dashboard.title', 'New dashboard');
|
return t('nav.new-dashboard.title', 'New dashboard');
|
||||||
case 'dashboards/folder/new':
|
case 'dashboards/folder/new':
|
||||||
@ -208,9 +208,9 @@ export function getNavSubTitle(navId: string | undefined) {
|
|||||||
);
|
);
|
||||||
case 'dashboards/library-panels':
|
case 'dashboards/library-panels':
|
||||||
return t('nav.library-panels.subtitle', 'Reusable panels that can be added to multiple dashboards');
|
return t('nav.library-panels.subtitle', 'Reusable panels that can be added to multiple dashboards');
|
||||||
case 'dashboards/recentlyDeleted':
|
case 'dashboards/recently-deleted':
|
||||||
return t(
|
return t(
|
||||||
'nav.recentlyDeleted.subtitle',
|
'nav.recently-deleted.subtitle',
|
||||||
'Any items listed here for more than 30 days will be automatically deleted.'
|
'Any items listed here for more than 30 days will be automatically deleted.'
|
||||||
);
|
);
|
||||||
case 'alerting':
|
case 'alerting':
|
||||||
|
@ -34,7 +34,7 @@ const RecentlyDeletedPage = memo(() => {
|
|||||||
}, [dispatch, stateManager]);
|
}, [dispatch, stateManager]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page navId="dashboards/recentlyDeleted">
|
<Page navId="dashboards/recently-deleted">
|
||||||
<Page.Contents>
|
<Page.Contents>
|
||||||
<ActionRow
|
<ActionRow
|
||||||
state={searchState}
|
state={searchState}
|
||||||
|
@ -436,7 +436,7 @@ export function getAppRoutes(): RouteDescriptor[] {
|
|||||||
),
|
),
|
||||||
},
|
},
|
||||||
config.featureToggles.dashboardRestore && {
|
config.featureToggles.dashboardRestore && {
|
||||||
path: '/dashboard/recentlyDeleted',
|
path: '/dashboard/recently-deleted',
|
||||||
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
|
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
|
||||||
component: SafeDynamicImport(
|
component: SafeDynamicImport(
|
||||||
() => import(/* webpackChunkName: "RecentlyDeletedPage" */ 'app/features/browse-dashboards/RecentlyDeletedPage')
|
() => import(/* webpackChunkName: "RecentlyDeletedPage" */ 'app/features/browse-dashboards/RecentlyDeletedPage')
|
||||||
|
@ -1184,7 +1184,7 @@
|
|||||||
"public": {
|
"public": {
|
||||||
"title": "Public dashboards"
|
"title": "Public dashboards"
|
||||||
},
|
},
|
||||||
"recentlyDeleted": {
|
"recently-deleted": {
|
||||||
"subtitle": "Any items listed here for more than 30 days will be automatically deleted.",
|
"subtitle": "Any items listed here for more than 30 days will be automatically deleted.",
|
||||||
"title": "Recently Deleted"
|
"title": "Recently Deleted"
|
||||||
},
|
},
|
||||||
|
@ -1184,7 +1184,7 @@
|
|||||||
"public": {
|
"public": {
|
||||||
"title": "Pūþľįč đäşĥþőäřđş"
|
"title": "Pūþľįč đäşĥþőäřđş"
|
||||||
},
|
},
|
||||||
"recentlyDeleted": {
|
"recently-deleted": {
|
||||||
"subtitle": "Åʼny įŧęmş ľįşŧęđ ĥęřę ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ.",
|
"subtitle": "Åʼny įŧęmş ľįşŧęđ ĥęřę ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ.",
|
||||||
"title": "Ŗęčęʼnŧľy Đęľęŧęđ"
|
"title": "Ŗęčęʼnŧľy Đęľęŧęđ"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user