docs: reorder template functions alphabetically

follow-up after ea41fea453

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
hagen1778
2025-10-30 09:54:40 +01:00
parent ea41fea453
commit 3e0aa46fdb

View File

@@ -334,6 +334,7 @@ Additionally, `vmalert` provides some extra templating functions listed in [temp
* `jsonEscape` - JSON-encodes the input string.
* `label name` - returns the value of the label with the given `name` from the input query result.
* `match regex` - matches the input string against the provided `regex`.
* `now` - returns the Unix timestamp in seconds at the time of the template evaluation.
* `parseDuration` - parses the input string into duration in seconds. For example, `1h` is parsed into `3600`.
* `parseDurationTime` - parses the input string into [time.Duration](https://pkg.go.dev/time#Duration).
* `pathEscape` - escapes the input string, so it can be safely put inside path part of URL.
@@ -355,7 +356,6 @@ Additionally, `vmalert` provides some extra templating functions listed in [temp
* `toTime` - converts the input unix timestamp to [time.Time](https://pkg.go.dev/time#Time).
* `toUpper` - converts all the chars in the input string to uppercase.
* `value` - returns the numeric value from the input query result.
* `now` - returns the Unix timestamp in seconds at the time of the template evaluation.
For example: `{{ (now | toTime).Sub $activeAt }}` will return the duration the alert has been active.
#### Reusable templates