Move history settings from profile to layered profile

This commit is contained in:
Daniel
2023-08-09 14:45:08 +02:00
parent 3dbde10be0
commit a722b27c01
2 changed files with 7 additions and 25 deletions

View File

@@ -136,8 +136,6 @@ type Profile struct { //nolint:maligned // not worth the effort
filterListIDs []string
spnUsagePolicy endpoints.Endpoints
spnExitHubPolicy endpoints.Endpoints
enableHistory bool
historyRetention int
// Lifecycle Management
outdated *abool.AtomicBool
@@ -235,18 +233,6 @@ func (profile *Profile) parseConfig() error {
}
}
enableHistory, ok := profile.configPerspective.GetAsBool(CfgOptionEnableHistoryKey)
if ok {
profile.enableHistory = enableHistory
}
retention, ok := profile.configPerspective.GetAsInt(CfgOptionHistoryRetentionKey)
if ok {
profile.historyRetention = int(retention)
} else {
profile.historyRetention = int(CfgOptionHistoryRetention())
}
return lastErr
}
@@ -329,15 +315,6 @@ func (profile *Profile) IsOutdated() bool {
return profile.outdated.IsSet()
}
// HistoryEnabled returns true if connection history is enabled for the profile.
func (profile *Profile) HistoryEnabled() bool {
return profile.enableHistory
}
func (profile *Profile) HistoryRetention() int {
return profile.historyRetention
}
// GetEndpoints returns the endpoint list of the profile. This functions
// requires the profile to be read locked.
func (profile *Profile) GetEndpoints() endpoints.Endpoints {