mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:32:19 +08:00
Feature toggles: Remove dashboardEmbed toggle (#86587)
This commit is contained in:
@ -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 |
|
||||
|
@ -81,7 +81,6 @@ export interface FeatureToggles {
|
||||
extraThemes?: boolean;
|
||||
lokiPredefinedOperations?: boolean;
|
||||
pluginsFrontendSandbox?: boolean;
|
||||
dashboardEmbed?: boolean;
|
||||
frontendSandboxMonitorOnly?: boolean;
|
||||
sqlDatasourceDatabaseSelection?: boolean;
|
||||
lokiFormatQuery?: boolean;
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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)",
|
||||
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
@ -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",
|
||||
|
Reference in New Issue
Block a user