Inserts a NST WUI style button to launch a X based application.
The following parameters are recognized:
The application (and any necessary arguments) to run (DO NOT USE double quotes).
The label to display on the button.
URL to continue to after launching X applications (defaults to WUI index page if omitted).
Optional title attribute to appear as a tooltip to the user when their mouse hovers over the button.
Used to set a unique ID you want returned. Useful for passing a parameter back to a calling cgi script. NOTE: You need to encode/escape the form parameter yourself.
Optional return from label.
Optional exit text label.
Optional set of attributes to apply to input entity.
Example of using the macro:
@wuiXButton("/usr/local/bin/nessus","Nessus Client","@outUrl()/cgi-bin/networking/nessus.cgi")
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")
@wuiXButton("/usr/local/bin/nessus","Nessus Client","@outUrl()/cgi-bin/networking/nessus.cgi")
EOF
This macro is defined as:
<form@htmlAttr("action","@topDir()/cgi-bin/server/x.cgi")> @wuiInputHidden("xapp","@param(0)") @ifEqual("@param(2)",,,"@wuiInputHidden("return","@param(2)")") @ifEqual("@param(5)",,,"@wuiInputHidden("return_from","@param(5)")") @ifEqual("@param(6)",,,"@wuiInputHidden("return_label","@param(6)")") @wuiInputHidden("synckey","@fnb("@param(4)")") @wuiInputButton("x","@param(1)","@param(3)","@fnb("@param(7)","@htmlAttr("style","display: inline;")")") </form>