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.19 by pjm2, Wed Mar 21 16:48:57 2001 UTC vs.
Revision 1.22 by pjm2, Wed Mar 21 17:59:09 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") {
# Line 47 | Line 47 | function printAlert($machine, $alert, $small="") {
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">
# Line 61 | Line 64 | EOT;
64      else {
65          echo <<<EOT
66          
67 <        <table border="0" cellspacing="5">
67 >        <table border="0" cellspacing="5" width="100%">
68            <tr>
69 <            <td><b>$attributeName</b></td>
70 <            <td>&nbsp;</td>
71 <            <td><font color="$alertColour" size="2"><b>$alertLevel</b></font></td>
72 <            <td>&nbsp;</td>
69 >            <td align="left">
70 >              <img src="level$alertLevelNum.gif" width="41" height="9" border="0" alt="$alertLevel">
71 >              <font color="$alertColour" size="2"><b>$alertLevel</b></font>
72 >            </td>
73 >            <td align="right">
74 >              <b>$attributeName</b>
75 >            </td>
76            </tr>
77            <tr>
78 <            <td><font size="2">Threshold:</font></td>
79 <            <td>$thresholdValue</td>
74 <            <td><font size="2">Initially raised:</font></td>
75 <            <td>$initialAlertTime</td>
78 >            <td align="right"><font size="2">Threshold:</font></td>
79 >            <td align="left">$thresholdValue</td>
80            </tr>
81            <tr>
82 <            <td><font size="2">Alert value:</font></td>
83 <            <td><b>$value</b></td>
80 <            <td><!--Next alert time:--> </td>
81 <            <td><!--$timeTillNextAlert--> </td>
82 >            <td align="right"><font size="2">Alert value:</font></td>
83 >            <td align="left"><b>$value</b></td>
84            </tr>
85 +          <tr>
86 +            <td align="right"><font size="2">Initially raised:</font></td>
87 +            <td align="left">$initialAlertTime</td>
88 +          </tr>
89          </table>
90              
91   EOT;
# Line 97 | Line 103 | function printReports($machine, $small="") {
103          echo <<<EOT
104             <table border="0" cellpadding="2" cellspacing="0">
105              <tr>
106 <             <td colspan="4">
106 >             <td colspan="5">
107                <font size="+1"><b>$machine</b></font>
108               </td>
109              </tr>
# Line 140 | Line 146 | EOT;
146          }
147      }
148      else {
149 <        echo "There are currently no alerts held about <b>$machine</b>";
150 <        printLine("");
149 >        if ($small != "true") {
150 >            echo "There are currently no alerts held about <b>$machine</b>";
151 >            printLine("");
152 >        }
153      }
154  
155      if ($small == "true") {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines