Utils
A set of useful functions that are already packed for you
this.sort(k)
On fleet dashboards, this feature allows you to sort the tiles according to k in ascending order.
For example, if you want to sort the dashboards from the ones that have the most alerts to the less (count of alerts is in alertCount):
getTag(tag, event)
If the tag is found in the event, then it is returned (the String, that is equal to the tag
parameter). Else null
is returned.
setTag(tag, event, toggleTags)
This util sets a tag
on the current event (but does not push it to the server)
If the toggleTags
are passed, they are all removed, exept tag
which is set. It emulates a radio button behavior
clickForTrend
updateFwotProperty
addSamples
Allows to add some samples injected as variables at runtime.
on new messages
Allows to react on new messages, whatever the fwot it is linked on.
onNewMessages takes a function as a parameter that describes the behavior when a new message is sent. You may filter out all the messages that are not related to the current fwot.
Last updated
Was this helpful?