Merge origin/main into main
This commit is contained in:
commit
161bf5e8cb
20 changed files with 1592 additions and 116 deletions
|
|
@ -229,6 +229,9 @@ func editDefaultsAndStorage(ui *UI, cfg *config.Config) error {
|
|||
{Label: "Ring-buffer history size", Description: fmt.Sprintf("%d checks per monitor", cfg.Storage.HistorySize)},
|
||||
{Label: "Persistence file path", Description: persist},
|
||||
{Label: "Persistence save interval", Description: cfg.Storage.SaveInterval.Std().String()},
|
||||
{Label: "Daily history logs dir", Description: cfg.Storage.LogsDir},
|
||||
{Label: "Stats SQLite DB path", Description: cfg.Storage.StatsDB},
|
||||
{Label: "Stats retention days", Description: fmt.Sprintf("%d days", cfg.Storage.StatsRetentionDays)},
|
||||
{Label: "Back to main hub"},
|
||||
}
|
||||
|
||||
|
|
@ -283,6 +286,28 @@ func editDefaultsAndStorage(ui *UI, cfg *config.Config) error {
|
|||
return err
|
||||
}
|
||||
cfg.Storage.SaveInterval = d
|
||||
case 7:
|
||||
v, err := ui.PromptString("Daily history logs directory", cfg.Storage.LogsDir, "directory path, or 'off' to disable", true, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cfg.Storage.LogsDir = v
|
||||
case 8:
|
||||
v, err := ui.PromptString("Stats SQLite DB path", cfg.Storage.StatsDB, "file path, or 'off' to disable", true, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cfg.Storage.StatsDB = v
|
||||
case 9:
|
||||
curDays := cfg.Storage.StatsRetentionDays
|
||||
if curDays <= 0 {
|
||||
curDays = 90
|
||||
}
|
||||
days, err := ui.PromptInt("Stats retention days", curDays, 1, 3650)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cfg.Storage.StatsRetentionDays = days
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue