mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SupportBundles: Replace feature toggle with enabled (#63241)
replace feature toggle with enabled
This commit is contained in:
parent
ed626427de
commit
c70571c536
@ -66,7 +66,6 @@ Alpha features might be changed or removed without prior notice.
|
||||
| `dashboardComments` | Enable dashboard-wide comments |
|
||||
| `annotationComments` | Enable annotation comments |
|
||||
| `storage` | Configurable storage for dashboards, datasources, and resources |
|
||||
| `supportBundles` | Support bundles for troubleshooting |
|
||||
| `exploreMixedDatasource` | Enable mixed datasource in Explore |
|
||||
| `tracing` | Adds trace ID to error notifications |
|
||||
| `correlations` | Correlations page |
|
||||
|
@ -37,7 +37,6 @@ export interface FeatureToggles {
|
||||
migrationLocking?: boolean;
|
||||
storage?: boolean;
|
||||
k8s?: boolean;
|
||||
supportBundles?: boolean;
|
||||
dashboardsFromStorage?: boolean;
|
||||
export?: boolean;
|
||||
exploreMixedDatasource?: boolean;
|
||||
|
@ -254,8 +254,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
}
|
||||
|
||||
func isSupportBundlesEnabled(hs *HTTPServer) bool {
|
||||
return hs.Cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true) &&
|
||||
hs.Features.IsEnabled(featuremgmt.FlagSupportBundles)
|
||||
return hs.Cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true)
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, availablePlugins AvailablePlugins) (map[string]plugins.DataSourceDTO, error) {
|
||||
|
@ -119,11 +119,6 @@ var (
|
||||
State: FeatureStateAlpha,
|
||||
RequiresDevMode: true,
|
||||
},
|
||||
{
|
||||
Name: "supportBundles",
|
||||
Description: "Support bundles for troubleshooting",
|
||||
State: FeatureStateAlpha,
|
||||
},
|
||||
{
|
||||
Name: "dashboardsFromStorage",
|
||||
Description: "Load dashboards from the generic storage interface",
|
||||
|
@ -91,10 +91,6 @@ const (
|
||||
// Explore native k8s integrations
|
||||
FlagK8s = "k8s"
|
||||
|
||||
// FlagSupportBundles
|
||||
// Support bundles for troubleshooting
|
||||
FlagSupportBundles = "supportBundles"
|
||||
|
||||
// FlagDashboardsFromStorage
|
||||
// Load dashboards from the generic storage interface
|
||||
FlagDashboardsFromStorage = "dashboardsFromStorage"
|
||||
|
@ -235,8 +235,7 @@ func (s *ServiceImpl) getHomeNode(c *contextmodel.ReqContext, prefs *pref.Prefer
|
||||
}
|
||||
|
||||
func isSupportBundlesEnabled(s *ServiceImpl) bool {
|
||||
return s.cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true) &&
|
||||
s.features.IsEnabled(featuremgmt.FlagSupportBundles)
|
||||
return s.cfg.SectionWithEnvOverrides("support_bundles").Key("enabled").MustBool(true)
|
||||
}
|
||||
|
||||
func (s *ServiceImpl) addHelpLinks(treeRoot *navtree.NavTreeRoot, c *contextmodel.ReqContext) {
|
||||
|
@ -70,7 +70,7 @@ func ProvideService(cfg *setting.Cfg,
|
||||
|
||||
usageStats.RegisterMetricsFunc(s.getUsageStats)
|
||||
|
||||
if !features.IsEnabled(featuremgmt.FlagSupportBundles) || !s.enabled {
|
||||
if !s.enabled {
|
||||
return s, nil
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ func ProvideService(cfg *setting.Cfg,
|
||||
}
|
||||
|
||||
func (s *Service) Run(ctx context.Context) error {
|
||||
if !s.features.IsEnabled(featuremgmt.FlagSupportBundles) {
|
||||
if !s.enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,7 @@ export function getBrowseStorageRoutes(cfg = config): RouteDescriptor[] {
|
||||
}
|
||||
|
||||
export function getSupportBundleRoutes(cfg = config): RouteDescriptor[] {
|
||||
if (!cfg.featureToggles.supportBundles) {
|
||||
if (!cfg.supportBundlesEnabled) {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user