SupportBundles: Replace feature toggle with enabled (#63241)

replace feature toggle with enabled
This commit is contained in:
Jo 2023-02-10 10:12:04 +01:00 committed by GitHub
parent ed626427de
commit c70571c536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 5 additions and 18 deletions

View File

@ -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 |

View File

@ -37,7 +37,6 @@ export interface FeatureToggles {
migrationLocking?: boolean;
storage?: boolean;
k8s?: boolean;
supportBundles?: boolean;
dashboardsFromStorage?: boolean;
export?: boolean;
exploreMixedDatasource?: boolean;

View File

@ -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) {

View File

@ -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",

View File

@ -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"

View File

@ -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) {

View File

@ -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
}

View File

@ -552,7 +552,7 @@ export function getBrowseStorageRoutes(cfg = config): RouteDescriptor[] {
}
export function getSupportBundleRoutes(cfg = config): RouteDescriptor[] {
if (!cfg.featureToggles.supportBundles) {
if (!cfg.supportBundlesEnabled) {
return [];
}