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:
lean.dev
2023-01-26 10:28:11 -03:00
committed by GitHub
parent 928e2c9c9e
commit 7d8ec6199d
14 changed files with 191 additions and 99 deletions
+1
View File
@@ -209,6 +209,7 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
"samlEnabled": hs.samlEnabled(),
"samlName": hs.samlName(),
"tokenExpirationDayLimit": hs.Cfg.SATokenExpirationDayLimit,
"snapshotEnabled": hs.Cfg.SnapshotEnabled,
}
if hs.ThumbService != nil {