ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/reports/php/latest/latest.php
(Generate patch)

Comparing projects/cms/source/reports/php/latest/latest.php (file contents):
Revision 1.24 by pjm2, Tue Mar 13 20:55:43 2001 UTC vs.
Revision 1.26 by pjm2, Sat Mar 17 21:57:16 2001 UTC

# Line 54 | Line 54 | EOT;
54  
55  
56   # show a bar-represented value.
57 < function showBar($title, $value, $max, $units, $input) {
57 > function showBar($title, $value, $max, $units, $input, $arrange='normal') {
58  
59      include("latest_config.inc.php");
60  
# Line 72 | Line 72 | function showBar($title, $value, $max, $units, $input)
72  
73      $width = intval($max_width * $value / $max);
74  
75 +    if ($arrange == 'swap') {
76 +        $width = $max_width - $width;
77 +    }
78 +
79      ?>
80          <table border="0" cellpadding="0" cellspacing="0" align="center">
81            <tr>
# Line 156 | Line 160 | echo <<<EOT
160   EOT;
161  
162         # Read the file.
163 <       #$input = "packet.attributes.machine_name=raptor.ukc.ac.uk,packet.memory.free=10,packet.memory.total=100,";
164 <       $input = file("$latestDirectory/$machine/$latestData");
165 <       # All we need is the first line if there is more than one line.
166 <       $input = $input[0];
163 >       if (file_exists("$latestDirectory/$machine/$latestData")) {
164 >           $input = file("$latestDirectory/$machine/$latestData");
165 >           # All we need is the first line if there is more than one line.
166 >           $input = $input[0];
167 >       }
168  
169         if (empty($input)) {
170 <           echo "<br><br>There was an error reading from the latest packet received.  Please notify your i-scream server administrator.";
170 >           echo "<br><br>There are currently no latest details about <b>$machine</b>.  Please notify your i-scream server administrator if you believe this to be incorrect.";
171         }
172         else {
173             # Display the data specified in the display include.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines