Restore dashboards: Re-enable FE feature toggle (#105820)

* Add dashboardRestore toggle

* Restore the toggle on FE

* Add navtree item

* Fix lint

* Rename feature toggle

* Use the renamed toggle
This commit is contained in:
Alex Khomenko
2025-05-23 17:35:54 +03:00
committed by GitHub
parent 8734b54f90
commit 0cb6f9584b
14 changed files with 85 additions and 23 deletions
@@ -399,6 +399,15 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
Icon: "library-panel",
})
}
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagRestoreDashboards) && (c.GetOrgRole() == org.RoleAdmin || c.IsGrafanaAdmin) {
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
Text: "Recently deleted",
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
Id: "dashboards/recently-deleted",
Url: s.cfg.AppSubURL + "/dashboard/recently-deleted",
})
}
}
if hasAccess(ac.EvalPermission(dashboards.ActionDashboardsCreate)) {