Job Reports: List
#!/bin/csh -f
# The rest is -*- Tcl -*- exec vovsh -f $0 $*
# This is file tutorial.cgi
VOVHTML_START
HTML {
HEAD { TITLE "CGI Tutorial" }
BODY {
set setId [vtk_set_find "System:jobs"]
OL {
foreach job [vtk_set_get_elements $setId "@ID@ @STATUS@ @HOST@"] {
LI { OUT $job }
}
}
}
}
VOVHTML_FINISH
- vtk_set_find takes a set name and returns its the set id. In this case, the name of the set is "System:jobs" which is a system set.
- vtk_set_get_elements which takes 2 arguments, namely the id of a set and a format string. In this case, the format string asks for the job id, its status, and the host on which the job was executed.
We also show two more HTML procedures, that is OL and LI, which are used to build ordered lists.