![]() |
![]() |
Subject: | [solved] 4.2.5 Transforms do not generate HTML |
Author: | Chris Hubbard |
Posted: | 2014-06-10 17:12 |
In the Zenoss 3.X releases I had created transforms that generated HTML links in the evt.message area. I notice that now, the HTML that I was generating does not get parsed. Is there a way to force the display to parse the HTML that is being generated in the transform, instead of displaying it as raw text
Here is an example:
searchTSG='http://wiki.iwillfearnoevil.com/index.phptitle=Special%3ASearch&search=... + component2 + '&go=Go" target="_blank">SEARCH TSG'
I want to be able to display the link itself, not the text
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
Subject: | Hi, |
Author: | Andrew Kirch |
Posted: | 2014-06-11 14:44 |
Hi,
Awesome avatar/sig. I'd suggest taking a look at the HTML source of the notification e-mail you're getting and see if what it's outputting matches what you think is there. The answer may be obvious, if it's not at that point, reply with the transform, and the output you get.
Thanks!
Andrew Kirch
akirch@gvit.com
Need Zenoss support, consulting or custom development Look no further. Email or PM me!
Ready for Distributed Topology (collectors) for Zenoss 5 Coming May 1st from GoVanguard
Subject: | This has been solved. If you |
Author: | Chris Hubbard |
Posted: | 2014-06-13 15:19 |
This has been solved. If you need to generate HTML links in your monitoring output, the zenoss-compiled.js needs to be edited. This is a horrible way of doing this, but it does work.
Path is here:
/opt/zenoss/Products/ZenUI3/browser/resources/js/deploy
use vi on zenoss-compiled.js
Search for 'l=Ext.htmlEncode(l)' and change it to 'l=Ext.htmlDecode(l)'
Now both evt.summary as well as evt.message will be able to have HTML links in the output.
I do not recommend ever using
or
when making HTML inline, but putting in links to TSG's based on the alarm type is sure useful.
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
< |
Previous How to minimize event notifications on email? |
Next Zenoss 4.2.x on OpenSUSE? |
> |