@tailLink(FILE, [LINES], [LABEL], [RETURN], [RETURN_LABEL], [TEXT_MODE], [DISPLAY_WIDTH], [LINE_NUMBER])

Insert a hypertext link that will allow user to view end of file on server.

The following parameters are recognized:

FILE

The full path to the file to display (on the server).

[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 "Continue" 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.

This macro is useful when you want to let the user browse a file on the system. You MUST know all parameters at boot time (no shell subsititions are permitted). If you want to use CGI shell variables, you'll need to use the @tailButton(), @tailLinkEval() or @tailButtonAutoRefresh() macros instead.

Example of using the macro:

@tailLink("/var/log/boot.log","100","boot.log",,,"ASCII","100","checked")

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")
@tailLink("/var/log/boot.log","100","boot.log",,,"ASCII","100","checked")
EOF

This macro is defined as:

@link("@topDir()/cgi-bin/system/tail.cgi?filename=@encodeFormParam("@param(0)")@ifEqual("@param(1)","","","&amp;lines=@encodeFormParam("@param(1)")")&amp;return=@encodeFormParam("@fnb("@param(3)","@outUrl()/index.cgi")")&amp;return_label=@encodeFormParam("@fnb("@param(4)","Exit")")&amp;prevtextmode=@encodeFormParam("@fnb("@param(5)")")&amp;displaywidth=@encodeFormParam("@fnb("@param(6)","95")")&amp;linenum=@encodeFormParam("@fnb("@param(7)")")","@fnb("@param(2)","@param(0)")")