Chore: Refactor quota service (#57586)

* Chore: refactore quota service

* Apply suggestions from code review
This commit is contained in:
Sofia Papagiannaki
2022-11-08 10:25:34 +02:00
committed by GitHub
parent faa0fda6eb
commit 326ea86a57
99 changed files with 2595 additions and 1397 deletions
+4 -6
View File
@@ -153,9 +153,6 @@ var (
LDAPAllowSignup bool
LDAPActiveSyncEnabled bool
// Quota
Quota QuotaSettings
// Alerting
AlertingEnabled *bool
ExecuteAlerts bool
@@ -422,12 +419,12 @@ type Cfg struct {
LDAPSkipOrgRoleSync bool
LDAPAllowSignup bool
Quota QuotaSettings
DefaultTheme string
DefaultLocale string
HomePage string
Quota QuotaSettings
AutoAssignOrg bool
AutoAssignOrgId int
AutoAssignOrgRole string
@@ -1053,11 +1050,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