----- Forwarded message from Mail Delivery System <MAILER-DAEMON at freenetproject.org> -----
From: Mail Delivery System <[email protected]> Subject: Undelivered Mail Returned to Sender To: toad at amphibian.dyndns.org X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on servalan X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=failed version=3.0.3 Content-Description: Notification This is the Postfix program at host emu.freenetproject.org. I'm sorry to have to inform you that your message could not be be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <Jogy at freenetproject.org>: unknown user: "jogy" Content-Description: Delivery report Reporting-MTA: dns; emu.freenetproject.org X-Postfix-Queue-ID: 312A49C907 X-Postfix-Sender: rfc822; toad at amphibian.dyndns.org Arrival-Date: Fri, 19 May 2006 16:05:04 +0000 (UTC) Final-Recipient: rfc822; Jogy at freenetproject.org Action: failed Status: 5.0.0 Diagnostic-Code: X-Postfix; unknown user: "jogy" Content-Description: Undelivered Message To: Jogy at freenetproject.org Subject: Re: [freenet-cvs] r8787 - in trunk/freenet/src/freenet: clients/http clients/http/staticfiles/themes/clean support From: Matthew Toseland <[email protected]> X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on emu.dh.bytemark.co.uk X-Spam-Level: X-Spam-Status: No, score=-102.9 required=5.0 tests=AWL,BAYES_00, USER_IN_WHITELIST autolearn=ham version=3.0.3 Could you possibly style fproxy's error pages (Data not found etc) ? On Fri, May 19, 2006 at 02:37:41PM +0000, Jogy at freenetproject.org wrote: > Author: Jogy > Date: 2006-05-19 14:37:22 +0000 (Fri, 19 May 2006) > New Revision: 8787 > > Modified: > trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > trunk/freenet/src/freenet/clients/http/QueueToadlet.java > trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css > trunk/freenet/src/freenet/support/SizeUtil.java > Log: > - fix DarknetConnectionsToadlet to display "No connections so far" again > - style QueueToadlet (still overlong lines) > - let support.SizeUtil use binary SI prefixes > > > Modified: > trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > =================================================================== > --- trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > 2006-05-19 13:40:22 UTC (rev 8786) > +++ trunk/freenet/src/freenet/clients/http/DarknetConnectionsToadlet.java > 2006-05-19 14:37:22 UTC (rev 8787) > @@ -101,6 +101,8 @@ > if (peerNodes.length == 0) { > buf2.append("<tr><td colspan=\"8\">No connections so > far</td></tr>\n"); > buf2.append("</table>\n"); > + // > + buf.append(buf2); > } > else { > final Integer CONNECTED = new Integer(0); > @@ -258,6 +260,7 @@ > } > buf.append("</td></tr>\n"); > buf.append("</table>\n"); > + // > buf.append(buf2); > // > buf.append("<input type=\"submit\" name=\"disconnect\" > value=\"Disconnect from selected peers\" />\n"); > > Modified: trunk/freenet/src/freenet/clients/http/QueueToadlet.java > =================================================================== > --- trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2006-05-19 > 13:40:22 UTC (rev 8786) > +++ trunk/freenet/src/freenet/clients/http/QueueToadlet.java 2006-05-19 > 14:37:22 UTC (rev 8787) > @@ -145,7 +145,7 @@ > writeBigHeading("Completed requests", buf); > > if(!completedDownloadToTemp.isEmpty()) { > - writeTableHead("Completed downloads to > temporary space", new String[] { "", "Identifier", "Size", "Type", > "Download", "Persistence", "Key" }, buf ); > + writeTableHead("Completed downloads to > temporary space", new String[] { "", "Identifier", "Size", "MIME-Type", > "Download", "Persistence", "Key" }, buf ); > for(Iterator i = > completedDownloadToTemp.iterator();i.hasNext();) { > ClientGet p = (ClientGet) i.next(); > writeRowStart(buf); > @@ -162,7 +162,7 @@ > } > > if(!completedDownloadToDisk.isEmpty()) { > - writeTableHead("Completed downloads to disk", > new String[] { "", "Identifier", "Filename", "Size", "Type", "Download", > "Persistence", "Key" }, buf); > + writeTableHead("Completed downloads to disk", > new String[] { "", "Identifier", "Filename", "Size", "MIME-Type", "Download", > "Persistence", "Key" }, buf); > for(Iterator > i=completedDownloadToDisk.iterator();i.hasNext();) { > ClientGet p = (ClientGet) i.next(); > writeRowStart(buf); > @@ -180,7 +180,7 @@ > } > > if(!completedUpload.isEmpty()) { > - writeTableHead("Completed uploads", new > String[] { "", "Key", "Filename", "Size", "Type", "Persistence", "Identifier" > }, buf); > + writeTableHead("Completed uploads", new > String[] { "", "Key", "Filename", "Size", "MIME-Type", "Persistence", > "Identifier" }, buf); > for(Iterator > i=completedUpload.iterator();i.hasNext();) { > ClientPut p = (ClientPut) i.next(); > writeRowStart(buf); > @@ -215,6 +215,7 @@ > } > writeTableEnd(buf); > } > + writeBigEnding(buf); > } > > /* FIXME color-coded progress bars. > @@ -226,7 +227,7 @@ > if(!(failedDownload.isEmpty() && failedUpload.isEmpty())) { > writeBigHeading("Failed requests", buf); > if(!failedDownload.isEmpty()) { > - writeTableHead("Failed downloads", new String[] > { "", "Identifier", "Filename", "Size", "Type", "Success", "Reason", > "Persistence", "Key" }, buf); > + writeTableHead("Failed downloads", new String[] > { "", "Identifier", "Filename", "Size", "MIME-Type", "Progress", "Reason", > "Persistence", "Key" }, buf); > for(Iterator > i=failedDownload.iterator();i.hasNext();) { > ClientGet p = (ClientGet) i.next(); > writeRowStart(buf); > @@ -238,7 +239,7 @@ > > writeFilenameCell(p.getDestFilename(), buf); > writeSizeCell(p.getDataSize(), buf); > writeTypeCell(p.getMIMEType(), buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writeFailureReasonCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getURI(), buf); > @@ -248,7 +249,7 @@ > } > > if(!failedUpload.isEmpty()) { > - writeTableHead("Failed uploads", new String[] { > "", "Identifier", "Filename", "Size", "Type", "Success", "Reason", > "Persistence", "Key" }, buf); > + writeTableHead("Failed uploads", new String[] { > "", "Identifier", "Filename", "Size", "MIME-Type", "Progress", "Reason", > "Persistence", "Key" }, buf); > for(Iterator > i=failedUpload.iterator();i.hasNext();) { > ClientPut p = (ClientPut) i.next(); > writeRowStart(buf); > @@ -260,7 +261,7 @@ > > writeFilenameCell(p.getOrigFilename(), buf); > writeSizeCell(p.getDataSize(), buf); > writeTypeCell(p.getMIMEType(), buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writeFailureReasonCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getFinalURI(), buf); > @@ -270,7 +271,7 @@ > } > > if(!failedDirUpload.isEmpty()) { > - writeTableHead("Failed directory uploads", new > String[] { "", "Identifier", "Files", "Total Size", "Success", "Reason", > "Persistence", "Key" }, buf); > + writeTableHead("Failed directory uploads", new > String[] { "", "Identifier", "Files", "Total Size", "Progress", "Reason", > "Persistence", "Key" }, buf); > for(Iterator > i=failedDirUpload.iterator();i.hasNext();) { > ClientPutDir p = (ClientPutDir) > i.next(); > writeRowStart(buf); > @@ -278,7 +279,7 @@ > writeIdentifierCell(p, p.getFinalURI(), > buf); > writeNumberCell(p.getNumberOfFiles(), > buf); > writeSizeCell(p.getTotalDataSize(), > buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writeFailureReasonCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getFinalURI(), buf); > @@ -286,13 +287,14 @@ > } > writeTableEnd(buf); > } > + writeBigEnding(buf); > } > > if(!(uncompletedDownload.isEmpty() && > uncompletedUpload.isEmpty() && > uncompletedDirUpload.isEmpty())) { > writeBigHeading("Requests in progress", buf); > if(!uncompletedDownload.isEmpty()) { > - writeTableHead("Downloads in progress", new > String[] { "", "Identifier", "Filename", "Size", "Type", "Success", > "Persistence", "Key" }, buf); > + writeTableHead("Downloads in progress", new > String[] { "", "Identifier", "Filename", "Size", "MIME-Type", "Progress", > "Persistence", "Key" }, buf); > for(Iterator i = > uncompletedDownload.iterator();i.hasNext();) { > ClientGet p = (ClientGet) i.next(); > writeRowStart(buf); > @@ -304,7 +306,7 @@ > > writeFilenameCell(p.getDestFilename(), buf); > writeSizeCell(p.getDataSize(), buf); > writeTypeCell(p.getMIMEType(), buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getURI(), buf); > writeRowEnd(buf); > @@ -313,7 +315,7 @@ > } > > if(!uncompletedUpload.isEmpty()) { > - writeTableHead("Uploads in progress", new > String[] { "", "Identifier", "Filename", "Size", "Type", "Success", > "Persistence", "Key" }, buf); > + writeTableHead("Uploads in progress", new > String[] { "", "Identifier", "Filename", "Size", "MIME-Type", "Progress", > "Persistence", "Key" }, buf); > for(Iterator i = > uncompletedUpload.iterator();i.hasNext();) { > ClientPut p = (ClientPut) i.next(); > writeRowStart(buf); > @@ -325,7 +327,7 @@ > > writeFilenameCell(p.getOrigFilename(), buf); > writeSizeCell(p.getDataSize(), buf); > writeTypeCell(p.getMIMEType(), buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getFinalURI(), buf); > writeRowEnd(buf); > @@ -334,7 +336,7 @@ > } > > if(!uncompletedDirUpload.isEmpty()) { > - writeTableHead("Directory uploads in progress", > new String[] { "", "Identifier", "Files", "Total Size", "Success", > "Persistence", "Key" }, buf); > + writeTableHead("Directory uploads in progress", > new String[] { "", "Identifier", "Files", "Total Size", "Progress", > "Persistence", "Key" }, buf); > for(Iterator > i=uncompletedDirUpload.iterator();i.hasNext();) { > ClientPutDir p = (ClientPutDir) > i.next(); > writeRowStart(buf); > @@ -342,13 +344,14 @@ > writeIdentifierCell(p, p.getFinalURI(), > buf); > writeNumberCell(p.getNumberOfFiles(), > buf); > writeSizeCell(p.getTotalDataSize(), > buf); > - writeSuccessFractionCell(p, buf); > + writeProgressFractionCell(p, buf); > writePersistenceCell(p, buf); > writeKeyCell(p.getFinalURI(), buf); > writeRowEnd(buf); > } > writeTableEnd(buf); > } > + writeBigEnding(buf); > } > > ctx.getPageMaker().makeTail(buf); > @@ -361,58 +364,52 @@ > buf.append("<td>"); > String s = p.getFailureReason(); > if(s == null) > - buf.append("UNKNOWN"); > + buf.append("<span > class=\"failure_reason_unknown\">unknown</span>"); > else > - buf.append(s); > + buf.append("<span class=\"failure_reason_is\">" + s + > "</span>"); > buf.append("</td>\n"); > } > > - private void writeSuccessFractionCell(ClientRequest p, StringBuffer > buf) { > + private void writeProgressFractionCell(ClientRequest p, StringBuffer > buf) { > + buf.append("<td>"); > double frac = p.getSuccessFraction(); > boolean b = p.isTotalFinalized(); > if(frac < 0) { > - buf.append("<td>UNKNOWN</td>\n"); > + buf.append("<span > class=\"progress_fraction_unknown\">unknown</span>"); > } else { > - buf.append("<td>"); > if(b) > - buf.append("<font color=\"green\">"); > + buf.append("<span > class=\"progress_fraction_finalized\">"); > + else > + buf.append("<span > class=\"progress_fraction_not_finalized\">"); > NumberFormat nf = NumberFormat.getInstance(); > nf.setMaximumFractionDigits(1); > buf.append(nf.format(frac*100)); > - if(b) > - buf.append("%</font></td>"); > - else > - buf.append("%</td>\n"); > + buf.append("%</span>"); > } > + buf.append("</td>\n"); > } > > private void writeNumberCell(int numberOfFiles, StringBuffer buf) { > buf.append("<td>"); > - buf.append(numberOfFiles); > + buf.append("<span class=\"number_of_files\">" + numberOfFiles + > "</span>"); > buf.append("</td>\n"); > } > > private void writeDirectCell(StringBuffer buf) { > - buf.append("<td>DIRECT</td>\n"); > + buf.append("<td>"); > + buf.append("<span class=\"filename_direct\">direct</span>"); > + buf.append("</td>\n"); > } > > private void writeFilenameCell(File destFilename, StringBuffer buf) { > buf.append("<td>"); > if(destFilename == null) > - buf.append("NONE"); > + buf.append("<span class=\"filename_none\">none</span>"); > else > - buf.append(HTMLEncoder.encode(destFilename.toString())); > + buf.append("<span class=\"filename_is\">" + > HTMLEncoder.encode(destFilename.toString()) + "</span>"); > buf.append("</td>\n"); > } > > - private void writeTableEnd(StringBuffer buf) { > - buf.append("</table>"); > - } > - > - private void writeRowEnd(StringBuffer buf) { > - buf.append("</tr>\n"); > - } > - > private void writeDeleteCell(ClientRequest p, StringBuffer buf) { > buf.append("<td>"); > buf.append("<form action=\"/queue/\" method=\"post\">"); > @@ -426,24 +423,28 @@ > private void writeIdentifierCell(ClientRequest p, FreenetURI uri, > StringBuffer buf) { > buf.append("<td>"); > if(uri != null) { > - buf.append("<a href=\"/"); > + buf.append("<span class=\"identifier_with_uri\"><a > href=\"/"); > buf.append(uri.toString(false)); > buf.append("\">"); > + buf.append(HTMLEncoder.encode(p.getIdentifier())); > + buf.append("</a></span>"); > } > - buf.append(HTMLEncoder.encode(p.getIdentifier())); > - if(uri != null) > - buf.append("</a>"); > + else { > + buf.append("<span class=\"identifier_without_uri\">"); > + buf.append(HTMLEncoder.encode(p.getIdentifier())); > + buf.append("</span>"); > + } > buf.append("</td>\n"); > } > > private void writePersistenceCell(ClientRequest p, StringBuffer buf) { > buf.append("<td>"); > if(!p.isPersistent()) > - buf.append("<font color=\"black\">NONE</font>"); > + buf.append("<span > class=\"persistence_none\">none</span>"); > else if(!p.isPersistentForever()) > - buf.append("<font color=\"blue\">REBOOT</font>"); > + buf.append("<span > class=\"persistence_reboot\">reboot</span>"); > else > - buf.append("<font color=\"green\">FOREVER</font>"); > + buf.append("<span > class=\"persistence_forever\">forever</span>"); > buf.append("</td>\n"); > } > > @@ -456,33 +457,33 @@ > private void writeTypeCell(String type, StringBuffer buf) { > buf.append("<td>"); > if(type != null) > - buf.append(type); > + buf.append("<span class=\"mimetype_is\">" + type + > "</span>"); > else > - buf.append("UNKNOWN"); > + buf.append("<span > class=\"mimetype_unknown\">unknown</span>"); > buf.append("</td>\n"); > } > > private void writeSizeCell(long dataSize, StringBuffer buf) { > buf.append("<td>"); > if(dataSize >= 0) > - buf.append(SizeUtil.formatSize(dataSize)); > + buf.append("<span class=\"filesize_is\">" + > SizeUtil.formatSize(dataSize) + "</span>"); > else > - buf.append("UNKNOWN"); > + buf.append("<span > class=\"filesize_unknown\">unknown</span>"); > buf.append("</td>\n"); > } > > private void writeKeyCell(FreenetURI uri, StringBuffer buf) { > buf.append("<td>"); > if(uri != null) { > - buf.append("<a href=\"/"); > + buf.append("<span class=\"key_is\"><a href=\"/"); > String u = uri.toString(false); > buf.append(URLEncoder.encode(u)); > buf.append("\">"); > // FIXME too long? maybe only show the human readable > bit? > buf.append(HTMLEncoder.encode(u)); > - buf.append("</a>"); > + buf.append("</a></span>"); > } else { > - buf.append("UNKNOWN"); > + buf.append("<span > class=\"key_unknown\">unknown</span>"); > } > buf.append("</td>\n"); > } > @@ -491,26 +492,39 @@ > buf.append("<tr>"); > } > > - private void writeTableHead(String string, String[] strings, > StringBuffer buf) { > - buf.append("<h2>"); > - buf.append(string); > - buf.append("</h2>\n"); > - buf.append("<table border=\"0\">\n"); > + private void writeRowEnd(StringBuffer buf) { > + buf.append("</tr>\n"); > + } > + > + private void writeTableHead(String tabletitle, String[] strings, > StringBuffer buf) { > + buf.append("<div class=\"queue_tabletitle\">" + tabletitle + > "</div>"); > + buf.append("<table class=\"queue\">\n"); > buf.append("<tr>"); > for(int i=0;i<strings.length;i++) { > buf.append("<th>"); > buf.append(strings[i]); > buf.append("</th>"); > } > - buf.append("\n"); > + buf.append("</tr>\n"); > } > > - private void writeBigHeading(String string, StringBuffer buf) { > - buf.append("<h1>"); > - buf.append(string); > - buf.append("</h1>\n"); > + private void writeTableEnd(StringBuffer buf) { > + buf.append("</table>"); > } > > + private void writeBigHeading(String header, StringBuffer buf) { > + buf.append("<div class=\"infobox infobox-normal\">\n"); > + buf.append("<div class=\"infobox-header\">\n"); > + buf.append(header); > + buf.append("</div>\n"); > + buf.append("<div class=\"infobox-content\">\n"); > + } > + > + private void writeBigEnding(StringBuffer buf) { > + buf.append("</div>\n"); > + buf.append("</div>\n"); > + } > + > public String supportedMethods() { > // TODO Auto-generated method stub > return null; > > Modified: > trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css > =================================================================== > --- trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css > 2006-05-19 13:40:22 UTC (rev 8786) > +++ trunk/freenet/src/freenet/clients/http/staticfiles/themes/clean/theme.css > 2006-05-19 14:37:22 UTC (rev 8787) > @@ -302,3 +302,89 @@ > table.sentmessagetypes th, table.sentmessagetypes td, > table.receivedmessagetypes th, table.receivedmessagetypes td { > font-size: 7pt; > } > + > +/* queue page */ > + > +table.queue th, table.queue td { > + font-size: 8pt; > +} > + > +div.queue_tabletitle { > + margin: 0; > + padding: 10px 0 10px 0; > + font-size: 10pt; > +} > + > +table.queue span { > + font-size: 8pt; > +} > + > +table.queue span.failure_reason_unknown { > + color: #d0d0d0; > +} > + > +table.queue span.failure_reason_is { > +} > + > +table.queue span.progress_fraction_unknown { > + color: #d0d0d0; > +} > + > +table.queue span.progress_fraction_not_finalized { > +} > + > +table.queue span.progress_fraction_finalized { > + color: #008000; > +} > + > +table.queue span.number_of_files { > +} > + > +table.queue span.number_of_files { > +} > + > +table.queue span.filename_direct { > + color: #d0d0d0; > +} > + > +table.queue span.filename_none { > + color: #d0d0d0; > +} > + > +table.queue span.filename_is { > +} > + > +table.queue span.identifier_with_uri { > +} > + > +table.queue span.persistence_none { > +} > + > +table.queue span.persistence_reboot { > + color: #0000ff; > +} > + > +table.queue span.persistence_forever { > + color: #00b000; > +} > + > +table.queue span.mimetype_unknown { > + color: #d0d0d0; > +} > + > +table.queue span.mimetype_is { > +} > + > +table.queue span.filesize_unknown { > + color: #d0d0d0; > +} > + > +table.queue span.filesize_is { > +} > + > +table.queue span.key_unknown { > + color: #d0d0d0; > +} > + > +table.queue span.key_is { > +} > > Modified: trunk/freenet/src/freenet/support/SizeUtil.java > =================================================================== > --- trunk/freenet/src/freenet/support/SizeUtil.java 2006-05-19 13:40:22 UTC > (rev 8786) > +++ trunk/freenet/src/freenet/support/SizeUtil.java 2006-05-19 14:37:22 UTC > (rev 8787) > @@ -8,10 +8,10 @@ > public static String formatSize(long sz) { > // First determine suffix > > - String suffixes = "kMGTPEZY"; > + String[] suffixes = {"B", > "KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"}; > long s = 1; > int i; > - for(i=0;i<suffixes.length();i++) { > + for(i=0;i<suffixes.length;i++) { > s *= 1000; > if(s > sz) { > break; > @@ -20,15 +20,20 @@ > } > > s /= 1000; // we use the previous unit > - double mantissa = (double)sz / (double)s; > - String o = Double.toString(mantissa); > - if(o.indexOf('.') == 3) > - o = o.substring(0, 3); > - else if(o.indexOf('.') > -1 && o.indexOf('E') == -1 && > o.length() > 4) > - o = o.substring(0, 4); > - if(i > 0) o += suffixes.charAt(i-1); > - o += "B"; > - return o; > + if (s == 1) // Bytes? > + { > + return sz + " " + suffixes[0]; > + } > + else > + { > + double mantissa = (double)sz / (double)s; > + String o = Double.toString(mantissa); > + if(o.indexOf('.') == 3) > + o = o.substring(0, 3); > + else if(o.indexOf('.') > -1 && o.indexOf('E') == -1 && > o.length() > 4) > + o = o.substring(0, 4); > + o += " " + suffixes[i]; > + return o; > + } > } > - > } > > _______________________________________________ > cvs mailing list > cvs at freenetproject.org > http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs > -- Matthew J Toseland - toad at amphibian.dyndns.org Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so. ----- End forwarded message ----- -- Matthew J Toseland - toad at amphibian.dyndns.org Freenet Project Official Codemonkey - http://freenetproject.org/ ICTHUS - Nothing is impossible. Our Boss says so. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: <https://emu.freenetproject.org/pipermail/devl/attachments/20060519/a944c8b5/attachment.pgp>
