Chore: Refactor quota service (#58643)

Chore: Refactor quota service (#57586)

* Chore: refactore quota service

* Apply suggestions from code review
This commit is contained in:
Sofia Papagiannaki
2022-11-14 21:08:10 +02:00
committed by GitHub
parent dd0d034796
commit 9855e74b92
99 changed files with 2596 additions and 1398 deletions
+4 -6
View File
@@ -154,9 +154,6 @@ var (
LDAPAllowSignup bool
LDAPActiveSyncEnabled bool
// Quota
Quota QuotaSettings
// Alerting
AlertingEnabled *bool
ExecuteAlerts bool
@@ -423,12 +420,12 @@ type Cfg struct {
LDAPSkipOrgRoleSync bool
LDAPAllowSignup bool
Quota QuotaSettings
DefaultTheme string
DefaultLocale string
HomePage string
Quota QuotaSettings
AutoAssignOrg bool
AutoAssignOrgId int
AutoAssignOrgRole string
@@ -1056,11 +1053,12 @@ func (cfg *Cfg) Load(args CommandLineArgs) error {
cfg.readAzureSettings()
cfg.readSessionConfig()
cfg.readSmtpSettings()
cfg.readQuotaSettings()
if err := cfg.readAnnotationSettings(); err != nil {
return err
}
cfg.readQuotaSettings()
cfg.readExpressionsSettings()
if err := cfg.readGrafanaEnvironmentMetrics(); err != nil {
return err