forked from I2P_Developers/i2p.i2p
Console:
- Add spans to /stats page to avoid summary info breaking mid-sentence, and to aid presentation - Adjust /stats CSS so information isn't over-dense - Set graph size for generated graphs on /stats to 600x200 - Fix netdb leaseset tables - Ensure we only iconify add to addressbook links and not b32 dests - Individual icons for I2PSnark and I2P Plugins on /home - Add div to upnpstatus on peers to comply with layout - Fix various unclosed/erroneous tags
This commit is contained in:
@ -35,7 +35,7 @@ public class HomeHelper extends HelperBase {
|
||||
_x("Help") + S + _x("I2P Router Help") + S + "/help" + S + I + "support.png" + S +
|
||||
_x("Manage Plugins") + S + _x("Install and configure I2P plugins") + S + "/configplugins" + S + I + "plugin.png" + S +
|
||||
_x("Router Console") + S + _x("I2P Router Console") + S + "/console" + S + I + "info/console.png" + S +
|
||||
_x("Torrents") + S + _x("Built-in anonymous BitTorrent Client") + S + "/i2psnark/" + S + I + "magnet.png" + S +
|
||||
_x("Torrents") + S + _x("Built-in anonymous BitTorrent Client") + S + "/i2psnark/" + S + I + "i2psnark.png" + S +
|
||||
_x("Web Server") + S + _x("Local web server for hosting your own content on I2P") + S + "http://127.0.0.1:7658/" + S + I + "server_32x32.png" + S +
|
||||
"";
|
||||
|
||||
@ -61,7 +61,7 @@ public class HomeHelper extends HelperBase {
|
||||
_x("Open4You") + S + _x("Free eepsite hosting with PHP and MySQL") + S + "http://open4you.i2p/" + S + I + "open4you-logo.png" + S +
|
||||
_x("Pastebin") + S + _x("Encrypted I2P Pastebin") + S + "http://zerobin.i2p/" + S + I + "paste_plain.png" + S +
|
||||
_x("Planet I2P") + S + _x("I2P News") + S + "http://planet.i2p/" + S + I + "world.png" + S +
|
||||
_x("I2P Plugins") + S + _x("Add-on directory") + S + "http://i2pwiki.i2p/index.php?title=Plugins" + S + I + "plugin.png" + S +
|
||||
_x("I2P Plugins") + S + _x("Add-on directory") + S + "http://i2pwiki.i2p/index.php?title=Plugins" + S + I + "info/plugin_link.png" + S +
|
||||
_x("Postman's Tracker") + S + _x("Bittorrent tracker") + S + "http://tracker2.postman.i2p/" + S + I + "magnet.png" + S +
|
||||
_x("Project Website") + S + _x("I2P home page") + S + "http://i2p-projekt.i2p/" + S + I + "info_rhombus.png" + S +
|
||||
//_x("lenta news [ru]") + S + _x("Russian News Feed") + S + "http://lenta.i2p/" + S + I + "lenta_main_logo.png" + S +
|
||||
|
@ -309,7 +309,7 @@ class NetDbRenderer {
|
||||
buf.append("<table class=\"leaseset\">\n")
|
||||
.append("<tr><th><b>").append(_t("LeaseSet")).append(":</b> <code>").append(key.toBase64()).append("</code></th>");
|
||||
if (_context.clientManager().isLocal(dest)) {
|
||||
buf.append("<th><b><a href=\"tunnels#" + key.toBase64().substring(0,4) + "\">" + _t("Local") + "</a> ");
|
||||
buf.append("<th><a href=\"tunnels#" + key.toBase64().substring(0,4) + "\">" + _t("Local") + "</a> ");
|
||||
boolean unpublished = ! _context.clientManager().shouldPublishLeaseSet(key);
|
||||
if (unpublished)
|
||||
buf.append(_t("Unpublished") + ' ');
|
||||
@ -319,13 +319,13 @@ class NetDbRenderer {
|
||||
buf.append(in.getDestinationNickname());
|
||||
else
|
||||
buf.append(dest.toBase64().substring(0, 6));
|
||||
buf.append("</th></tr>\n<tr><td>");
|
||||
buf.append("</th></tr>\n<tr><td colspan=\"2\">");
|
||||
String b32 = dest.toBase32();
|
||||
buf.append("<a href=\"http://").append(b32).append("\">").append(b32).append("</a></td>");
|
||||
if (!unpublished) {
|
||||
String host = _context.namingService().reverseLookup(dest);
|
||||
if (host == null) {
|
||||
buf.append("<td>").append("<a title=\"").append(_t("Add to addressbook"))
|
||||
buf.append("<td class=\"addtobook\" colspan=\"2\">").append("<a title=\"").append(_t("Add to addressbook"))
|
||||
.append("\" href=\"/susidns/addressbook.jsp?book=private&destination=")
|
||||
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a></td>");
|
||||
}
|
||||
@ -340,7 +340,7 @@ class NetDbRenderer {
|
||||
buf.append("<code>").append(dest.toBase64().substring(0, 6)).append("</code></th>")
|
||||
.append("</tr>\n<tr>")
|
||||
.append("<td><a href=\"http://").append(b32).append("\">").append(b32).append("</a></td>\n")
|
||||
.append("<td><a title=\"").append(_t("Add to addressbook"))
|
||||
.append("<td class=\"addtobook\"><a title=\"").append(_t("Add to addressbook"))
|
||||
.append("\" href=\"/susidns/addressbook.jsp?book=private&destination=")
|
||||
.append(dest.toBase64()).append("#add\">").append(_t("Add to local addressbook")).append("</a></td>");
|
||||
}
|
||||
@ -361,7 +361,7 @@ class NetDbRenderer {
|
||||
if (c++ == medianCount)
|
||||
median = dist;
|
||||
}
|
||||
buf.append(" <b>Distance: </b><span id=\"distance\">").append(fmt.format(biLog2(dist))).append("</span></b>");
|
||||
buf.append(" <b>Distance: </b><span id=\"distance\">").append(fmt.format(biLog2(dist))).append("</span>");
|
||||
buf.append("</td></tr>\n<tr><td colspan=\"2\">");
|
||||
//buf.append(dest.toBase32()).append("<br>");
|
||||
buf.append("<b>Signature type:</b> ").append(dest.getSigningPublicKey().getType());
|
||||
|
@ -82,7 +82,7 @@ public class StatsGenerator {
|
||||
out.write(buf.toString());
|
||||
buf.setLength(0);
|
||||
for (String stat : stats) {
|
||||
buf.append("<li><b><a name=\"");
|
||||
buf.append("<li class=\"statsName\"><b><a name=\"");
|
||||
buf.append(stat);
|
||||
buf.append("\">");
|
||||
buf.append(stat);
|
||||
@ -152,9 +152,9 @@ public class StatsGenerator {
|
||||
RateStat rate = _context.statManager().getRate(name);
|
||||
String d = rate.getDescription();
|
||||
if (! "".equals(d)) {
|
||||
buf.append("<i>");
|
||||
buf.append("<span class=\"statsLongName\"><i>");
|
||||
buf.append(d);
|
||||
buf.append("</i><br>");
|
||||
buf.append("</i></span><br>");
|
||||
}
|
||||
if (rate.getLifetimeEventCount() <= 0) {
|
||||
buf.append("<ul><li class=\"noevents\">").append(_t("No lifetime events")).append("</li></ul>\n");
|
||||
@ -177,14 +177,14 @@ public class StatsGenerator {
|
||||
buf.append(_t("Highest average"));
|
||||
buf.append(": ");
|
||||
buf.append(num(curRate.getExtremeAverageValue()));
|
||||
buf.append("; ");
|
||||
buf.append(". ");
|
||||
|
||||
// This is rarely interesting
|
||||
// Don't bother to translate
|
||||
if (showAll) {
|
||||
buf.append("Highest total in a period: ");
|
||||
buf.append(num(curRate.getExtremeTotalValue()));
|
||||
buf.append("; ");
|
||||
buf.append(". ");
|
||||
}
|
||||
|
||||
// Saturation stats, which nobody understands, even when it isn't meaningless
|
||||
@ -198,32 +198,34 @@ public class StatsGenerator {
|
||||
buf.append(pct(curRate.getExtremeEventSaturation()));
|
||||
buf.append("; Peak saturated limit: ");
|
||||
buf.append(num(curRate.getExtremeSaturationLimit()));
|
||||
buf.append("; ");
|
||||
buf.append(". ");
|
||||
}
|
||||
|
||||
buf.append("<span class=\"nowrap\">");
|
||||
buf.append(ngettext("There was 1 event in this period.", "There were {0} events in this period.", (int)curRate.getLastEventCount()));
|
||||
buf.append(' ');
|
||||
buf.append("</span> <span class=\"nowrap\">");
|
||||
buf.append(_t("The period ended {0} ago.", DataHelper.formatDuration2(now - curRate.getLastCoalesceDate())));
|
||||
buf.append("</span>");
|
||||
} else {
|
||||
buf.append(" <i>").append(_t("No events")).append("</i> ");
|
||||
buf.append(" <i>").append(_t("No events")).append(" </i>");
|
||||
}
|
||||
long numPeriods = curRate.getLifetimePeriods();
|
||||
if (numPeriods > 0) {
|
||||
double avgFrequency = curRate.getLifetimeEventCount() / (double)numPeriods;
|
||||
buf.append(" (").append(_t("Average event count")).append(": ");
|
||||
buf.append(" <span class=\"nowrap\">(").append(_t("Average event count")).append(": ");
|
||||
buf.append(num(avgFrequency));
|
||||
buf.append("; ").append(_t("Events in peak period")).append(": ");
|
||||
// This isn't really the highest event count, but the event count during the period with the highest total value.
|
||||
buf.append(curRate.getExtremeEventCount());
|
||||
buf.append(")");
|
||||
buf.append(")</span>");
|
||||
}
|
||||
if (curRate.getSummaryListener() != null) {
|
||||
buf.append("<br><a href=\"graph?stat=").append(name)
|
||||
buf.append("<br><span class=\"statsViewGraphs\"><a href=\"graph?stat=").append(name)
|
||||
.append('.').append(periods[i]);
|
||||
buf.append("\">").append(_t("Graph Data")).append("</a> - ");
|
||||
buf.append("&w=600&h=200\">").append(_t("Graph Data")).append("</a> - ");
|
||||
buf.append(" <a href=\"graph?stat=").append(name)
|
||||
.append('.').append(periods[i]);
|
||||
buf.append("&showEvents=true\">").append(_t("Graph Event Count")).append("</a>");
|
||||
buf.append("&w=600&h=200&showEvents=true\">").append(_t("Graph Event Count")).append("</a></span>");
|
||||
// This can really blow up your browser if you click on it
|
||||
//buf.append(" - <a href=\"viewstat.jsp?stat=").append(name);
|
||||
//buf.append("&period=").append(periods[i]);
|
||||
|
Reference in New Issue
Block a user