Templates notifications helpers
Conditional helpers using Mustache syntax
Example:
```
{{#if (eq object.severity 2) }}MEDIUM {{else}}Other {{/if}}
```
Find additional supported operators in [the official Handlebars documentation](https://www.javadoc.io/static/com.github.jknack/handlebars/4.1.0/com/github/jknack/handlebars/helper/ConditionalHelpers.html).
Data formatting helpers
The following helpers are available to format your data:
Helper | Description | Usage | Output |
---|---|---|---|
tlpLabel |
Format the tlp field of the object |
{{ tlpLabel object.tlp }} |
Amber |
papLabel |
Format the pap field of the object |
{{ papLabel object.pap }} |
Amber |
severityLabel |
Format the severity field of the object |
{{ severityLabel object.severity }} |
Critical |
dateFormat |
Format a date field of the object using Java date time patterns | {{dateFormat audit._createdAt "EEEEE dd MMMMM yyyy" "fr" }} |
jeudi 01 septembre 2022 |
Standard string helpers can be found in the official Handlebars documentation.