Emiliano Gabrielli wrote: |
Emiliano Gabrielli wrote: | rev 1.703 makes the following code not to work:
Display Subject = <b>$subject</b>
the <b> tag is displayed and not interpreted, as it was in previous revisions.. |
this patch should fix the problem .. a little bug still remain, if you insert some allowed HTML tags in the subject this is detected by is_html() so the Display Attribute and the Link is not applied .. the result is that the HTML is working but no elog featur is applied |
Your line
if (p && strchr(str, '>') && p >= str && *(p-1) != '\\')
in the code does not work. If the pattern is at the beginning of the string (p == str), then (p-1) points to an invalid location and can cause a segmentation fault. The correct patch is in CVS. |
Emiliano Gabrielli wrote: | the very usefull thing my request will enable is the following:
Options Category = Info,Report,Problem{1},Other
Preset Category = Info
Display Category = <img style="border:0; float:left; margin-right:5px" src="icons/$category.png">$category
{1}ROptions Level = Notice,Warning,Alert,Fixed
{1}Preset Level = Warning
{1}Display Category = <img style="border:0; float:left; margin-right:5px" src="icons/$level.png">$category
note that this way I could use a single field to have the both the category name and the level icon .. this is specially usefull for a "problem" or "bug" category, becouse this way one can see status of the "bug"..
.. I'd really like conditional Display |
You asked for ELCode tags not to be interpreted inside any [code] tag, but now the above entry gets screwed since you used it there! So no formatting any more in [code] section |
Juliana Peng wrote: | Thanks so much. But the new feature seems not working. |
Are you sure you got the latest CVS version and recompiled correctly?
I tried with following config:
[global]
port = 8080
[demo]
Attributes = Name, SysAdmin, OS, Manufacturer, Model, Serial Number, Description, Main Function, Location, Memory, CPU Speed, Num CPU, Owner, Contact Name, Contact Phone, Contact Email, Bought From, Bought Date, Maintenance, Network Drop, Console Drop
Options OS = SunOs{1}, Linux{2}, Aix
{1} Show Attributes = Name, SysAdmin, OS, Manufacturer, Model, Serial Number, Description
Then I added two entries, where OS = SunOS and Aix. As soon as I select SunOS, the attributes except those listed in {1} disappear. The same is true then for the single entry display. Here is the one with the Aix:
and here with SunOS:
So can you reproduce this? |
Emiliano Gabrielli wrote: | - only "Author" and "subject" is displayed (text too of course) |
That was a bug. I fixed it in CVS.
Emiliano Gabrielli wrote: | In full list mode:
- nothing changed, no conditional display is working |
What do you want? In full mode you have a multi-column display of attributes. If you display a different number of attributes for each entry, the table gets screwed up and becomes very hard to read.
BTW: Conditional attributes now also work for email notifications, so you can do for example:
Attributes = Author, Category, Email encoding, Subject
Options Email encoding = plain{1}, HTML{2}
{1} Email encoding = 1
{2} Email encoding = 2
|