forked from I2P_Developers/i2p.i2p
* netdb.jsp: Don't show our info on summary page since there's a tab for it now
This commit is contained in:
@ -225,7 +225,7 @@ public class NetDbRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param mode 0: our info and charts only; 1: full routerinfos and charts; 2: abbreviated routerinfos and charts
|
* @param mode 0: charts only; 1: full routerinfos; 2: abbreviated routerinfos
|
||||||
*/
|
*/
|
||||||
public void renderStatusHTML(Writer out, int mode) throws IOException {
|
public void renderStatusHTML(Writer out, int mode) throws IOException {
|
||||||
if (!_context.netDb().isInitialized()) {
|
if (!_context.netDb().isInitialized()) {
|
||||||
@ -236,14 +236,16 @@ public class NetDbRenderer {
|
|||||||
|
|
||||||
boolean full = mode == 1;
|
boolean full = mode == 1;
|
||||||
boolean shortStats = mode == 2;
|
boolean shortStats = mode == 2;
|
||||||
boolean showStats = full || shortStats;
|
boolean showStats = full || shortStats; // this means show the router infos
|
||||||
Hash us = _context.routerHash();
|
Hash us = _context.routerHash();
|
||||||
|
|
||||||
StringBuilder buf = new StringBuilder(8192);
|
StringBuilder buf = new StringBuilder(8192);
|
||||||
RouterInfo ourInfo = _context.router().getRouterInfo();
|
if (showStats) {
|
||||||
renderRouterInfo(buf, ourInfo, true, true);
|
RouterInfo ourInfo = _context.router().getRouterInfo();
|
||||||
out.write(buf.toString());
|
renderRouterInfo(buf, ourInfo, true, true);
|
||||||
buf.setLength(0);
|
out.write(buf.toString());
|
||||||
|
buf.setLength(0);
|
||||||
|
}
|
||||||
|
|
||||||
ObjectCounter<String> versions = new ObjectCounter();
|
ObjectCounter<String> versions = new ObjectCounter();
|
||||||
ObjectCounter<String> countries = new ObjectCounter();
|
ObjectCounter<String> countries = new ObjectCounter();
|
||||||
@ -271,6 +273,12 @@ public class NetDbRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// don't bother to reindent
|
||||||
|
//
|
||||||
|
if (!showStats) {
|
||||||
|
|
||||||
|
// the summary table
|
||||||
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><th colspan=\"3\">")
|
buf.append("<table border=\"0\" cellspacing=\"30\"><tr><th colspan=\"3\">")
|
||||||
.append(_("Network Database Router Statistics"))
|
.append(_("Network Database Router Statistics"))
|
||||||
.append("</th></tr><tr><td style=\"vertical-align: top;\">");
|
.append("</th></tr><tr><td style=\"vertical-align: top;\">");
|
||||||
@ -323,6 +331,12 @@ public class NetDbRenderer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buf.append("</td></tr></table>");
|
buf.append("</td></tr></table>");
|
||||||
|
|
||||||
|
//
|
||||||
|
// don't bother to reindent
|
||||||
|
//
|
||||||
|
} // if !showStats
|
||||||
|
|
||||||
out.write(buf.toString());
|
out.write(buf.toString());
|
||||||
out.flush();
|
out.flush();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user