Commit 20b603ee by Sofia Papagiannaki Committed by GitHub

Alerting: New feature toggle for enabling standalone alerts (#25984)

* Add feature toggle for standalone alerts

* Add IsStandaloneAlertsEnabled exported func
parent c5bdea5c
...@@ -1349,4 +1349,4 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{< ...@@ -1349,4 +1349,4 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
### enable ### enable
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations` Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`, `standaloneAlerts`
...@@ -41,6 +41,7 @@ export interface FeatureToggles { ...@@ -41,6 +41,7 @@ export interface FeatureToggles {
meta: boolean; meta: boolean;
datasourceInsights: boolean; datasourceInsights: boolean;
reportGrid: boolean; reportGrid: boolean;
standaloneAlerts: boolean;
} }
/** /**
......
...@@ -55,6 +55,7 @@ export class GrafanaBootConfig implements GrafanaConfig { ...@@ -55,6 +55,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
meta: false, meta: false,
datasourceInsights: false, datasourceInsights: false,
reportGrid: false, reportGrid: false,
standaloneAlerts: false,
}; };
licenseInfo: LicenseInfo = {} as LicenseInfo; licenseInfo: LicenseInfo = {} as LicenseInfo;
rendererAvailable = false; rendererAvailable = false;
......
...@@ -309,6 +309,11 @@ func (c Cfg) IsExpressionsEnabled() bool { ...@@ -309,6 +309,11 @@ func (c Cfg) IsExpressionsEnabled() bool {
return c.FeatureToggles["expressions"] return c.FeatureToggles["expressions"]
} }
// IsStandaloneAlertsEnabled returns whether the standalone alerts feature is enabled.
func (c Cfg) IsStandaloneAlertsEnabled() bool {
return c.FeatureToggles["standaloneAlerts"]
}
type CommandLineArgs struct { type CommandLineArgs struct {
Config string Config string
HomePath string HomePath string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment