mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: New feature toggle for enabling standalone alerts (#25984)
* Add feature toggle for standalone alerts * Add IsStandaloneAlertsEnabled exported func
This commit is contained in:
parent
c5bdea5cec
commit
20b603ee1a
@ -1349,4 +1349,4 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
|
||||
|
||||
### 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 {
|
||||
meta: boolean;
|
||||
datasourceInsights: boolean;
|
||||
reportGrid: boolean;
|
||||
standaloneAlerts: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,6 +55,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
||||
meta: false,
|
||||
datasourceInsights: false,
|
||||
reportGrid: false,
|
||||
standaloneAlerts: false,
|
||||
};
|
||||
licenseInfo: LicenseInfo = {} as LicenseInfo;
|
||||
rendererAvailable = false;
|
||||
|
@ -309,6 +309,11 @@ func (c Cfg) IsExpressionsEnabled() bool {
|
||||
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 {
|
||||
Config string
|
||||
HomePath string
|
||||
|
Loading…
Reference in New Issue
Block a user