dashboard history: clean up dashboard version history

This commit is contained in:
Alexander Zobnin
2017-11-14 13:34:27 +03:00
parent 6d7eacfa81
commit 08e2bbef83
5 changed files with 124 additions and 1 deletions

View File

@@ -89,6 +89,9 @@ var (
SnapShotTTLDays int
SnapShotRemoveExpired bool
// Dashboard history
DashboardVersionsToKeep int
// User settings
AllowUserSignUp bool
AllowUserOrgCreate bool
@@ -518,6 +521,10 @@ func NewConfigContext(args *CommandLineArgs) error {
SnapShotRemoveExpired = snapshots.Key("snapshot_remove_expired").MustBool(true)
SnapShotTTLDays = snapshots.Key("snapshot_TTL_days").MustInt(90)
// read dashboard settings
dashboards := Cfg.Section("dashboards")
DashboardVersionsToKeep = dashboards.Key("snapshot_TTL_days").MustInt(20)
// read data source proxy white list
DataProxyWhiteList = make(map[string]bool)
for _, hostAndIp := range util.SplitString(security.Key("data_source_proxy_whitelist").String()) {