Enhance Flux functions lists (#5221)
* WIP flux function list * fix isset error with icon shortcode * Update content/flux/v0/spec/variables.md Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com> --------- Co-authored-by: Jason Stirnaman <stirnamanj@gmail.com>pull/5223/head
parent
c4cab2d99d
commit
638c694de8
|
@ -12,6 +12,17 @@ h2,h3,h4 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.function-list a.experimental::after {
|
||||||
|
content: '\e903';
|
||||||
|
font-family: 'icomoon-v4';
|
||||||
|
margin-left: .45rem;
|
||||||
|
color: rgba($article-text, .35);
|
||||||
|
// font-size: .75em;
|
||||||
|
font-style: normal;
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
#flux-group-keys-demo {
|
#flux-group-keys-demo {
|
||||||
table {
|
table {
|
||||||
margin-bottom: 1.25rem;
|
margin-bottom: 1.25rem;
|
||||||
|
|
|
@ -53,6 +53,10 @@ and important function behaviors.
|
||||||
- [Function types](#function-types)
|
- [Function types](#function-types)
|
||||||
- [Function categories](#function-categories)
|
- [Function categories](#function-categories)
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
The {{% icon "experimental" %}} icon indicates the function is experimental.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Function types
|
## Function types
|
||||||
|
|
|
@ -9,6 +9,8 @@ weight: 104
|
||||||
aliases:
|
aliases:
|
||||||
- /influxdb/v2/reference/flux/language/variables/
|
- /influxdb/v2/reference/flux/language/variables/
|
||||||
- /influxdb/cloud/reference/flux/language/variables/
|
- /influxdb/cloud/reference/flux/language/variables/
|
||||||
|
related:
|
||||||
|
- /flux/v0/get-started/syntax-basics/#variables, Flux syntax basics - assign variables
|
||||||
---
|
---
|
||||||
|
|
||||||
A **variable** represents a storage location for a single value.
|
A **variable** represents a storage location for a single value.
|
||||||
|
|
|
@ -18,4 +18,8 @@ see [Flux function types and categories](/flux/v0/function-types/).
|
||||||
|
|
||||||
{{< list-filters "flux" >}}
|
{{< list-filters "flux" >}}
|
||||||
|
|
||||||
|
{{% note %}}
|
||||||
|
The {{% icon "experimental" %}} icon indicates the function is experimental.
|
||||||
|
{{% /note %}}
|
||||||
|
|
||||||
{{< flux/list-all-functions >}}
|
{{< flux/list-all-functions >}}
|
||||||
|
|
|
@ -1,12 +1,9 @@
|
||||||
influxdb:
|
influxdb:
|
||||||
default: v4
|
default: v4
|
||||||
cloud: v4
|
cloud: v4
|
||||||
v2.6: v4
|
|
||||||
v2.4: v4
|
flux:
|
||||||
v2.3: v3
|
default: v4
|
||||||
v2.2: v3
|
|
||||||
v2.1: v3
|
|
||||||
v2.0: v2
|
|
||||||
|
|
||||||
enterprise_influxdb:
|
enterprise_influxdb:
|
||||||
default: v2
|
default: v2
|
||||||
|
|
|
@ -4,25 +4,26 @@
|
||||||
{{ $filterArr := split $filters ", "}}
|
{{ $filterArr := split $filters ", "}}
|
||||||
{{ $tagTaxonomy := print $section "/" $currentVersion "/tags" }}
|
{{ $tagTaxonomy := print $section "/" $currentVersion "/tags" }}
|
||||||
|
|
||||||
<ul>
|
<ul class="function-list">
|
||||||
{{ range where $.Site.RegularPages.ByTitle "Section" $section }}
|
{{ range where $.Site.RegularPages.ByTitle "Section" $section }}
|
||||||
{{ $title := cond (isset .Page.Params "list_title") (replaceRE `\ function` "" .Page.Params.list_title) (replaceRE `\ function` "" .Title) }}
|
{{ $title := replaceRE `\ function` "" .Title }}
|
||||||
{{ $deprecated := isset .Page.Params "deprecated" }}
|
{{ $deprecated := isset .Page.Params "deprecated" }}
|
||||||
{{ $removed := isset .Page.Params "removed" }}
|
{{ $removed := isset .Page.Params "removed" }}
|
||||||
|
{{ $experimental := in .Page.RelPermalink "experimental" }}
|
||||||
{{ $tagList := index .Page.Params $tagTaxonomy | default (slice "") }}
|
{{ $tagList := index .Page.Params $tagTaxonomy | default (slice "") }}
|
||||||
|
|
||||||
{{ if ne $filters "" }}
|
{{ if ne $filters "" }}
|
||||||
{{ if gt (len (intersect $filterArr (index .Page.Params $tagTaxonomy))) 0}}
|
{{ if gt (len (intersect $filterArr (index .Page.Params $tagTaxonomy))) 0}}
|
||||||
{{ if and (in .RelPermalink (print $section "/" $currentVersion "/")) (in .Title "() function") }}
|
{{ if and (in .RelPermalink (print $section "/" $currentVersion "/")) (in .Title "() function") }}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ .RelPermalink }}">{{ $title }}</a>{{ if $deprecated }} <em style="opacity:.35">– (deprecated)</em>{{ end }}
|
<a href="{{ .RelPermalink }}"{{ if $experimental }} class="experimental"{{end}}>{{ $title }}</a>{{ if $deprecated }} <em style="opacity:.35">– (deprecated)</em>{{ end }}
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if and (in .RelPermalink (print $section "/" $currentVersion "/")) (in .Title "() function") }}
|
{{ if and (in .RelPermalink (print $section "/" $currentVersion "/")) (in .Title "() function") }}
|
||||||
<li class="filter-item visible" data-tags='{{ replaceRE "/" "-" (delimit (apply $tagList "urlize" ".") " ") }}'>
|
<li class="filter-item visible" data-tags='{{ replaceRE "/" "-" (delimit (apply $tagList "urlize" ".") " ") }}'>
|
||||||
<a href="{{ .RelPermalink }}">{{ $title }}</a>
|
<a href="{{ .RelPermalink }}"{{ if $experimental }} class="experimental"{{end}}>{{ $title }}</a>
|
||||||
{{ if $removed }} <em style="opacity:.35">– (removed)</em>
|
{{ if $removed }} <em style="opacity:.35">– (removed)</em>
|
||||||
{{ else if $deprecated }} <em style="opacity:.35">– (deprecated)</em>{{ end }}
|
{{ else if $deprecated }} <em style="opacity:.35">– (deprecated)</em>{{ end }}
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -253,5 +253,7 @@
|
||||||
<span class="inline {{ $version }} cf-icon Group"></span>
|
<span class="inline {{ $version }} cf-icon Group"></span>
|
||||||
{{- else if or (eq $icon "billing") (eq $icon "bill") -}}
|
{{- else if or (eq $icon "billing") (eq $icon "bill") -}}
|
||||||
<span class="inline {{ $version }} cf-icon Bill"></span>
|
<span class="inline {{ $version }} cf-icon Bill"></span>
|
||||||
|
{{- else if or (eq $icon "flask") (eq $icon "beaker") (eq $icon "experimental") -}}
|
||||||
|
<span class="inline {{ $version }} cf-icon Flask middle"></span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
Loading…
Reference in New Issue