(SAT) Demo Application - host |
Source Code |
<dateformat text> <body> <font univers:15><b>${host}</b><size 12><@ 60>${DATE} <hr> Serial Number<@ 15>: ${serial_no} Company<@ 15>: ${company} Model<@ 15>: ${model} Operating System<@ 15>: ${os} Processors<@ 15>: ${processors} Speed (MHz)<@ 15>: ${speed_mhz} Memory (Mb)<@ 15>: ${memory_mb} IP Address<@ 15>: ${ip_address} <box> (-------------:---------:---------) | | | | ,-------------;---------;---------. <repeat 20:| |> [---------------------------------] </box> <@ :20> <b> Disk ID<@ 15>Size (Mb)<@ 25>Type</b> <repeat 20: <field 1:${disk-%}><$ 20:<field 2:${disk-%}>><@ 25><field 3:+{disk-%}>> </body>
Comments |
Called by: printhost
<dateformat text>Set the dateformat to text.
<body>Start the form template body.
<font
univers:15><b>${host}</b><size
12><@ 60>${DATE}
<hr>
Set the font to univers and print the page header. The name of the host will be printed in 15 point, and todays date in 12 point starting at column 60. A horizonal rule underlines the page header.
Serial Number<@ 15>: ${serial_no} Company<@ 15>: ${company} Model<@ 15>: ${model} Operating System<@ 15>: ${os} Processors<@ 15>: ${processors} Speed (MHz)<@ 15>: ${speed_mhz} Memory (Mb)<@ 15>: ${memory_mb} IP Address<@ 15>: ${ip_address}Labels for the data items are printed at the left margin. The associated data values are printed starting in column 15.
<box> (-------------:---------:---------) | | | | ,-------------;---------;---------. <repeat 20:| |> [---------------------------------] </box>Boxes are printed in which the disk details are to be shown. The box is sized to allow for 20 disks.
<@ :20>
<b> Disk ID<@
15>Size (Mb)<@ 25>Type</b>
The print position is set to line 20, and column headers for the disk details are printed in the boxes.
<repeat 20: <field 1:${disk-%}><$ 20:<field 2:${disk-%}>><@ 25><field 3:+{disk-%}>>
Print formats for 20 disk detail lines are generated. The data has been generated as a SATMYSQL list (One line for each disk, each with TAB delimited fields). The field tag is used to extract the individual field details. Field 1 is printed in the first column, field 2 is right justified at position 20, field 3 is converted to uppercase and printed at position 25.
</body>End the form template body.