Job Reports: List

Use an ordered 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
In this example we introduce two vtk procedures:
  1. 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.
  2. 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.