rename extendeddata to notificationdata

This commit is contained in:
Pepe Cano
2024-10-16 16:35:31 +02:00
parent cb70f995a4
commit b75d6c33cf
4 changed files with 14 additions and 14 deletions
@@ -29,11 +29,11 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
reference-extendeddata:
reference-notificationdata:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
---
# Alerting template language
@@ -64,7 +64,7 @@ To print the value of something, use `{{` and `}}`. You can print the value of a
In `text/template`, there is a special cursor called dot, written as `.`. You can think of this cursor as a variable whose value changes depending on where in the template it is used.
At the start of notification templates, dot (`.`) refers to [ExtendedData](ref:reference-extendeddata).
At the start of notification templates, dot (`.`) refers to [Notification Data](ref:reference-notificationdata).
```
{{ .Alerts }}
@@ -34,11 +34,11 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/language/#range
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/language/#range
reference-extended-data:
reference-notification-data:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
language-variables:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/language/#variables
@@ -127,7 +127,7 @@ There are {{ len $alert.Labels }}
### Iterate over alerts
To print just the labels of each alert, rather than all information about the alert, you can use a `range` to iterate the alerts, which are initialized with data. See [ExtendedData](ref:reference-extended-data).
To print just the labels of each alert, rather than all information about the alert, you can use a `range` to iterate the alerts, which are initialized with data. See [ExtendedData](ref:reference-notification-data).
```
{{ range .Alerts }}
@@ -136,7 +136,7 @@ To print just the labels of each alert, rather than all information about the al
```
- [`{{ range }}`](ref:language-range): Introduces looping through alerts to display multiple instances.
- [ExtendedData](ref:reference-extended-data): additional data that is not part of the standard set of fields the [dot](ref:language-dot) cursor is initialized with.
- [ExtendedData](ref:reference-notification-data): additional data that is not part of the standard set of fields the [dot](ref:language-dot) cursor is initialized with.
### Iterate over annotations and labels
@@ -33,11 +33,11 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
reference-extendeddata:
reference-notificationdata:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#extendeddata
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
---
# Alerting template language
@@ -68,7 +68,7 @@ To print the value of something, use `{{` and `}}`. You can print the value of a
In `text/template`, there is a special cursor called dot, written as `.`. You can think of this cursor as a variable whose value changes depending on where in the template it is used.
At the start of notification templates, dot (`.`) refers to [ExtendedData](ref:reference-extendeddata).
At the start of notification templates, dot (`.`) refers to [Notification Data](ref:reference-notificationdata).
```
{{ .Alerts }}
@@ -100,7 +100,7 @@ Here's an example that prints all available notification data from dot (`.`):
| `Fingerprint` | string | A unique string that identifies the alert |
| `ValueString` | string | A string that contains the labels and value of each reduced expression in the alert. |
This example iterates over the list of firing and resolved alerts in the notification and prints the data for each alert:
This example iterates over the list of firing and resolved alerts (`.Alerts`) in the notification and prints the data for each alert:
```
{{ define "custom_template" }}