mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
add missing render template section to renderAlertTemplate in alerts utils
This commit is contained in:
parent
3b91ddda27
commit
b3469a0ac4
1 changed files with 7 additions and 0 deletions
|
|
@ -591,6 +591,13 @@ ${value} ${
|
|||
${targetTemplate}`;
|
||||
}
|
||||
|
||||
// render the template
|
||||
if (rawTemplateBody) {
|
||||
registerHelpers(rawTemplateBody);
|
||||
const compiledTemplate = hb.compile(rawTemplateBody);
|
||||
return compiledTemplate(view);
|
||||
}
|
||||
|
||||
throw new Error(`Unsupported alert source: ${(alert as any).source}`);
|
||||
};
|
||||
// ------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue