Job Reports: Table

Use a table.
#!/bin/csh -f
# The rest is -*- Tcl -*-  exec vovsh -f $0 $*

# This is file tutorial.cgi

    HEAD { TITLE "CGI Tutorial" }
    BODY {
        set setId [vtk_set_find "System:jobs"]
        TABLE border="1" align="center" {
            foreach job [vtk_set_get_elements $setId "@ID@ @STATUS@ @HOST@"] {
                set id     [shift job]
                set status [shift job]
                set host   [shift job]
                TR  { 
                    TH { OUT $host }
                    TD { HREF "/node/$id" $id }
                    TD { OUT $status }

In this example we introduce the HTML procedures TABLE, TR, TH and TD, which are used to create tables. The procedure HREF is used to introduce a hyperlink. In this case, the page "/node/XXX" has a detailed description of the node with id XXX.

Finally, in this example we introduce the Tcl procedure shift which is really an Altair Accelerator extension and is used to take the first element from a list while shifting the list left by one.