Prabal864 commented on issue #1343:
URL: https://github.com/apache/hertzbeat/issues/1343#issuecomment-5343241524

   Hi, I'd like to work on this if it's still wanted. I looked at how templates 
are currently rendered — AbstractAlertNotifyHandlerImpl.renderContent() uses 
FreeMarker to render NoticeTemplate.content against a GroupAlert model, but 
it's only invoked when an alert actually fires (or via the existing 
/receiver/send-test-msg endpoint, which tests a receiver channel, not a 
template).
   
   My plan: pull the FreeMarker rendering into a shared utility, add a new 
endpoint (e.g. POST /api/notice/template/preview) that renders a given 
template's content against a mock/sample alert, and wire up a "Preview" button 
in the template editor that calls it and shows the rendered output without 
sending anything.
   
   Let me know if that approach sounds right — happy to adjust before I start.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to