Feature toggles: Remove dashboardEmbed toggle (#86587)

This commit is contained in:
Alex Khomenko
2024-04-19 12:48:08 +02:00
committed by GitHub
parent c5ca90747d
commit 44e1bce55a
8 changed files with 2 additions and 27 deletions

View File

@ -131,7 +131,6 @@ Experimental features might be changed or removed without prior notice.
| `extraThemes` | Enables extra themes |
| `lokiPredefinedOperations` | Adds predefined query operations to Loki query editor |
| `pluginsFrontendSandbox` | Enables the plugins frontend sandbox |
| `dashboardEmbed` | Allow embedding dashboard for external use in Code editors |
| `frontendSandboxMonitorOnly` | Enables monitor only in the plugin frontend sandbox (if enabled) |
| `lokiFormatQuery` | Enables the ability to format Loki queries |
| `vizAndWidgetSplit` | Split panels between visualizations and widgets |

View File

@ -81,7 +81,6 @@ export interface FeatureToggles {
extraThemes?: boolean;
lokiPredefinedOperations?: boolean;
pluginsFrontendSandbox?: boolean;
dashboardEmbed?: boolean;
frontendSandboxMonitorOnly?: boolean;
sqlDatasourceDatabaseSelection?: boolean;
lokiFormatQuery?: boolean;

View File

@ -151,10 +151,6 @@ func (hs *HTTPServer) registerRoutes() {
r.Get("/dashboards/*", reqSignedIn, hs.Index)
r.Get("/goto/:uid", reqSignedIn, hs.redirectFromShortURL, hs.Index)
if hs.Features.IsEnabledGlobally(featuremgmt.FlagDashboardEmbed) {
r.Get("/d-embed", reqSignedIn, middleware.AddAllowEmbeddingHeader(), hs.Index)
}
if hs.Features.IsEnabledGlobally(featuremgmt.FlagPublicDashboards) && hs.Cfg.PublicDashboardsEnabled {
// list public dashboards
r.Get("/public-dashboards/list", reqSignedIn, hs.Index)

View File

@ -66,14 +66,6 @@ func AddDefaultResponseHeaders(cfg *setting.Cfg) web.Handler {
}
}
func AddAllowEmbeddingHeader() web.Handler {
return func(c *web.Context) {
c.Resp.Before(func(w web.ResponseWriter) {
w.Header().Set("X-Allow-Embedding", "allow")
})
}
}
// addSecurityHeaders adds HTTP(S) response headers that enable various security protections in the client's browser.
func addSecurityHeaders(w web.ResponseWriter, cfg *setting.Cfg) {
if cfg.StrictTransportSecurity {

View File

@ -471,13 +471,6 @@ var (
FrontendOnly: true,
Owner: grafanaPluginsPlatformSquad,
},
{
Name: "dashboardEmbed",
Description: "Allow embedding dashboard for external use in Code editors",
FrontendOnly: true,
Stage: FeatureStageExperimental,
Owner: grafanaAsCodeSquad,
},
{
Name: "frontendSandboxMonitorOnly",
Description: "Enables monitor only in the plugin frontend sandbox (if enabled)",

View File

@ -62,7 +62,6 @@ enableDatagridEditing,preview,@grafana/dataviz-squad,false,false,true
extraThemes,experimental,@grafana/grafana-frontend-platform,false,false,true
lokiPredefinedOperations,experimental,@grafana/observability-logs,false,false,true
pluginsFrontendSandbox,experimental,@grafana/plugins-platform-backend,false,false,true
dashboardEmbed,experimental,@grafana/grafana-as-code,false,false,true
frontendSandboxMonitorOnly,experimental,@grafana/plugins-platform-backend,false,false,true
sqlDatasourceDatabaseSelection,preview,@grafana/dataviz-squad,false,false,true
lokiFormatQuery,experimental,@grafana/observability-logs,false,false,true

1 Name Stage Owner requiresDevMode RequiresRestart FrontendOnly
62 extraThemes experimental @grafana/grafana-frontend-platform false false true
63 lokiPredefinedOperations experimental @grafana/observability-logs false false true
64 pluginsFrontendSandbox experimental @grafana/plugins-platform-backend false false true
dashboardEmbed experimental @grafana/grafana-as-code false false true
65 frontendSandboxMonitorOnly experimental @grafana/plugins-platform-backend false false true
66 sqlDatasourceDatabaseSelection preview @grafana/dataviz-squad false false true
67 lokiFormatQuery experimental @grafana/observability-logs false false true

View File

@ -259,10 +259,6 @@ const (
// Enables the plugins frontend sandbox
FlagPluginsFrontendSandbox = "pluginsFrontendSandbox"
// FlagDashboardEmbed
// Allow embedding dashboard for external use in Code editors
FlagDashboardEmbed = "dashboardEmbed"
// FlagFrontendSandboxMonitorOnly
// Enables monitor only in the plugin frontend sandbox (if enabled)
FlagFrontendSandboxMonitorOnly = "frontendSandboxMonitorOnly"

View File

@ -1136,7 +1136,8 @@
"metadata": {
"name": "dashboardEmbed",
"resourceVersion": "1712639261786",
"creationTimestamp": "2024-04-09T05:07:41Z"
"creationTimestamp": "2024-04-09T05:07:41Z",
"deletionTimestamp": "2024-04-19T10:27:36Z"
},
"spec": {
"description": "Allow embedding dashboard for external use in Code editors",