Insert a hypertext link that will allow user to view end of file on server.
The following parameters are recognized:
The full path to the file to display (on the server).
The maximum number of lines to display, or "all" (the default) for entire file.
The text the user clicks on. If omitted defaults to FILE.
The URL to return to when user finishes browsing file. If omitted, returns to index page of WUI.
The label to put on the "return" button. Defaults to "Continue" if omitted.
Can be used to force the displayed text mode to: "ASCII" or "Hex".
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.
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)","","","&lines=@encodeFormParam("@param(1)")")&return=@encodeFormParam("@fnb("@param(3)","@outUrl()/index.cgi")")&return_label=@encodeFormParam("@fnb("@param(4)","Exit")")&prevtextmode=@encodeFormParam("@fnb("@param(5)")")&displaywidth=@encodeFormParam("@fnb("@param(6)","95")")&linenum=@encodeFormParam("@fnb("@param(7)")")","@fnb("@param(2)","@param(0)")")