Embed an NST Shell run command console with the Font control window size set to 'fit' mode.
The following parameters are recognized:
The commands (Bash style syntax) to run.
This optional setting is a file name prefix typically used with the Font Control NST File Viewer PDF title name or download file name.
This optional setting is intended for functions which generated run command output at run time (as opposed to compilation time). If you include this parameter - make sure it is a unique ID).
This optional setting specifies set of configuration parameters to pass to the FontControl(node, param) contstructor. This needs to be in the form of a JavaScript structure (JSON Object). ***Note: If this parameter is specified then the FILENAMEPREFIX parameter will not be honored. Include it in the PARAMS JSON object.
This optional setting specifies set of configuration parameters to pass to the NstShell.Console(id, coParams) contstructor. This needs to be in the form of a JavaScript structure (JSON Object).
This optional setting sets a progress text string.
This macro is used to Embed an NST Shell run command console into an NST WUI page with the Font Control initially set to the 'Fit' mode.
Example of using the macro:
@nstShellRunCommandFit("/bin/cat /etc/hosts","cat hosts file")
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")
@nstShellRunCommandFit("/bin/cat /etc/hosts","cat hosts file")
EOF
This macro is defined as:
@nstShellRunCommand("@param(0)",,"@ifEqual("@param(2)",,,"@param(2)")","{ initMode: 'fit'@ifEqual("@param(1)",,,", fileNamePrefix: \"@fnb("@param(1)","nst-console")\"") }","@ifEqual("@param(4)",,"{ showLineNum: true, showRc: true, gaps: 1, showFit: true, showClear: true, showRun: true, scrollTop: true, showInit: true, progressText: \"@ifEqual("@param(5)",,,"@param(5)")\" }","@param(4)")")