@ipHostNameTW(IPv46ADDRESSORHOSTNAME, [ID], [ATTRS])

Embed an NST Shell Console IPv4, IPv6 Address or Host Name Tools Widget in a span element.

The following parameters are recognized:

IPv46ADDRESSORHOSTNAME

The IPv4, IPv6 Address or Host Name to initially populate the IPv4, IPv6 Address or Host Name Tools Widget with.

[ID]

This optional setting is intended for functions which generated the use of this atmacro at run time (as opposed to compilation time). If you include this parameter - make sure it is a unique ID).

[ATTRS]

Allows one to pass optional attributes to the <hostNameToolsWidget> entity.

This macro is smart in that it is used to Embed either an NST Shell Console IPv4, IPv6 Address Tools Widget or an NST Shell Console Host Name Tools Widget into a span element on an NST WUI page.

Example of using the macro:

      @ipHostNameTW("www.trx.com")
    

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")

      @ipHostNameTW("www.trx.com")
    
EOF

This macro is defined as:

@define("iphostnametw_cnt","0","ifnew")@increment("iphostnametw_cnt")<span@htmlAttr("id","@ifEqual("@param(1)",,"iphostnametw_id@iphostnametw_cnt()","@param(1)")")@ifEqual("@param(2)",,,"@param(2)")>@param(0)@javascriptBegin()NstShell.Widget.spanIpHostToolsWidget('@ifEqual("@param(1)",,"iphostnametw_id@iphostnametw_cnt()","@param(1)")', '@param(0)');@javascriptEnd()</span>