Report versioning usage in usage report

I consider it a bug that we didn't already and that this is covered
already under the agreement that we report which features are in use.
This commit is contained in:
Jakob Borg 2016-02-13 08:18:40 +01:00
parent bf353a42cd
commit e11302172e

View File

@ -121,10 +121,14 @@ func reportData(cfg *config.Wrapper, m *model.Model) map[string]interface{} {
var rescanIntvs []int
folderUses := map[string]int{
"readonly": 0,
"ignorePerms": 0,
"ignoreDelete": 0,
"autoNormalize": 0,
"readonly": 0,
"ignorePerms": 0,
"ignoreDelete": 0,
"autoNormalize": 0,
"simpleVersioning": 0,
"externalVersioning": 0,
"staggeredVersioning": 0,
"trashcanVersioning": 0,
}
for _, cfg := range cfg.Folders() {
rescanIntvs = append(rescanIntvs, cfg.RescanIntervalS)
@ -141,6 +145,9 @@ func reportData(cfg *config.Wrapper, m *model.Model) map[string]interface{} {
if cfg.AutoNormalize {
folderUses["autoNormalize"]++
}
if cfg.Versioning.Type != "" {
folderUses[cfg.Versioning.Type+"Versioning"]++
}
}
sort.Ints(rescanIntvs)
res["rescanIntvs"] = rescanIntvs