Merge pull request #48422 from vinayakankugoyal/shortcode

Update the feature-state shortcode to display the default value.
pull/48572/head
Kubernetes Prow Robot 2024-10-23 18:56:53 +01:00 committed by GitHub
commit cc33a61fdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -161,6 +161,9 @@ other = "Were you looking for:"
[examples_heading]
other = "Examples"
[feature_gate_enabled]
other = "(enabled by default: {{ .enabled }})"
[feature_gate_stage_alpha]
other = "Alpha"

View File

@ -33,7 +33,7 @@
<div class="feature-state-notice feature-{{ .stage }}" title="{{ printf "%s %s" (T "feature_state_feature_gate_tooltip") $feature_gate_name }}">
<span class="feature-state-name">{{ T "feature_state" }}</span>
<code>{{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}]</code>
<code>{{ T "feature_state_kubernetes_label" }} v{{ .fromVersion }} [{{ .stage }}]</code> {{ T "feature_gate_enabled" (dict "enabled" .defaultValue) }}
</div>
{{- $featureGateFound = true -}}