Inserts a <span> which the user can click on for AJAX updates about a interface on the server.
The following parameters are recognized:
The interface to get information for.
What to put inside the <span> (what the user will see) - if omitted, defaults to the interface name.
Any other additional attributes to apply to the <span>.
This macro allows one to insert a <span> entity into the HTML document being produced such that when the user "Clicks On" the entity, a DOM tooltip will be displayed (and periodically updated) showing information about the interface. NOTE: You must invoke the "NstWui.initialize();" JavaScript command in the <head> section of your page in order to enable the dynamic tooltips.
Example of using the macro:
@networkInterface("eth0") @networkInterface("lo","Loop Back","@htmlAttr("id","loopback")")
Assuming the com.ccg.macros.at.All
class is within your CLASSPATH
and the
config/html.at
macros file has been
generated (Hint: run make atmacros in the
wui
directory), a developer should be able to
run the above example by copy/pasting from below:
[root@probe root]#
java com.ccg.macros.at.All <<EOF
@include("config/html.at",,"d")
@networkInterface("eth0") @networkInterface("lo","Loop Back","@htmlAttr("id","loopback")")
EOF
This macro is defined as:
@htmlEntity("span","@fnb("@param(1)","@param(0)")","@htmlAttr("title","@param(0)")@htmlAttr("class","networkInterface")@param(2)")