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

Comparing projects/cms/source/reports/DBReporter/IscreamLayout.java (file contents):
Revision 1.12 by pjm2, Sun Jan 7 14:09:39 2001 UTC vs.
Revision 1.21 by pjm2, Sun Jan 7 20:03:33 2001 UTC

# Line 33 | Line 33 | public class IscreamLayout {
33          bw.write("<html>");
34          bw.write("<head>");
35          bw.write("<title>"+title+"</title>");
36 +        bw.write("<meta http-equiv=\"pragma\" content=\"no-cache\">");
37 +        bw.write("<meta http-equiv=\"cache-control\" content=\"no-cache\">");
38          bw.write("<meta name=\"description\" content=\""+metaDescription+"\">");
39          bw.write("<meta name=\"keywords\" content=\""+metaKeywords+"\">");
40          bw.write("<meta name=\"generator\" content=\"pjm2's DBReporterMain\">");
# Line 65 | Line 67 | public class IscreamLayout {
67          bw.flush();
68      }
69      
70 +    public static void printMachines(BufferedWriter bw, LinkedList list) throws IOException{
71 +        bw.write("<table border=\"0\"  align=\"center\">");
72 +        
73 +        Iterator it = list.iterator();
74 +        while (it.hasNext()){
75 +            ReportPage rp = (ReportPage)it.next();            
76 +            bw.write("<tr><td><font size=\"4\"><a href=\"../"+rp.getWhen()+rp.getMachineName()+"."+rp.getReport()+".shtml\">"+rp.getMachineName()+"</a></font></td></tr>");
77 +        }
78 +        
79 +        bw.write("</table>");
80 +        bw.flush();
81 +    }
82 +
83      public static void printGraph(BufferedWriter bw, String filename, int width, int height, int type, long startDate, long endDate) throws IOException{
84          
85          String graphTitle = "Unknown time period";
# Line 78 | Line 93 | public class IscreamLayout {
93                  graphTitle = "Hourly report from "+DateUtils.dateString(startDate)+" to "+DateUtils.dateString(endDate);
94                  scaleRow = " <tr><td>&nbsp;</td>";
95                  for (long i = startDate; i < endDate; i+=DateUtils.secsPerHour/6){
96 <                    scaleRow += "<td><font size=\"2\">"+DateUtils.timeString(i)+"</font></td>";
96 >                    scaleRow += "<td align=\"left\" width=\""+(100/colspan)+"%\"><font size=\"2\">&gt;"+DateUtils.timeString(i)+"</font></td>";
97                  }
98                  scaleRow += "</tr>";
99                  colspan = 6;
# Line 87 | Line 102 | public class IscreamLayout {
102                  graphTitle = "24 hour report from "+DateUtils.dateString(startDate)+" to "+DateUtils.dateString(endDate);
103                  scaleRow = " <tr><td>&nbsp;</td>";
104                  for (int i = 0; i < 24; i++){
105 <                    scaleRow += "<td><font size=\"2\">"+i+"</font></td>";
105 >                    scaleRow += "<td align=\"center\" width=\""+(100/colspan)+"%\"><font size=\"2\">"+i+"</font></td>";
106                  }
107                  scaleRow += "</tr>";
108                  colspan = 24;
109                  break;
110              case ReportPage.WEEK:
111                  graphTitle = "7 day report from "+DateUtils.shortDateString(startDate)+" to "+DateUtils.shortDateString(endDate);
112 +                colspan = 7;
113                  scaleRow = " <tr><td>&nbsp;</td>";
114                  for (long i = startDate; i < endDate; i+=DateUtils.secsPerDay){
115 <                    scaleRow += "<td>"+DateUtils.dayName(i)+"</td>";
115 >                    scaleRow += "<td align=\"center\" width=\""+(100/colspan)+"%\">"+DateUtils.dayName(i)+"</td>";
116                  }
117                  scaleRow += "</tr>";
102                colspan = 7;
118                  break;
119              case ReportPage.MONTH:
120                  graphTitle = "30 day report from "+DateUtils.shortDateString(startDate)+" to "+DateUtils.shortDateString(endDate);
# Line 112 | Line 127 | public class IscreamLayout {
127          
128          bw.write("<table border=\"0\">");
129          bw.write(" <tr><td>&nbsp;</td><td colspan=\""+colspan+"\"><b>"+graphTitle+"</b></td></tr>");
130 <        bw.write(" <tr><td valign="top">max</td><td colspan=\""+colspan+"\" rowspan=\"3\"><img src=\""+filename+"\" width=\""+width+"\" height=\""+height+"\"></td><td valign="middle">"+yAxisTitle+"</td><td valign="bottom">min</td></tr>");
130 >        bw.write(" <tr><td valign=\"top\" align=\"right\">max</td><td colspan=\""+colspan+"\" rowspan=\"3\"><img src=\""+filename+"\" width=\""+width+"\" height=\""+height+"\"></td></tr><tr><td valign=\"middle\" align=\"right\">"+yAxisTitle+"</td></tr><tr><td valign=\"bottom\" align=\"right\">min</td></tr>");
131          bw.write(scaleRow);
132          bw.write("</table>");
133          bw.newLine();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines