mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Topnav: Remove from feature toggle registry + hardcode in config (#94736)
remove topnav from feature toggle registry + hardcode to true
This commit is contained in:
parent
b4a804776f
commit
ba6829f4a7
@ -41,7 +41,6 @@ export interface FeatureToggles {
|
||||
vizActions?: boolean;
|
||||
disableSecretsCompatibility?: boolean;
|
||||
logRequestsInstrumentedAsUnknown?: boolean;
|
||||
topnav?: boolean;
|
||||
grpcServer?: boolean;
|
||||
cloudWatchCrossAccountQuerying?: boolean;
|
||||
showDashboardValidationWarnings?: boolean;
|
||||
|
@ -176,6 +176,10 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
secretsManagerPluginEnabled := kvstore.EvaluateRemoteSecretsPlugin(c.Req.Context(), hs.secretsPluginManager, hs.Cfg) == nil
|
||||
trustedTypesDefaultPolicyEnabled := (hs.Cfg.CSPEnabled && strings.Contains(hs.Cfg.CSPTemplate, "require-trusted-types-for")) || (hs.Cfg.CSPReportOnlyEnabled && strings.Contains(hs.Cfg.CSPReportOnlyTemplate, "require-trusted-types-for"))
|
||||
isCloudMigrationTarget := hs.Features.IsEnabled(c.Req.Context(), featuremgmt.FlagOnPremToCloudMigrations) && hs.Cfg.CloudMigration.IsTarget
|
||||
featureToggles := hs.Features.GetEnabled(c.Req.Context())
|
||||
// this is needed for backwards compatibility with external plugins
|
||||
// we should remove this once we can be sure that no external plugins rely on this
|
||||
featureToggles["topnav"] = true
|
||||
|
||||
frontendSettings := &dtos.FrontendSettingsDTO{
|
||||
DefaultDatasource: defaultDS,
|
||||
@ -260,7 +264,7 @@ func (hs *HTTPServer) getFrontendSettings(c *contextmodel.ReqContext) (*dtos.Fro
|
||||
EnabledFeatures: hs.License.EnabledFeatures(),
|
||||
},
|
||||
|
||||
FeatureToggles: hs.Features.GetEnabled(c.Req.Context()),
|
||||
FeatureToggles: featureToggles,
|
||||
AnonymousEnabled: hs.Cfg.AnonymousEnabled,
|
||||
AnonymousDeviceLimit: hs.Cfg.AnonymousDeviceLimit,
|
||||
RendererAvailable: hs.RenderService.IsAvailable(c.Req.Context()),
|
||||
|
@ -187,15 +187,6 @@ var (
|
||||
Stage: FeatureStageExperimental,
|
||||
Owner: hostedGrafanaTeam,
|
||||
},
|
||||
{
|
||||
// Some plugins rely on topnav feature flag being enabled, so we cannot remove this until we
|
||||
// can afford the breaking change, or we've detemined no one else is relying on it
|
||||
Name: "topnav",
|
||||
Description: "Enables topnav support in external plugins. The new Grafana navigation cannot be disabled.",
|
||||
Stage: FeatureStageDeprecated,
|
||||
Expression: "true", // enabled by default
|
||||
Owner: grafanaFrontendPlatformSquad,
|
||||
},
|
||||
{
|
||||
Name: "grpcServer",
|
||||
Description: "Run the GRPC server",
|
||||
|
@ -22,7 +22,6 @@ canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,true
|
||||
vizActions,experimental,@grafana/dataviz-squad,false,false,true
|
||||
disableSecretsCompatibility,experimental,@grafana/hosted-grafana-team,false,true,false
|
||||
logRequestsInstrumentedAsUnknown,experimental,@grafana/hosted-grafana-team,false,false,false
|
||||
topnav,deprecated,@grafana/grafana-frontend-platform,false,false,false
|
||||
grpcServer,preview,@grafana/search-and-storage,false,false,false
|
||||
cloudWatchCrossAccountQuerying,GA,@grafana/aws-datasources,false,false,false
|
||||
showDashboardValidationWarnings,experimental,@grafana/dashboards-squad,false,false,false
|
||||
|
|
@ -99,10 +99,6 @@ const (
|
||||
// Logs the path for requests that are instrumented as unknown
|
||||
FlagLogRequestsInstrumentedAsUnknown = "logRequestsInstrumentedAsUnknown"
|
||||
|
||||
// FlagTopnav
|
||||
// Enables topnav support in external plugins. The new Grafana navigation cannot be disabled.
|
||||
FlagTopnav = "topnav"
|
||||
|
||||
// FlagGrpcServer
|
||||
// Run the GRPC server
|
||||
FlagGrpcServer = "grpcServer"
|
||||
|
@ -2987,6 +2987,7 @@
|
||||
"name": "topnav",
|
||||
"resourceVersion": "1720021873452",
|
||||
"creationTimestamp": "2022-06-20T14:25:43Z",
|
||||
"deletionTimestamp": "2024-10-15T15:00:51Z",
|
||||
"annotations": {
|
||||
"grafana.app/updatedTimestamp": "2024-07-03 15:51:13.452477 +0000 UTC"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user