mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Adds Panel Library featuretoggle (#29521)
This commit is contained in:
parent
9b2592dddf
commit
1581d04e65
@ -37,6 +37,7 @@ export interface FeatureToggles {
|
|||||||
ngalert: boolean;
|
ngalert: boolean;
|
||||||
// Just for demo at the moment
|
// Just for demo at the moment
|
||||||
traceToLogs: boolean;
|
traceToLogs: boolean;
|
||||||
|
panelLibrary: boolean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @remarks
|
* @remarks
|
||||||
|
@ -57,6 +57,7 @@ export class GrafanaBootConfig implements GrafanaConfig {
|
|||||||
meta: false,
|
meta: false,
|
||||||
ngalert: false,
|
ngalert: false,
|
||||||
traceToLogs: false,
|
traceToLogs: false,
|
||||||
|
panelLibrary: false,
|
||||||
};
|
};
|
||||||
licenseInfo: LicenseInfo = {} as LicenseInfo;
|
licenseInfo: LicenseInfo = {} as LicenseInfo;
|
||||||
rendererAvailable = false;
|
rendererAvailable = false;
|
||||||
|
@ -334,10 +334,16 @@ func (cfg Cfg) IsNgAlertEnabled() bool {
|
|||||||
return cfg.FeatureToggles["ngalert"]
|
return cfg.FeatureToggles["ngalert"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsHTTPRequestHistogramEnabled returns whether the http_request_histogram feature is enabled.
|
||||||
func (cfg Cfg) IsHTTPRequestHistogramEnabled() bool {
|
func (cfg Cfg) IsHTTPRequestHistogramEnabled() bool {
|
||||||
return cfg.FeatureToggles["http_request_histogram"]
|
return cfg.FeatureToggles["http_request_histogram"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsPanelLibraryEnabled returns whether the panel library feature is enabled.
|
||||||
|
func (cfg Cfg) IsPanelLibraryEnabled() bool {
|
||||||
|
return cfg.FeatureToggles["panelLibrary"]
|
||||||
|
}
|
||||||
|
|
||||||
type CommandLineArgs struct {
|
type CommandLineArgs struct {
|
||||||
Config string
|
Config string
|
||||||
HomePath string
|
HomePath string
|
||||||
|
Loading…
Reference in New Issue
Block a user