cmd/ursrv, lib/ur: Collect and present encryption usage (#7448)

This commit is contained in:
Simon Frei 2021-03-10 23:26:56 +01:00 committed by GitHub
parent 5548a8eb7a
commit 9a001051d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -745,6 +745,7 @@ func getReport(db *sql.DB) map[string]interface{} {
inc(features["Folder"]["v3"], "Weak hash, custom threshold", rep.FolderUsesV3.CustomWeakHashThreshold) inc(features["Folder"]["v3"], "Weak hash, custom threshold", rep.FolderUsesV3.CustomWeakHashThreshold)
inc(features["Folder"]["v3"], "Filesystem watcher", rep.FolderUsesV3.FsWatcherEnabled) inc(features["Folder"]["v3"], "Filesystem watcher", rep.FolderUsesV3.FsWatcherEnabled)
inc(features["Folder"]["v3"], "Case sensitive FS", rep.FolderUsesV3.CaseSensitiveFS) inc(features["Folder"]["v3"], "Case sensitive FS", rep.FolderUsesV3.CaseSensitiveFS)
inc(features["Folder"]["v3"], "Mode, receive encrypted", rep.FolderUsesV3.ReceiveEncrypted)
add(featureGroups["Folder"]["v3"], "Conflicts", "Disabled", rep.FolderUsesV3.ConflictsDisabled) add(featureGroups["Folder"]["v3"], "Conflicts", "Disabled", rep.FolderUsesV3.ConflictsDisabled)
add(featureGroups["Folder"]["v3"], "Conflicts", "Unlimited", rep.FolderUsesV3.ConflictsUnlimited) add(featureGroups["Folder"]["v3"], "Conflicts", "Unlimited", rep.FolderUsesV3.ConflictsUnlimited)

View File

@ -129,6 +129,7 @@ type Report struct {
BlockPullOrder map[string]int `json:"blockPullOrder,omitempty" since:"3"` BlockPullOrder map[string]int `json:"blockPullOrder,omitempty" since:"3"`
CopyRangeMethod map[string]int `json:"copyRangeMethod,omitempty" since:"3"` CopyRangeMethod map[string]int `json:"copyRangeMethod,omitempty" since:"3"`
CaseSensitiveFS int `json:"caseSensitiveFS,omitempty" since:"3"` CaseSensitiveFS int `json:"caseSensitiveFS,omitempty" since:"3"`
ReceiveEncrypted int `json:"receiveencrypted,omitempty" since:"3"`
} `json:"folderUsesV3,omitempty" since:"3"` } `json:"folderUsesV3,omitempty" since:"3"`
DeviceUsesV3 struct { DeviceUsesV3 struct {

View File

@ -267,6 +267,9 @@ func (s *Service) reportData(ctx context.Context, urVersion int, preview bool) (
if cfg.CaseSensitiveFS { if cfg.CaseSensitiveFS {
report.FolderUsesV3.CaseSensitiveFS++ report.FolderUsesV3.CaseSensitiveFS++
} }
if cfg.Type == config.FolderTypeReceiveEncrypted {
report.FolderUsesV3.ReceiveEncrypted++
}
} }
sort.Ints(report.FolderUsesV3.FsWatcherDelays) sort.Ints(report.FolderUsesV3.FsWatcherDelays)