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

Comparing projects/cms/source/reports/php/alerts/alerts.php (file contents):
Revision 1.15 by pjm2, Wed Mar 21 12:13:15 2001 UTC vs.
Revision 1.20 by pjm2, Wed Mar 21 17:32:24 2001 UTC

# Line 26 | Line 26 | function printAlert($machine, $alert, $small="") {
26  
27      include("alerts_config.inc.php");
28  
29 <    $alertLevel = getValue("alertLevel", $alert);
29 >    $alertLevelNum = getValue("alertLevel", $alert);
30      $lastAlert = getValue("lastAlert", $alert);
31      $thresholdLevel = getValue("thresholdLevel", $alert);
32      $source = getValue("source", $alert);
# Line 36 | Line 36 | function printAlert($machine, $alert, $small="") {
36      $timeTillNextAlert = getValue("timeTillNextAlert", $alert);
37      $initialAlertTime = getValue("initialAlertTime", $alert);
38  
39 <    $alertColour = $alertLevelColours[$alertLevel];
40 <    $alertLevel = $alertLevelNames[$alertLevel];
39 >    $alertColour = $alertLevelColours[$alertLevelNum];
40 >    $alertLevel = $alertLevelNames[$alertLevelNum];
41      $initialAlertTime = strftime("%x %X", intval($initialAlertTime / 1000));
42  
43      if ($small == "true") {
44 <        echo "small";
44 >        echo <<<EOT
45 >            <tr>
46 >             <td width="50">
47 >              &nbsp;
48 >             </td>
49 >             <td align="left">
50 >              <img src="level$alertLevelNum.gif" width="41" height="9" border="0" alt="$alertLevel">
51 >             </td>
52 >             <td align="left">
53 >              <font size="3" color="$alertColour"><b>$alertLevel</b></font>
54 >             </td>
55 >             <td align="left">
56 >              <font size="3">$attributeName</font>
57 >             </td>
58 >             <td>
59 >              &nbsp;
60 >             </td>
61 >            </tr>
62 > EOT;
63      }
64      else {
65          echo <<<EOT
# Line 80 | Line 98 | function printReports($machine, $small="") {
98    
99      if ($small == "true") {
100          echo <<<EOT
101 <           <table border="0" cellpadding="2" cellspacing="2" bgcolor="#ffffff" width="100%">
101 >           <table border="0" cellpadding="2" cellspacing="0">
102              <tr>
103 <             <td bgcolor="#000066">
104 <              <font color="white"><b>$machine</b></font>
103 >             <td colspan="5">
104 >              <font size="+1"><b>$machine</b></font>
105               </td>
106              </tr>
107   EOT;
# Line 146 | Line 164 | EOT;
164  
165   <? include($titleHTML); ?>
166  
167 < <? printLine("Display the latest alerts for a host"); ?>
167 > <? if (!$hideform) { ?>
168  
169 + <? printLine("Latest alerts for hosts"); ?>
170 +
171   <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
172   <?
173  
# Line 168 | Line 188 | EOT;
188   <input type="hidden" name="small" value="<?=$small?>">
189   <input type="submit" name="submit" value="Display">
190   </form>
191 +
192 + <? } ?>
193  
194   <? if ($machine) {
195  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines