hotfix: fix current version shortcode bug, closes influxdata/influxdb#24113

pull/4772/head^2
Scott Anderson 2023-02-28 16:25:53 -07:00
parent 6dbb08b07c
commit 07ccf4d05f
2 changed files with 4 additions and 2 deletions

View File

@ -31,7 +31,7 @@ during the following operations:
- Writing to the [`/write` v1 compatibility endpoint](/influxdb/v2.6/reference/api/influxdb-1x/write/)
- {{% cloud-only %}}[Upgrading from InfluxDB 1.x to InfluxDB Cloud](/influxdb/v2.6/upgrade/v1-to-cloud/){{% /cloud-only %}}
- {{% oss-only %}}[Upgrading from InfluxDB 1.x to {{< current-version >}}](/influxdb/v2.6/upgrade/v1-to-v2/){{% /oss-only %}}
- {{% oss-only %}}[Upgrading from InfluxDB 1.x to {{< current-version noSpan=true >}}](/influxdb/v2.6/upgrade/v1-to-v2/){{% /oss-only %}}
- {{% oss-only %}}Creating a bucket ([virtual DBRPs](#virtual-dbrp-mappings)){{% /oss-only %}}
For more information, see [Database and retention policy mapping](/influxdb/v2.6/reference/api/influxdb-1x/dbrp/).

View File

@ -3,5 +3,7 @@
{{- $keep := .Get "keep" | default false -}}
{{- $keepClass := cond ( $keep ) " keep" "" -}}
{{- $isCloud := in $currentVersion "cloud" -}}
{{- $noSpan := .Get "nospan" | default false }}
{{- $versionText := cond ($isCloud) "Cloud" $currentVersion -}}
<span class="current-version{{ $keepClass }}">{{- $versionText -}}</span>
{{- if $noSpan -}}{{- $versionText -}}{{- else -}}
<span class="current-version{{ $keepClass }}">{{- $versionText -}}</span>{{- end -}}