de-thinsp until we can check UA for opera
This commit is contained in:
@ -803,7 +803,7 @@ public class I2PSnarkServlet extends Default {
|
||||
ngettext("1 peer", "{0} peers", knownPeers);
|
||||
else if (isRunning && knownPeers > 0)
|
||||
statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" ></td><td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers") +
|
||||
": 0 / " + knownPeers ;
|
||||
": 0" + thinsp(isDegraded) + knownPeers ;
|
||||
else if (isRunning)
|
||||
statusString = "<img alt=\"\" border=\"0\" src=\"" + _imgPath + "nopeers.png\" ></td><td class=\"snarkTorrentStatus " + rowClass + "\">" + _("No Peers");
|
||||
else
|
||||
|
@ -267,7 +267,7 @@ public class SummaryBarRenderer {
|
||||
.append(":</b></td><td align=\"right\">");
|
||||
int active = _helper.getActivePeers();
|
||||
buf.append(active)
|
||||
.append(" / ")
|
||||
.append(SummaryHelper.THINSP)
|
||||
.append(Math.max(active, _helper.getActiveProfiles()))
|
||||
.append("</td></tr>\n" +
|
||||
|
||||
@ -376,7 +376,7 @@ public class SummaryBarRenderer {
|
||||
.append(_("Used"))
|
||||
.append(":</b></td><td align=\"right\">")
|
||||
.append(_helper.getInboundTransferred())
|
||||
.append(" / ")
|
||||
.append(SummaryHelper.THINSP)
|
||||
.append(_helper.getOutboundTransferred())
|
||||
.append("</td></tr></table>\n" +
|
||||
|
||||
|
@ -29,6 +29,11 @@ import net.i2p.stat.RateStat;
|
||||
* the summary sections on the router console.
|
||||
*/
|
||||
public class SummaryHelper extends HelperBase {
|
||||
|
||||
// Opera 10.63 doesn't have the char, TODO check UA
|
||||
//static final String THINSP = " / ";
|
||||
static final String THINSP = " / ";
|
||||
|
||||
/**
|
||||
* Retrieve the shortened 4 character ident for the router located within
|
||||
* the current JVM at the given context.
|
||||
@ -321,7 +326,7 @@ public class SummaryHelper extends HelperBase {
|
||||
fmt = new DecimalFormat("#0.0");
|
||||
else
|
||||
fmt = new DecimalFormat("#0.00");
|
||||
return fmt.format(in) + " / " + fmt.format(out) + " " +
|
||||
return fmt.format(in) + THINSP + fmt.format(out) + " " +
|
||||
(mega ? 'M' : 'K');
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class RouterVersion {
|
||||
/** deprecated */
|
||||
public final static String ID = "Monotone";
|
||||
public final static String VERSION = CoreVersion.VERSION;
|
||||
public final static long BUILD = 38;
|
||||
public final static long BUILD = 39;
|
||||
|
||||
/** for example "-test" */
|
||||
public final static String EXTRA = "-rc";
|
||||
|
@ -63,6 +63,10 @@ public class NTCPTransport extends TransportImpl {
|
||||
private long _lastBadSkew;
|
||||
private static final long[] RATES = { 10*60*1000 };
|
||||
|
||||
// Opera doesn't have the char, TODO check UA
|
||||
//private static final String THINSP = " / ";
|
||||
private static final String THINSP = " / ";
|
||||
|
||||
public NTCPTransport(RouterContext ctx) {
|
||||
super(ctx);
|
||||
|
||||
@ -740,7 +744,7 @@ public class NTCPTransport extends TransportImpl {
|
||||
buf.append("<img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"").append(_("Outbound")).append("\"/>");
|
||||
buf.append("</td><td class=\"cells\" align=\"right\">");
|
||||
buf.append(DataHelper.formatDuration2(con.getTimeSinceReceive()));
|
||||
buf.append(" / ").append(DataHelper.formatDuration2(con.getTimeSinceSend()));
|
||||
buf.append(THINSP).append(DataHelper.formatDuration2(con.getTimeSinceSend()));
|
||||
buf.append("</td><td class=\"cells\" align=\"right\">");
|
||||
if (con.getTimeSinceReceive() < 10*1000) {
|
||||
buf.append(formatRate(con.getRecvRate()/1024));
|
||||
@ -748,7 +752,7 @@ public class NTCPTransport extends TransportImpl {
|
||||
} else {
|
||||
buf.append(formatRate(0));
|
||||
}
|
||||
buf.append(" / ");
|
||||
buf.append(THINSP);
|
||||
if (con.getTimeSinceSend() < 10*1000) {
|
||||
buf.append(formatRate(con.getSendRate()/1024));
|
||||
bpsSend += con.getSendRate();
|
||||
@ -785,7 +789,7 @@ public class NTCPTransport extends TransportImpl {
|
||||
if (!peers.isEmpty()) {
|
||||
// buf.append("<tr> <td colspan=\"11\"><hr></td></tr>\n");
|
||||
buf.append("<tr class=\"tablefooter\"><td align=\"center\"><b>").append(peers.size()).append(' ').append(_("peers")).append("</b></td><td> </td><td> ");
|
||||
buf.append("</td><td align=\"center\"><b>").append(formatRate(bpsRecv/1024)).append(" / ").append(formatRate(bpsSend/1024)).append("</b>");
|
||||
buf.append("</td><td align=\"center\"><b>").append(formatRate(bpsRecv/1024)).append(THINSP).append(formatRate(bpsSend/1024)).append("</b>");
|
||||
buf.append("</td><td align=\"center\"><b>").append(DataHelper.formatDuration2(totalUptime/peers.size()));
|
||||
buf.append("</b></td><td align=\"center\"><b>").append(DataHelper.formatDuration2(offsetTotal*1000/peers.size()));
|
||||
buf.append("</b></td><td align=\"center\"><b>").append(totalSend).append("</b></td><td align=\"center\"><b>").append(totalRecv);
|
||||
|
@ -170,6 +170,10 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
private static final int TRANSIENT_FAIL_BID = 8;
|
||||
private final TransportBid[] _cachedBid;
|
||||
|
||||
// Opera doesn't have the char, TODO check UA
|
||||
//private static final String THINSP = " / ";
|
||||
private static final String THINSP = " / ";
|
||||
|
||||
public UDPTransport(RouterContext ctx) {
|
||||
super(ctx);
|
||||
_context = ctx;
|
||||
@ -1982,7 +1986,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
buf.append("<td class=\"cells\" align=\"right\">");
|
||||
buf.append(DataHelper.formatDuration2(idleIn));
|
||||
buf.append("&thinsp/ ");
|
||||
buf.append(THINSP);
|
||||
buf.append(DataHelper.formatDuration2(idleOut));
|
||||
buf.append("</td>");
|
||||
|
||||
@ -1991,7 +1995,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
|
||||
buf.append("<td class=\"cells\" align=\"right\" nowrap>");
|
||||
buf.append(formatKBps(recvBps));
|
||||
buf.append(" / ");
|
||||
buf.append(THINSP);
|
||||
buf.append(formatKBps(sendBps));
|
||||
//buf.append(" K/s");
|
||||
//buf.append(formatKBps(peer.getReceiveACKBps()));
|
||||
@ -2017,9 +2021,9 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append("<td class=\"cells\" align=\"right\">");
|
||||
buf.append(sendWindow/1024);
|
||||
buf.append("K");
|
||||
buf.append(" / ").append(peer.getConcurrentSends());
|
||||
buf.append(" / ").append(peer.getConcurrentSendWindow());
|
||||
buf.append(" / ").append(peer.getConsecutiveSendRejections());
|
||||
buf.append(THINSP).append(peer.getConcurrentSends());
|
||||
buf.append(THINSP).append(peer.getConcurrentSendWindow());
|
||||
buf.append(THINSP).append(peer.getConsecutiveSendRejections());
|
||||
buf.append("</td>");
|
||||
|
||||
buf.append("<td class=\"cells\" align=\"right\">");
|
||||
@ -2042,7 +2046,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
buf.append("</td>");
|
||||
|
||||
buf.append("<td class=\"cells\" align=\"right\">");
|
||||
buf.append(peer.getMTU()).append(" / ").append(peer.getReceiveMTU());
|
||||
buf.append(peer.getMTU()).append(THINSP).append(peer.getReceiveMTU());
|
||||
|
||||
//.append('/');
|
||||
//buf.append(peer.getMTUIncreases()).append('/');
|
||||
@ -2102,7 +2106,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
|
||||
// buf.append("<tr><td colspan=\"16\"><hr></td></tr>\n");
|
||||
buf.append("<tr class=\"tablefooter\"> <td colspan=\"3\" align=\"left\"><b>").append(_("SUMMARY")).append("</b></td>" +
|
||||
"<td align=\"center\" nowrap><b>");
|
||||
buf.append(formatKBps(bpsIn)).append(" / ").append(formatKBps(bpsOut));
|
||||
buf.append(formatKBps(bpsIn)).append(THINSP).append(formatKBps(bpsOut));
|
||||
long x = numPeers > 0 ? uptimeMsTotal/numPeers : 0;
|
||||
buf.append("</b></td>" +
|
||||
"<td align=\"center\"><b>").append(DataHelper.formatDuration2(x));
|
||||
|
Reference in New Issue
Block a user