ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/experimental/reports/graphing/browser2.php
(Generate patch)

Comparing experimental/reports/graphing/browser2.php (file contents):
Revision 1.1 by tdb, Sun Mar 10 16:40:12 2002 UTC vs.
Revision 1.4 by tdb, Sun Aug 1 10:39:49 2004 UTC

# Line 1 | Line 1
1   <?php
2  
3 < # Navigation for the i-scream reports.
4 < # pjm2@ukc.ac.uk
3 > # Navigation for the i-scream graphs
4 > # tim@i-scream.org
5   #
6   # CONFIGURABLE CONSTANTS: -
7  
# Line 11 | Line 11 | include("browser2_config.inc.php");
11   # END CONFIGURATION
12  
13  
14
15
16
17 # Used to return whether or not a report data file is empty.
18 function isReportEmpty($filename, $minFileSize) {
19    if (filesize($filename) < $minFileSize) {
20        return TRUE;
21    }
22    return FALSE;
23 }
24
25
14   include("iutils.inc.php");
15  
16   ?>
# Line 42 | Line 30 | include("iutils.inc.php");
30      <option selected value="">[select machine]</option>
31    <? } ?>
32    <?
33 <     $file_array = getdirArray($rrddir,'asort');
33 >     $file_array = getdirArray($imgdir,'asort');
34       foreach($file_array as $file_name) {
35 <        if(is_dir("$rrddir/$file_name")) { ?>
35 >        if(is_dir("$imgdir/$file_name")) { ?>
36              <option value="<? echo $file_name ?>"><? echo $file_name ?></option>
37       <? }
38       }
# Line 62 | Line 50 | include("iutils.inc.php");
50      
51      <form method="<? echo $formMethod ?>" action="<? echo $thisPage ?>">
52       <select size="1" name="graph">
53 <      <? if ($report) { ?>
54 <        <option selected value="<? echo $report ?>"><? echo $report ?></option>
53 >      <? if ($graph) { ?>
54 >        <option selected value="<? echo $graph ?>"><? echo tidyName($machine_name, $graph) ?></option>
55          <option value="">----------------</option>
56        <? } else { ?>
57 <        <option selected value="">[select report]</option>
57 >        <option selected value="">[select graph]</option>
58        <? } ?>
59        <?
60 <         $file_array = getdirArray("$rrddir/$machine_name",'asort');
60 >         $file_array = getdirArray("$imgdir/$machine_name",'asort');
61           foreach($file_array as $file_name) {
62              if(preg_match("/^(\S+)\-3h.png$/", $file_name, $matches)) { ?>
63 <                <option value="<? echo $matches[1] ?>"><? echo $matches[1] ?></option>
63 >                <option value="<? echo $matches[1] ?>"><? echo tidyName($machine_name, $matches[1]) ?></option>
64           <? }
65           }
66        ?>
# Line 93 | Line 81 | include("iutils.inc.php");
81      if ($submit == "Show" && $machine_name && $graph) {
82          
83        ?>
84 <        <center><b>[<? echo $machine_name; ?>] - <? echo $graph ?> graphs</b></center>
84 >        <center><b>[<? echo $machine_name; ?>] - '<? echo tidyName($machine_name, $graph) ?>' graphs</b></center>
85          
86          <center>
87 <         <p><b>Last 3 hours :</b><br><img border="0" src="<? echo "$rrdwebdir/$machine_name/$graph-3h.png" ?>"></p>
88 <         <p><b>Last day :</b><br><img border="0" src="<? echo "$rrdwebdir/$machine_name/$graph-1d.png" ?>"></p>
89 <         <p><b>Last week :</b><br><img border="0" src="<? echo "$rrdwebdir/$machine_name/$graph-1w.png" ?>"></p>
90 <         <p><b>Last month :</b><br><img border="0" src="<? echo "$rrdwebdir/$machine_name/$graph-1m.png" ?>"></p>
87 >         <p><b>Last 3 hours :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-3h.png" ?>"></p>
88 >         <p><b>Last day :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1d.png" ?>"></p>
89 >         <p><b>Last week :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1w.png" ?>"></p>
90 >         <p><b>Last month :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1m.png" ?>"></p>
91 >         <p><b>Last year :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1y.png" ?>"></p>
92          </center>
93          
94          <hr weight="1" color="<? echo $lineColor ?>">

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines