Changeset 5480
- Timestamp:
- 2003-09-09T14:42:32+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/StatusHTML.java
r5366 r5480 11 11 static final private String LIGHT_RED = "F0E0E0"; 12 12 13 static final private String DARK_BLUE = "B0B0D0"; 14 static final private String LIGHT_BLUE = "E0E0F0"; 15 13 16 static final private String FIXED_STR = "Fixed"; 14 17 static final private String NOTHING_STR = "Nothing"; 15 18 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\"> </TD>\n </TR>\n"; 19 static final private String FEATURES = " <!-- Header -->\n <TR bgcolor=\"#B0B0D0\">\n <TD colspan=\"2\"><STRONG><A name=\"23b\">GLI v2.3 beta - Feature Requests [FEATURE_COUNT total]</A></STRONG></TD>\n </TR>\n <TR>\n <TD bgcolor=\"#FFFFFF\" colspan=\"2\">In order received. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n </TR>\n <TR>\n <TD colspan=\"2\"> </TD>\n </TR>\n"; 20 21 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 received. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n </TR>\n <TR>\n <TD colspan=\"2\"> </TD>\n </TR>\n"; 17 22 18 23 static final private String FOOTER = " <TR><TD> </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>"; 19 24 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"; 20 25 21 static final private String PENDING = " <TR><TD bgcolor=\"#CCCCCC\"> </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 rec ieved. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n </TR>\n <TR>\n <TD colspan=\"2\"> </TD>\n </TR>\n";26 static final private String PENDING = " <TR><TD bgcolor=\"#CCCCCC\"> </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 received. Similar problems only mentioned once, with descriptions combined where possible.</TD>\n </TR>\n <TR>\n <TD colspan=\"2\"> </TD>\n </TR>\n"; 22 27 23 28 static final private String[] PREFIX = { " <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">ID#</TD> <TD bgcolor=\"#DARK_COLOR\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Description</TD> <TD bgcolor=\"#LIGHT_COLOR\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Reported By</TD> <TD bgcolor=\"#FFFFFF\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Platform</TD> <TD bgcolor=\"#FFFFFF\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Test Item#</TD> <TD bgcolor=\"#FFFFFF\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Status</TD> <TD bgcolor=\"#FFFFFF\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Proposed Solution</TD><TD bgcolor=\"#FFFFFF\">"," <TR><TD bgcolor=\"#DARK_COLOR\" valign=\"top\">Solution</TD><TD bgcolor=\"#FFFFFF\">", " <TR><TD bgcolor=\"#CCCCCC\"> "}; … … 47 52 LinkedList reports = new LinkedList(); 48 53 try { 54 int feature_count = 0; 49 55 int fixed_count = 0; 50 56 int pending_count = 0; … … 57 63 if(report.isFixed()) { 58 64 fixed_count++; 65 } 66 else if (report.isFeatureRequest()) { 67 feature_count++; 59 68 } 60 69 else { … … 75 84 // Write out all the pending jobs 76 85 out.write((PENDING.replaceAll("PENDING_COUNT", String.valueOf(pending_count))).getBytes()); 77 for(int i = 0; i < reports.size(); i++) { 86 87 // Write out the bugs 88 for (int i = 0; i < reports.size(); i++) { 78 89 Report report = (Report) reports.get(i); 79 if (!report.isFixed()) {90 if (!report.isFixed() && !report.isFeatureRequest()) { 80 91 out.write(report.getBytes(DARK_RED, LIGHT_RED)); 92 } 93 } 94 95 // Write out all the feature requests 96 out.write((FEATURES.replaceAll("FEATURE_COUNT", String.valueOf(feature_count))).getBytes()); 97 98 // Write out the feature requests 99 for (int i = 0; i < reports.size(); i++) { 100 Report report = (Report) reports.get(i); 101 if (!report.isFixed() && report.isFeatureRequest()) { 102 out.write(report.getBytes(DARK_BLUE, LIGHT_BLUE)); 81 103 } 82 104 report = null; … … 126 148 } 127 149 150 public boolean isFeatureRequest() { 151 return (bug_id.indexOf("F") != -1); 152 } 153 128 154 public byte[] getBytes(String dark_color, String light_color) { 129 155 StringBuffer text_buffer = new StringBuffer();
Note:
See TracChangeset
for help on using the changeset viewer.