FeatureFlags: Support hiding from docs (#69261)

This commit is contained in:
Ryan McKinley
2023-05-30 09:04:01 -07:00
committed by GitHub
parent f3f3b1494d
commit a61d828998
4 changed files with 3 additions and 2 deletions
@@ -49,7 +49,6 @@ Some stable features are enabled by default. You can disable a stable feature by
| `panelTitleSearch` | Search for dashboards using panel title |
| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint |
| `publicDashboards` | Enables public access to dashboards |
| `publicDashboardsEmailSharing` | Enables public dashboard sharing to be restricted to only allowed emails |
| `migrationLocking` | Lock database during migrations |
| `correlations` | Correlations page |
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |
+1
View File
@@ -96,4 +96,5 @@ type FeatureFlag struct {
RequiresRestart bool `json:"requiresRestart,omitempty"` // The server must be initialized with the value
RequiresLicense bool `json:"requiresLicense,omitempty"` // Must be enabled in the license
FrontendOnly bool `json:"frontend,omitempty"` // change is only seen in the frontend
HideFromDocs bool `json:"hideFromDocs,omitempty"` // don't add the values to docs
}
+1
View File
@@ -59,6 +59,7 @@ var (
State: FeatureStateBeta,
RequiresLicense: true,
Owner: grafanaDashboardsSquad,
HideFromDocs: true,
},
{
Name: "lokiLive",
+1 -1
View File
@@ -309,7 +309,7 @@ func writeToggleDocsTable(include func(FeatureFlag) bool, showEnableByDefault bo
data := [][]string{}
for _, flag := range standardFeatureFlags {
if include(flag) {
if include(flag) && !flag.HideFromDocs {
row := []string{"`" + flag.Name + "`", flag.Description}
if showEnableByDefault {
on := ""