RestoreDashboards: Add link to dashboards browse view (#94000)

* feat: add button

* refactor: clean up

* feat: add tracking

* refactor: change button copy

* refactor: add payload to tracking

* refactor: add subURL

* refactor: user permissions

* refactor: group conditions

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

---------

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
This commit is contained in:
Laura Benz
2024-10-03 15:13:29 +02:00
committed by GitHub
co-authored by Alex Khomenko
parent 4224d05934
commit f92ef0e126
4 changed files with 28 additions and 3 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
})
}
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestoreUI) && c.SignedInUser.GetOrgRole() == org.RoleAdmin {
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestoreUI) && (c.SignedInUser.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.",