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.28 by pjm2, Thu Mar 22 17:45:08 2001 UTC vs.
Revision 1.35 by tdb, Tue May 21 16:47:15 2002 UTC

# Line 1 | Line 1
1   <?php
2  
3 + #
4 + # i-scream central monitoring system
5 + # http://www.i-scream.org.uk
6 + # Copyright (C) 2000-2002 i-scream
7 + #
8 + # This program is free software; you can redistribute it and/or
9 + # modify it under the terms of the GNU General Public License
10 + # as published by the Free Software Foundation; either version 2
11 + # of the License, or (at your option) any later version.
12 + #
13 + # This program is distributed in the hope that it will be useful,
14 + # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 + # GNU General Public License for more details.
17 + #
18 + # You should have received a copy of the GNU General Public License
19 + # along with this program; if not, write to the Free Software
20 + # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
21 + #
22 +
23   # Navigation for the i-scream alerts.
24   # pjm2@ukc.ac.uk
25   #
# Line 58 | Line 78 | function printAlert($machine, $alert, $small="") {
78               <td width="50">
79                &nbsp;
80               </td>
81 <             <td align="left">
81 >             <td>
82                <img src="level$alertLevelNum.gif" width="41" height="9" border="0" alt="$alertLevel">
83               </td>
84 <             <td align="left">
84 >             <td>
85                <font size="$fontsize" color="$alertColour"><b>$alertLevel</b></font>
86               </td>
87 <             <td align="left">
88 <              <font size="$fontsize">$attributeName</font>
87 >             <td>
88 >              <font size="$fontsize">$attributeName (c:$value t:$thresholdValue)</font>
89               </td>
90               <td>
91                &nbsp;
# Line 115 | Line 135 | function printReports($machine, $small="") {
135    
136      if ($small == "on") {
137          echo <<<EOT
138 <           <table border="0" cellpadding="2" cellspacing="0">
138 >           <table border="0" cellpadding="2" cellspacing="6">
139              <tr>
140               <td colspan="5">
141                <font size="$fontsize"><b><a href="alerts.php?machine=$machine" style="color: black; text-decoration: none;">$machine</a></b></font>
# Line 127 | Line 147 | EOT;
147          echo <<<EOT
148               <p>&nbsp;</p>
149               <table border="0" cellpadding="3" cellspacing="2" bgcolor="#000066" width="100%">
150 <               <tr>
150 >              <tr>
151                 <td>
152                  <font color="white">
153                   <b>
# Line 167 | Line 187 | EOT;
187      }
188  
189      if ($small == "on") {
190 <        echo "</table>";
190 >        echo <<<EOT
191 >            <tr>
192 >             <td colspan="5">&nbsp;</td>
193 >            </tr>
194 >           </table>
195 > EOT;
196      }
197      else {
198          echo <<<EOT
# Line 214 | Line 239 | EOT;
239  
240         printLine("");
241  
242 +       $masterwidth = "";
243 +       if ($small != "on") {
244 +           $masterwidth = ' width="100%"';
245 +       }
246 +
247 +       echo <<<EOT
248 +        <table border="0" align="center"$masterwidth>
249 +         <tr>
250 +          <td>
251 + EOT;
252 +
253         if ($machine == "ALL") {
254             $machine_array = getdirArray($alertDirectory, 'asort');
255             if ($machine_array != FALSE) {
# Line 221 | Line 257 | EOT;
257                     printReports($machine, $small);
258                 }
259             }
260 +           else {
261 +               print "<font size='$fontsize'><b>There are currently no alerts</b></font>";
262 +           }
263         }
264         else {
265             printReports($machine, $small);
266         }
267        
268 +       echo <<<EOT
269 +         </td>
270 +        </tr>
271 +       </table>
272 + EOT;
273     }
274     else {
275         printLine("");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines