Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.

Float values instead of integer in Performance portlet


I'm using Performance portlet to visualize the incidents amount per
hour as a bar chart. The adapter returns integer values (incidents
counter), but when I add this counter in performance porlet, it shows
float values. It looks like if we had 2.279 incidents at 10 AM.
How can I configure the portlet not to change initial values received
from the adapter?

Thank you in advance.

SmiLena's Profile: http://forums.novell.com/member.php?userid=109527
View this thread: http://forums.novell.com/showthread.php?t=450035

Labels (1)
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: Float values instead of integer in Performance portlet

Hello SmiLena,

Not sure if there is a configuration option available in the GUI but
what you can do is add some code to your adapter hierarchy file.
I personally like that because you modify the values immediately when
they come into your NetIQ NOC.

<test invert="false" type="script"><![CDATA[
var test = [your value];
test = parseFloat(test);
test = Math.round(test);
test = test.toFixed(0);
alarm.setField('Incidents', test);
formula.log.debug("Error in truncate alarm: " + alarm["Node"] + "-" +

Hopefully this helps.


jvangassel's Profile: http://forums.novell.com/member.php?userid=80740
View this thread: http://forums.novell.com/showthread.php?t=450035

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.