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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 2 deletions

View File

@ -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 | | `panelTitleSearch` | Search for dashboards using panel title |
| `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint | | `prometheusAzureOverrideAudience` | Experimental. Allow override default AAD audience for Azure Prometheus endpoint |
| `publicDashboards` | Enables public access to dashboards | | `publicDashboards` | Enables public access to dashboards |
| `publicDashboardsEmailSharing` | Enables public dashboard sharing to be restricted to only allowed emails |
| `migrationLocking` | Lock database during migrations | | `migrationLocking` | Lock database during migrations |
| `correlations` | Correlations page | | `correlations` | Correlations page |
| `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services | | `newDBLibrary` | Use jmoiron/sqlx rather than xorm for a few backend services |

View File

@ -96,4 +96,5 @@ type FeatureFlag struct {
RequiresRestart bool `json:"requiresRestart,omitempty"` // The server must be initialized with the value RequiresRestart bool `json:"requiresRestart,omitempty"` // The server must be initialized with the value
RequiresLicense bool `json:"requiresLicense,omitempty"` // Must be enabled in the license RequiresLicense bool `json:"requiresLicense,omitempty"` // Must be enabled in the license
FrontendOnly bool `json:"frontend,omitempty"` // change is only seen in the frontend FrontendOnly bool `json:"frontend,omitempty"` // change is only seen in the frontend
HideFromDocs bool `json:"hideFromDocs,omitempty"` // don't add the values to docs
} }

View File

@ -59,6 +59,7 @@ var (
State: FeatureStateBeta, State: FeatureStateBeta,
RequiresLicense: true, RequiresLicense: true,
Owner: grafanaDashboardsSquad, Owner: grafanaDashboardsSquad,
HideFromDocs: true,
}, },
{ {
Name: "lokiLive", Name: "lokiLive",

View File

@ -309,7 +309,7 @@ func writeToggleDocsTable(include func(FeatureFlag) bool, showEnableByDefault bo
data := [][]string{} data := [][]string{}
for _, flag := range standardFeatureFlags { for _, flag := range standardFeatureFlags {
if include(flag) { if include(flag) && !flag.HideFromDocs {
row := []string{"`" + flag.Name + "`", flag.Description} row := []string{"`" + flag.Name + "`", flag.Description}
if showEnableByDefault { if showEnableByDefault {
on := "" on := ""