@tailLinkEval(FILE, [LINES], [LABEL], [RETURN], [RETURN_LABEL], [TEXT_MODE], [DISPLAY_WIDTH], [LINE_NUMBER], [SYNCKEY], [IEFORCEJUMP])

Insert a hypertext link that will allow user to view a file with the NST File Viewer.

The following parameters are recognized:

FILE

The full path file name to display (on the server) can be a environment variable or function call.

[LINES]

The maximum number of lines to display, or "all" (the default) for entire file.

[LABEL]

The text the user clicks on. If omitted defaults to FILE.

[RETURN]

The URL to return to when user finishes browsing file. If omitted, returns to index page of WUI.

[RETURN_LABEL]

The label to put on the "Return" button. Defaults to "Return" if omitted.

[TEXT_MODE]

Can be used to force the displayed text mode to: "ASCII" or "Hex".

[DISPLAY_WIDTH]

Can be used to change the width of the text area box displaying the file content. It is expressed as a percentage of the browser's window width. A default value of 95 percent is used.

[LINE_NUMBER]

Used to add line numbers preceding each line of a file. Set the value to "checked" for line numbers or leave blank to disable.

[SYNCKEY]

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.

[IEFORCEJUMP]

Used for jumping to an exact location on a page specific to the IE browser when returning from the NST File Viewer. Set this parameter to an "ID Tag Attribute" on the page as an anchor to jump to.

This macro is useful when you want to let the user browse a file on the system. Unlike the @tailLink() macro, you are permitted to use shell subsititions. NOTE: The FILE parameter will be passed to the url_esc_seq function found in form.sh. Also note that you are responsible for making sure that the FILE parameter is a properly escaped (or quoted) bash argument.

Example of using the macro:

@tailLinkEval("${WUI_LOG_FILE}","100","boot.log",,,"ASCII","100","checked")

Assuming the com.ccg.macros.at.All class is within your CLASSPATH and the config/bash.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/bash.at",,"d")
@tailLinkEval("${WUI_LOG_FILE}","100","boot.log",,,"ASCII","100","checked")
EOF

This macro is defined as:

<span@ttNSTFileViewer("@param(0)","$(calcDomTTLen "@param(0)" 50 300 1600)")>@link("@topDir()/cgi-bin/system/tail.cgi?filename=$(url_esc_seq @param(0))&amp;lines=@encodeFormParam("@fnb("@param(1)","100")")&amp;return=@encodeFormParam("@fnb("@param(3)","@outUrl()/index.cgi")")&amp;return_label=@encodeFormParam("@fnb("@param(4)","Return")")&amp;prevtextmode=@encodeFormParam("@fnb("@param(5)")")&amp;displaywidth=@encodeFormParam("@fnb("@param(6)","95")")&amp;synckey=@param(8)&amp;ieForceJump=@param(9)&amp;linenum=@encodeFormParam("@fnb("@param(7)")")","@fnb("@param(2)","@param(0)")")</span>