mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
chore: remove unused feature flag (#74460)
This commit removes the validateDashboardsOnSave feature flag that is currently not in use. Closes #70022
This commit is contained in:
parent
34a867b8dc
commit
6ce4af7840
@ -57,7 +57,6 @@ Some features are enabled by default. You can disable these feature by setting t
|
||||
| `migrationLocking` | Lock database during migrations |
|
||||
| `correlations` | Correlations page |
|
||||
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
|
||||
| `validateDashboardsOnSave` | Validate dashboard JSON POSTed to api/dashboards/db |
|
||||
| `autoMigrateOldPanels` | Migrate old angular panels to supported versions (graph, table-old, worldmap, etc) |
|
||||
| `disableAngular` | Dynamic flag to disable angular at runtime. The preferred method is to set `angular_support_enabled` to `false` in the [security] settings, which allows you to change the state at runtime. |
|
||||
| `grpcServer` | Run the GRPC server |
|
||||
|
@ -33,7 +33,6 @@ export interface FeatureToggles {
|
||||
datasourceQueryMultiStatus?: boolean;
|
||||
traceToMetrics?: boolean;
|
||||
newDBLibrary?: boolean;
|
||||
validateDashboardsOnSave?: boolean;
|
||||
autoMigrateOldPanels?: boolean;
|
||||
disableAngular?: boolean;
|
||||
canvasPanelNesting?: boolean;
|
||||
|
@ -392,29 +392,6 @@ func (hs *HTTPServer) PostDashboard(c *contextmodel.ReqContext) response.Respons
|
||||
if err := web.Bind(c.Req, &cmd); err != nil {
|
||||
return response.Error(http.StatusBadRequest, "bad request data", err)
|
||||
}
|
||||
|
||||
if hs.Features.IsEnabled(featuremgmt.FlagValidateDashboardsOnSave) {
|
||||
kind := hs.Kinds.Dashboard()
|
||||
|
||||
dashbytes, err := cmd.Dashboard.Bytes()
|
||||
if err != nil {
|
||||
return response.Error(http.StatusBadRequest, "unable to parse dashboard", err)
|
||||
}
|
||||
// Ideally, coremodel validation calls would be integrated into the web
|
||||
// framework. But this does the job for now.
|
||||
schv, err := cmd.Dashboard.Get("schemaVersion").Int()
|
||||
|
||||
// Only try to validate if the schemaVersion is at least the handoff version
|
||||
// (the minimum schemaVersion against which the dashboard schema is known to
|
||||
// work), or if schemaVersion is absent (which will happen once the kind schema
|
||||
// becomes canonical).
|
||||
if err != nil || schv >= dashboard.HandoffSchemaVersion {
|
||||
if _, _, err := kind.JSONValueMux(dashbytes); err != nil {
|
||||
return response.Error(http.StatusBadRequest, "invalid dashboard json", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return hs.postDashboard(c, cmd)
|
||||
}
|
||||
|
||||
|
@ -104,13 +104,6 @@ var (
|
||||
Stage: FeatureStagePublicPreview,
|
||||
Owner: grafanaBackendPlatformSquad,
|
||||
},
|
||||
{
|
||||
Name: "validateDashboardsOnSave",
|
||||
Description: "Validate dashboard JSON POSTed to api/dashboards/db",
|
||||
Stage: FeatureStagePublicPreview,
|
||||
RequiresRestart: true,
|
||||
Owner: grafanaAsCodeSquad,
|
||||
},
|
||||
{
|
||||
Name: "autoMigrateOldPanels",
|
||||
Description: "Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)",
|
||||
|
@ -14,7 +14,6 @@ correlations,preview,@grafana/explore-squad,false,false,false,false
|
||||
datasourceQueryMultiStatus,experimental,@grafana/plugins-platform-backend,false,false,false,false
|
||||
traceToMetrics,experimental,@grafana/observability-traces-and-profiling,false,false,false,true
|
||||
newDBLibrary,preview,@grafana/backend-platform,false,false,false,false
|
||||
validateDashboardsOnSave,preview,@grafana/grafana-as-code,false,false,true,false
|
||||
autoMigrateOldPanels,preview,@grafana/dataviz-squad,false,false,false,true
|
||||
disableAngular,preview,@grafana/dataviz-squad,false,false,false,true
|
||||
canvasPanelNesting,experimental,@grafana/dataviz-squad,false,false,false,true
|
||||
|
|
@ -67,10 +67,6 @@ const (
|
||||
// Use jmoiron/sqlx rather than xorm for a few backend services
|
||||
FlagNewDBLibrary = "newDBLibrary"
|
||||
|
||||
// FlagValidateDashboardsOnSave
|
||||
// Validate dashboard JSON POSTed to api/dashboards/db
|
||||
FlagValidateDashboardsOnSave = "validateDashboardsOnSave"
|
||||
|
||||
// FlagAutoMigrateOldPanels
|
||||
// Migrate old angular panels to supported versions (graph, table-old, worldmap, etc)
|
||||
FlagAutoMigrateOldPanels = "autoMigrateOldPanels"
|
||||
|
Loading…
Reference in New Issue
Block a user