| 13 |
|
include("iutils.inc.php"); |
| 14 |
|
|
| 15 |
|
function printLine($title) { |
| 16 |
< |
echo "<hr color=\"#9999ff\">"; |
| 16 |
> |
echo "<hr style=\"color:#9999ff;\">"; |
| 17 |
|
echo "<b>$title</b>"; |
| 18 |
|
} |
| 19 |
|
|
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
|
| 38 |
+ |
function linkToHistory($report) { |
| 39 |
+ |
global $machine; |
| 40 |
+ |
$yesterday = date("Y-m-d", time() - 86400); |
| 41 |
+ |
echo <<<EOT |
| 42 |
+ |
<a href="browser.php?machine_name=$machine&report=$report&day=$yesterday&submit=Show"><img src="minichart.gif" alt="View yesterday's 24-hour chart" width="20" height="20" border="0"></a> |
| 43 |
+ |
EOT; |
| 44 |
+ |
} |
| 45 |
+ |
|
| 46 |
+ |
|
| 47 |
|
# show a bar-represented value. |
| 48 |
|
function showBar($title, $value, $max, $units, $input) { |
| 49 |
|
|
| 50 |
|
include("latest_config.inc.php"); |
| 51 |
|
|
| 52 |
+ |
$report = $value; |
| 53 |
+ |
|
| 54 |
|
preg_match("/$value=([^\,]*)\,/", $input, $matches); |
| 55 |
|
$value = $matches[1]; |
| 56 |
|
if (!is_int($max)) { |
| 66 |
|
?> |
| 67 |
|
<table border="0" cellpadding="0" cellspacing="0" align="center"> |
| 68 |
|
<tr> |
| 69 |
< |
<td colspan="2"><b><?=$title?></b> <font size="2">(<?=$value?><?=$units?>)</font></td> |
| 69 |
> |
<td colspan="2"><? linkToHistory($report); ?> <b><?=$title?></b> <font size="2">(<?=$value?><?=$units?>)</font></td> |
| 70 |
|
</tr> |
| 71 |
|
<tr> |
| 72 |
|
<td colspan="2" bgcolor="#eeeeff"><img src="<?=$barImage?>" border="0" height="20" width="<?=$width?>"></td> |