Templates helpers
Helpers using Handlebars
Data transformation helpers#
| 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.
Conditional helpers#
Examples:
- Displays Medium if
case.severityequals 2, otherwise displays Other:
{{#if (eq case.severity 2)}}
Medium
{{else}}
Other
{{/if}}
- Displays the threat actor value only if
case.customFieldValues.threat-actoris defined:
{{#if case.customFieldValues.threat-actor}}
Threat Actor: {{case.customFieldValues.threat-actor}}
{{/if}}
Find additional supported operators in the official Handlebars documentation.