Snapshots: Add snapshot enable config (#61587)
* Add config to remove Snapshot functionality (frontend is hidden and validation in the backend) * Add test cases * Remove unused mock on the test * Moving Snapshot config from globar variables to settings.Cfg * Removing warnings on code
This commit is contained in:
@@ -376,13 +376,15 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *models.ReqContext, hasEditPerm b
|
||||
})
|
||||
|
||||
if c.IsSignedIn {
|
||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||
Text: "Snapshots",
|
||||
SubTitle: "Interactive, publically available, point-in-time representations of dashboards",
|
||||
Id: "dashboards/snapshots",
|
||||
Url: s.cfg.AppSubURL + "/dashboard/snapshots",
|
||||
Icon: "camera",
|
||||
})
|
||||
if s.cfg.SnapshotEnabled {
|
||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||
Text: "Snapshots",
|
||||
SubTitle: "Interactive, publically available, point-in-time representations of dashboards",
|
||||
Id: "dashboards/snapshots",
|
||||
Url: s.cfg.AppSubURL + "/dashboard/snapshots",
|
||||
Icon: "camera",
|
||||
})
|
||||
}
|
||||
|
||||
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
|
||||
Text: "Library panels",
|
||||
|
||||
Reference in New Issue
Block a user