Changeset 5365


Ignore:
Timestamp:
2003-08-29T15:08:01+12:00 (21 years ago)
Author:
jmt12
Message:

This time its just improved, with the total counts of each type of report also generated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/util/StatusHTML.java

    r5364 r5365  
    1414    static final private String NOTHING_STR   = "Nothing";
    1515
    16     static final private String FIXED = "  <!-- Header -->\n  <TR bgcolor=\"#B0D0B0\">\n    <TD colspan=\"2\"><STRONG><A name=\"23b\">GLI v2.3 beta - Closed Reports</A></STRONG></TD>\n  </TR>\n  <TR>\n    <TD bgcolor=\"#FFFFFF\" colspan=\"2\">In order recieved. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n  </TR>\n  <TR>\n    <TD colspan=\"2\">&#160;</TD>\n  </TR>\n";
     16    static final private String FIXED = "  <!-- Header -->\n  <TR bgcolor=\"#B0D0B0\">\n    <TD colspan=\"2\"><STRONG><A name=\"23b\">GLI v2.3 beta - Closed Reports [FIXED_COUNT total]</A></STRONG></TD>\n  </TR>\n  <TR>\n    <TD bgcolor=\"#FFFFFF\" colspan=\"2\">In order recieved. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n  </TR>\n  <TR>\n    <TD colspan=\"2\">&#160;</TD>\n  </TR>\n";
    1717
    1818    static final private String FOOTER = "  <TR><TD>&nbsp;</TD></TR>\n</TABLE>\n<TABLE bgcolor=\"#FFFFFF\" width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n  <TR>\n    <TD align=\"center\">Written by John Thompson. Any comments, bug reports email <A href=\"mailto:[email protected]\">here</A>.</TD>\n  </TR>\n</TABLE>\n</BODY>\n</HTML>";
    1919    static final private String HEADER = "<HTML>\n<HEAD>\n<TITLE>GLI Project Status</TITLE>\n</HEAD>\n<BODY bgcolor=\"#CCCCCC\">\n<TABLE bgcolor=\"#FFFFFF\" width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">\n  <!-- Header -->\n  <TR bgcolor=\"#B0D0B0\">\n    <TD align=\"center\" colspan=\"7\"><FONT size=\"4\"><STRONG>Greenstone Librarian Interface (GLI) version 2.3 beta</STRONG></FONT></TD>\n  </TR>\n  <TR>\n    <TD colspan=\"7\">This page lists the features planned for the Greenstone Librarian Interface in its next release. It also details the various bugs that have been found and reported in this version of the GLI. You can also review the status reports for these other versions:</TD>\n  </TR>\n  <TR bgcolor=\"#B0D0B0\">\n    <TD align=\"center\">Status v2.3 beta</TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_23c.html\">Status v2.3c</A></TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_23b.html\">Status v2.3b</A></TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_23a.html\">Status v2.3a</A></TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_22b.html\">Status v2.2b</A></TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_21.html\">Status v2.1</A></TD>\n    <TD align=\"center\"><A href=\"http://www.greenstone.org/gatherer/status_20.html\">Status v2.0</A></TD>\n  </TR>\n</TABLE>\n<BR/>\n<TABLE border=\"0\" cellpadding=\"5\" cellspacing=\"0\" width=\"100%\">\n";
    2020   
    21     static final private String PENDING = "  <!-- Header -->\n  <TR bgcolor=\"#D0B0B0\">\n    <TD colspan=\"2\"><STRONG><A name=\"23b\">GLI v2.3 beta - Current Status Report</A></STRONG></TD>\n  </TR>\n  <TR>\n    <TD bgcolor=\"#FFFFFF\" colspan=\"2\">In order recieved. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n  </TR>\n  <TR>\n    <TD colspan=\"2\">&#160;</TD>\n  </TR>\n";
     21    static final private String PENDING = "  <TR><TD bgcolor=\"#CCCCCC\">&nbsp;</TD></TR>\n  <!-- Header -->\n  <TR bgcolor=\"#D0B0B0\">\n    <TD colspan=\"2\"><STRONG><A name=\"23b\">GLI v2.3 beta - Current Reports [PENDING_COUNT total]</A></STRONG></TD>\n  </TR>\n  <TR>\n    <TD bgcolor=\"#FFFFFF\" colspan=\"2\">In order recieved. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n  </TR>\n  <TR>\n    <TD colspan=\"2\">&#160;</TD>\n  </TR>\n";
    2222
    23     static final private String[] PREFIX = {    "  <TR><TD bgcolor=\"#DARK_COLOR\">ID#</TD>              <TD bgcolor=\"#DARK_COLOR\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Description</TD>      <TD bgcolor=\"#LIGHT_COLOR\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Reported By</TD>      <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Platform</TD>         <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Test Item#</TD>       <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Status</TD>           <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Proposed Solution</TD><TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Solution</TD><TD bgcolor=\"#FFFFFF\">",  "<TR><TD bgcolor=\"#CCCCCC\">&nbsp;"};
     23    static final private String[] PREFIX = {    "  <TR><TD bgcolor=\"#DARK_COLOR\">ID#</TD>              <TD bgcolor=\"#DARK_COLOR\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Description</TD>      <TD bgcolor=\"#LIGHT_COLOR\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Reported By</TD>      <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Platform</TD>         <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Test Item#</TD>       <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Status</TD>           <TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Proposed Solution</TD><TD bgcolor=\"#FFFFFF\">","  <TR><TD bgcolor=\"#DARK_COLOR\">Solution</TD><TD bgcolor=\"#FFFFFF\">",  "  <TR><TD bgcolor=\"#CCCCCC\">&nbsp;"};
    2424   
    2525    static final private String SUFFIX = "</TD></TR>\n";
     
    4747    LinkedList reports = new LinkedList();
    4848    try {
     49        int fixed_count = 0;
     50        int pending_count = 0;
    4951        BufferedReader in = new BufferedReader(new FileReader(in_file));
    5052        // Read in the entire file, building report objects.
     
    5254        while((line = in.readLine()) != null) {
    5355        // We may of course end up with several nulls, but thats hardly our fault.
    54         reports.add(new Report(line, in.readLine(), in.readLine(), in.readLine(), in.readLine(), in.readLine(), in.readLine()));
     56        Report report = new Report(line, in.readLine(), in.readLine(), in.readLine(), in.readLine(), in.readLine(), in.readLine());
     57        if(report.isFixed()) {
     58            fixed_count++;
     59        }
     60        else {
     61            pending_count++;
     62        }
     63        reports.add(report);
     64        report = null;
    5565        // Throw away a line
    5666        in.readLine();
     
    6474
    6575        // Write out all the pending jobs
    66         out.write(PENDING.getBytes());
     76        out.write((PENDING.replaceAll("PENDING_COUNT", String.valueOf(pending_count))).getBytes());
    6777        for(int i = 0; i < reports.size(); i++) {
    6878        Report report = (Report) reports.get(i);
     
    7484
    7585        // Write out everything else
    76         out.write(FIXED.getBytes());
     86        out.write((FIXED.replaceAll("FIXED_COUNT", String.valueOf(fixed_count))).getBytes());
    7787        for(int i = 0; i < reports.size(); i++) {
    7888        Report report = (Report) reports.get(i);
Note: See TracChangeset for help on using the changeset viewer.