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

Comparing projects/cms/source/reports/DBReporter2/ReportMaker.java (file contents):
Revision 1.2 by pjm2, Sat Feb 3 17:26:07 2001 UTC vs.
Revision 1.4 by pjm2, Sat Feb 3 20:47:11 2001 UTC

# Line 10 | Line 10 | import uk.ac.ukc.iscream.util.*;
10   public class ReportMaker {
11  
12      // Constructor.  This takes the database Statement.    
13 <    public ReportMaker(Statement stmt, String dateDir, long startTime, long endTime) {
13 >    public ReportMaker(Statement stmt, String webDir, String dateDir, long startTime, long endTime) {
14          _stmt = stmt;
15 +        _webDir = webDir;
16          _dateDir = dateDir;
17          _startTime = startTime;
18          _endTime = endTime;
# Line 96 | Line 97 | public class ReportMaker {
97              }
98              BufferedImage img = chart.drawChart(plotData, SHTMLLayout.CHART_WIDTH, SHTMLLayout.CHART_HEIGHT, 24, 10, maxY);
99              IscreamChartWriter imgWriter = new IscreamChartWriter();
100 <            imgWriter.writeChart(img, _dateDir + "_" + machine + "_" + reportField + ".gif");
100 >            IscreamFilePlacer placer = new IscreamFilePlacer(_webDir);
101 >            File destination = placer.makeDirs(_dateDir, machine, reportField);
102 >            imgWriter.writeChart(img, new File(destination, "chart.gif"));
103              System.out.println("[DEBUG]Point count: " + plotData.countPoints());            
104          }
105          
106      }
107      
108      private Statement _stmt = null;
109 +    private String _webDir;
110      private String _dateDir;
111      private long _startTime;
112      private long _endTime;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines