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.21 by pjm2, Wed Mar 21 17:41:31 2001 UTC vs.
Revision 1.25 by pjm2, Wed Mar 21 19:10:33 2001 UTC

# Line 36 | Line 36 | function printAlert($machine, $alert, $small="") {
36      $timeTillNextAlert = getValue("timeTillNextAlert", $alert);
37      $initialAlertTime = getValue("initialAlertTime", $alert);
38  
39 +    if ($thresholdLevel == "1") {
40 +        $thresholdLevel = "Lower";
41 +    }
42 +    else if ($thresholdLevel == "2") {
43 +        $thresholdLevel = "Upper";
44 +    }
45 +    else {
46 +        $thresholdLevel = "Normal";
47 +    }
48 +
49      $alertColour = $alertLevelColours[$alertLevelNum];
50      $alertLevel = $alertLevelNames[$alertLevelNum];
51      $initialAlertTime = strftime("%x %X", intval($initialAlertTime / 1000));
# Line 64 | Line 74 | EOT;
74      else {
75          echo <<<EOT
76          
77 <        <table border="0" cellspacing="5">
77 >        <table border="0" cellspacing="5" width="100%">
78            <tr>
79 <            <td><b>$attributeName</b></td>
70 <            <td>&nbsp;</td>
71 <            <td>
79 >            <td align="left" width="40%">
80                <img src="level$alertLevelNum.gif" width="41" height="9" border="0" alt="$alertLevel">
81                <font color="$alertColour" size="2"><b>$alertLevel</b></font>
82              </td>
83 <            <td>&nbsp;</td>
83 >            <td align="right" width="60%">
84 >              <b>$attributeName</b>
85 >            </td>
86            </tr>
87            <tr>
88 <            <td><font size="2">Threshold:</font></td>
89 <            <td>$thresholdValue</td>
80 <            <td><font size="2">Initially raised:</font></td>
81 <            <td>$initialAlertTime</td>
88 >            <td align="right"><font size="2">Threshold:</font></td>
89 >            <td align="left">$thresholdValue ($thresholdLevel)</td>
90            </tr>
91            <tr>
92 <            <td><font size="2">Alert value:</font></td>
93 <            <td><b>$value</b></td>
86 <            <td><!--Next alert time:--> </td>
87 <            <td><!--$timeTillNextAlert--> </td>
92 >            <td align="right"><font size="2">Alert value:</font></td>
93 >            <td align="left"><b>$value</b></td>
94            </tr>
95 +          <tr>
96 +            <td align="right"><font size="2">Initially raised:</font></td>
97 +            <td align="left">$initialAlertTime</td>
98 +          </tr>
99          </table>
100              
101   EOT;
# Line 104 | Line 114 | function printReports($machine, $small="") {
114             <table border="0" cellpadding="2" cellspacing="0">
115              <tr>
116               <td colspan="5">
117 <              <font size="+1"><b>$machine</b></font>
117 >              <font size="+1"><b><a href="alerts.php?machine=$machine" style="color: black; text-decoration: none;">$machine</a></b></font>
118               </td>
119              </tr>
120   EOT;
# Line 117 | Line 127 | EOT;
127                 <td>
128                  <font color="white">
129                   <b>
130 <                  Current alerts for $machine
130 >                  Current alerts for <a href="latest.php?machine=$machine" style="color: white">$machine</a>
131                   </b>
132                   <font size="2">
133                    <br>Sorted by time, latest first.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines