forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 44d553e8644f01d5e5af3c3145210bdb0a923d3c)
to branch 'i2p.i2p.str4d.fux' (head 51022349e906bd393602b558861bcaaac4d56c89)
This commit is contained in:
@ -19,6 +19,7 @@ public class CSSHelper extends HelperBase {
|
|||||||
private static final String FORCE = "classic";
|
private static final String FORCE = "classic";
|
||||||
public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
|
public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
|
||||||
public static final String DEFAULT_REFRESH = "60";
|
public static final String DEFAULT_REFRESH = "60";
|
||||||
|
public static final int MIN_REFRESH = 5;
|
||||||
private static final String PROP_XFRAME = "routerconsole.disableXFrame";
|
private static final String PROP_XFRAME = "routerconsole.disableXFrame";
|
||||||
|
|
||||||
public String getTheme(String userAgent) {
|
public String getTheme(String userAgent) {
|
||||||
|
@ -11,12 +11,12 @@ public class ConfigNavHelper extends HelperBase {
|
|||||||
|
|
||||||
/** configX.jsp */
|
/** configX.jsp */
|
||||||
private static final String pages[] =
|
private static final String pages[] =
|
||||||
{"", "net", "ui", "home", "service", "update", "tunnels",
|
{"", "net", "ui", "sidebar", "home", "service", "update", "tunnels",
|
||||||
"clients", "peer", "keyring", "logging", "stats",
|
"clients", "peer", "keyring", "logging", "stats",
|
||||||
"reseed", "advanced" };
|
"reseed", "advanced" };
|
||||||
|
|
||||||
private static final String titles[] =
|
private static final String titles[] =
|
||||||
{_x("Bandwidth"), _x("Network"), _x("UI"), _x("Home Page"),
|
{_x("Bandwidth"), _x("Network"), _x("UI"), _x("Summary Bar"), _x("Home Page"),
|
||||||
_x("Service"), _x("Update"), _x("Tunnels"),
|
_x("Service"), _x("Update"), _x("Tunnels"),
|
||||||
_x("Clients"), _x("Peers"), _x("Keyring"), _x("Logging"), _x("Stats"),
|
_x("Clients"), _x("Peers"), _x("Keyring"), _x("Logging"), _x("Stats"),
|
||||||
_x("Reseeding"), _x("Advanced") };
|
_x("Reseeding"), _x("Advanced") };
|
||||||
|
@ -0,0 +1,135 @@
|
|||||||
|
package net.i2p.router.web;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import net.i2p.data.DataHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple summary bar configuration.
|
||||||
|
*
|
||||||
|
* @since 0.9.1
|
||||||
|
*/
|
||||||
|
public class ConfigSummaryHandler extends FormHandler {
|
||||||
|
|
||||||
|
private Map _settings;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void processForm() {
|
||||||
|
if (_action == null) return;
|
||||||
|
String group = getJettyString("group");
|
||||||
|
boolean deleting = _action.equals(_("Delete selected"));
|
||||||
|
boolean adding = _action.equals(_("Add item"));
|
||||||
|
boolean saving = _action.equals(_("Save order"));
|
||||||
|
if (_action.equals(_("Save")) && "0".equals(group)) {
|
||||||
|
try {
|
||||||
|
int refreshInterval = Integer.parseInt(getJettyString("refreshInterval"));
|
||||||
|
if (refreshInterval >= CSSHelper.MIN_REFRESH) {
|
||||||
|
_context.router().saveConfig(CSSHelper.PROP_REFRESH, "" + refreshInterval);
|
||||||
|
addFormNotice(_("Refresh interval changed"));
|
||||||
|
} else
|
||||||
|
addFormError(_("Refresh interval must be at least {0} seconds", CSSHelper.MIN_REFRESH));
|
||||||
|
} catch (java.lang.NumberFormatException e) {
|
||||||
|
addFormError(_("Refresh interval must be a number"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if ("1".equals(group)) {
|
||||||
|
if (_action.equals(_("Use full preset"))) {
|
||||||
|
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR, SummaryHelper.PRESET_FULL);
|
||||||
|
addFormNotice(_("Full summary bar preset selected.") + " " +
|
||||||
|
_("Summary bar will refresh shortly."));
|
||||||
|
} else if (_action.equals(_("Use reduced preset"))) {
|
||||||
|
_context.router().saveConfig(SummaryHelper.PROP_SUMMARYBAR, SummaryHelper.PRESET_SHORT);
|
||||||
|
addFormNotice(_("Reduced summary bar preset selected.") + " " +
|
||||||
|
_("Summary bar will refresh shortly."));
|
||||||
|
} else {
|
||||||
|
addFormError(_("Unsupported"));
|
||||||
|
}
|
||||||
|
} else if (adding || deleting || saving) {
|
||||||
|
Map<Integer, String> sections = new TreeMap<Integer, String>();
|
||||||
|
for (Object o : _settings.keySet()) {
|
||||||
|
if (!(o instanceof String))
|
||||||
|
continue;
|
||||||
|
String k = (String) o;
|
||||||
|
if (!k.startsWith("order_"))
|
||||||
|
continue;
|
||||||
|
String v = getJettyString(k);
|
||||||
|
k = k.substring(6);
|
||||||
|
k = k.substring(k.indexOf('_') + 1);
|
||||||
|
try {
|
||||||
|
int order = Integer.parseInt(v);
|
||||||
|
sections.put(order, k);
|
||||||
|
} catch (java.lang.NumberFormatException e) {
|
||||||
|
addFormError(_("Order must be an integer"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (adding) {
|
||||||
|
String name = getJettyString("name");
|
||||||
|
if (name == null || name.length() <= 0) {
|
||||||
|
addFormError(_("No section selected"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
String order = getJettyString("order");
|
||||||
|
if (order == null || order.length() <= 0) {
|
||||||
|
addFormError(_("No order entered"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
name = DataHelper.escapeHTML(name).replace(",", ",");
|
||||||
|
order = DataHelper.escapeHTML(order).replace(",", ",");
|
||||||
|
try {
|
||||||
|
int ki = Integer.parseInt(order);
|
||||||
|
sections.put(ki, name);
|
||||||
|
addFormNotice(_("Added") + ": " + name);
|
||||||
|
} catch (java.lang.NumberFormatException e) {
|
||||||
|
addFormError(_("Order must be an integer"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else if (deleting) {
|
||||||
|
Set<Integer> toDelete = new HashSet();
|
||||||
|
for (Object o : _settings.keySet()) {
|
||||||
|
if (!(o instanceof String))
|
||||||
|
continue;
|
||||||
|
String k = (String) o;
|
||||||
|
if (!k.startsWith("delete_"))
|
||||||
|
continue;
|
||||||
|
k = k.substring(7);
|
||||||
|
try {
|
||||||
|
int ki = Integer.parseInt(k);
|
||||||
|
toDelete.add(ki);
|
||||||
|
} catch (java.lang.NumberFormatException e) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (Iterator<Integer> iter = sections.keySet().iterator(); iter.hasNext(); ) {
|
||||||
|
int i = iter.next();
|
||||||
|
if (toDelete.contains(i)) {
|
||||||
|
String removedName = sections.get(i);
|
||||||
|
iter.remove();
|
||||||
|
addFormNotice(_("Removed") + ": " + removedName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
SummaryHelper.saveSummaryBarSections(_context, sections);
|
||||||
|
addFormError(_("Saved order of sections.") + " " +
|
||||||
|
_("Summary bar will refresh shortly."));
|
||||||
|
} else {
|
||||||
|
addFormError(_("Unsupported"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSettings(Map settings) { _settings = new HashMap(settings); }
|
||||||
|
|
||||||
|
/** curses Jetty for returning arrays */
|
||||||
|
private String getJettyString(String key) {
|
||||||
|
String[] arr = (String[]) _settings.get(key);
|
||||||
|
if (arr == null)
|
||||||
|
return null;
|
||||||
|
return arr[0].trim();
|
||||||
|
}
|
||||||
|
}
|
@ -191,7 +191,8 @@ public class GraphHelper extends FormHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// FIXME jrobin doesn't support setting the timezone, will have to mod TimeAxis.java
|
// FIXME jrobin doesn't support setting the timezone, will have to mod TimeAxis.java
|
||||||
_out.write("<p><i>" + _("All times are UTC.") + "</i></p>\n");
|
// 0.9.1 - all graphs currently state UTC on them, so this text blurb is unnecessary,
|
||||||
|
//_out.write("<p><i>" + _("All times are UTC.") + "</i></p>\n");
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
ioe.printStackTrace();
|
ioe.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,10 @@ package net.i2p.router.web;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
import net.i2p.router.RouterContext;
|
import net.i2p.router.RouterContext;
|
||||||
@ -12,6 +16,36 @@ import net.i2p.router.RouterContext;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class SummaryBarRenderer {
|
public class SummaryBarRenderer {
|
||||||
|
// Commented out because broken. Replaced by if-elseif blob below.
|
||||||
|
/*static final Map<String, java.lang.reflect.Method> ALL_SECTIONS;
|
||||||
|
static {
|
||||||
|
Map<String, java.lang.reflect.Method> aMap = new HashMap<String, java.lang.reflect.Method>();;
|
||||||
|
try {
|
||||||
|
aMap.put("HelpAndFAQ", SummaryBarRenderer.class.getMethod("renderHelpAndFAQHTML"));
|
||||||
|
aMap.put("I2PServices", SummaryBarRenderer.class.getMethod("renderI2PServicesHTML"));
|
||||||
|
aMap.put("I2PInternals", SummaryBarRenderer.class.getMethod("renderI2PInternalsHTML"));
|
||||||
|
aMap.put("General", SummaryBarRenderer.class.getMethod("renderGeneralHTML"));
|
||||||
|
aMap.put("ShortGeneral", SummaryBarRenderer.class.getMethod("renderShortGeneralHTML"));
|
||||||
|
aMap.put("NetworkReachability", SummaryBarRenderer.class.getMethod("renderNetworkReachabilityHTML"));
|
||||||
|
aMap.put("UpdateStatus", SummaryBarRenderer.class.getMethod("renderUpdateStatusHTML"));
|
||||||
|
aMap.put("RestartStatus", SummaryBarRenderer.class.getMethod("renderRestartStatusHTMLHTML"));
|
||||||
|
aMap.put("Peers", SummaryBarRenderer.class.getMethod("renderPeersHTML"));
|
||||||
|
aMap.put("FirewallAndReseedStatus", SummaryBarRenderer.class.getMethod("renderFirewallAndReseedStatusHTML"));
|
||||||
|
aMap.put("Bandwidth", SummaryBarRenderer.class.getMethod("renderBandwidthHTML"));
|
||||||
|
aMap.put("Tunnels", SummaryBarRenderer.class.getMethod("renderTunnelsHTML"));
|
||||||
|
aMap.put("Congestion", SummaryBarRenderer.class.getMethod("renderCongestionHTML"));
|
||||||
|
aMap.put("TunnelStatus", SummaryBarRenderer.class.getMethod("renderTunnelStatusHTML"));
|
||||||
|
aMap.put("Destinations", SummaryBarRenderer.class.getMethod("renderDestinationsHTML"));
|
||||||
|
aMap.put("NewsHeadings", SummaryBarRenderer.class.getMethod("renderNewsHeadingsHTML"));
|
||||||
|
} catch (java.lang.NoSuchMethodException e) {
|
||||||
|
}
|
||||||
|
ALL_SECTIONS = Collections.unmodifiableMap(aMap);
|
||||||
|
}*/
|
||||||
|
static final String ALL_SECTIONS[] =
|
||||||
|
{"HelpAndFAQ", "I2PServices", "I2PInternals", "General", "ShortGeneral", "NetworkReachability",
|
||||||
|
"UpdateStatus", "RestartStatus", "Peers", "FirewallAndReseedStatus", "Bandwidth", "Tunnels",
|
||||||
|
"Congestion", "TunnelStatus", "Destinations", "NewsHeadings" };
|
||||||
|
|
||||||
private final RouterContext _context;
|
private final RouterContext _context;
|
||||||
private final SummaryHelper _helper;
|
private final SummaryHelper _helper;
|
||||||
|
|
||||||
@ -26,35 +60,71 @@ public class SummaryBarRenderer {
|
|||||||
*/
|
*/
|
||||||
public void renderSummaryHTML(Writer out) throws IOException {
|
public void renderSummaryHTML(Writer out) throws IOException {
|
||||||
StringBuilder buf = new StringBuilder(8*1024);
|
StringBuilder buf = new StringBuilder(8*1024);
|
||||||
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
|
List<String> sections = _helper.getSummaryBarSections();
|
||||||
|
for (String section : sections) {
|
||||||
|
// Commented out because broken. Replaced by if-elseif blob below.
|
||||||
|
/*try {
|
||||||
|
String section = (String)ALL_SECTIONS.get(sections[i]).invoke(this);
|
||||||
|
if (section != null && section != "") {
|
||||||
|
out.write("<hr>" + i + "<hr>\n" + section);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
out.write("<hr>" +i + " - Exception<hr>\n" + e);
|
||||||
|
}*/
|
||||||
|
buf.setLength(0);
|
||||||
|
|
||||||
// TODO - the bar would render more cleanly if we specified the img height and width here,
|
buf.append("<hr>\n");
|
||||||
// but unfortunately the images in the different themes are different sizes.
|
if ("HelpAndFAQ".equals(section))
|
||||||
// They range in height from 37 to 43 px. But there's a -2 bottom margin...
|
buf.append(renderHelpAndFAQHTML());
|
||||||
// So put it in a div.
|
else if ("I2PServices".equals(section))
|
||||||
buf.append("<div style=\"height: 36px;\"><a href=\"/\" target=\"_top\"><img src=\"")
|
buf.append(renderI2PServicesHTML());
|
||||||
.append(CSSHelper.BASE_THEME_PATH)
|
else if ("I2PInternals".equals(section))
|
||||||
.append(theme)
|
buf.append(renderI2PInternalsHTML());
|
||||||
.append("/images/i2plogo.png\" alt=\"")
|
else if ("General".equals(section))
|
||||||
.append(_("I2P Router Console"))
|
buf.append(renderGeneralHTML());
|
||||||
.append("\" title=\"")
|
else if ("ShortGeneral".equals(section))
|
||||||
.append(_("I2P Router Console"))
|
buf.append(renderShortGeneralHTML());
|
||||||
.append("\"></a></div><hr>")
|
else if ("NetworkReachability".equals(section))
|
||||||
|
buf.append(renderNetworkReachabilityHTML());
|
||||||
|
else if ("UpdateStatus".equals(section))
|
||||||
|
buf.append(renderUpdateStatusHTML());
|
||||||
|
else if ("RestartStatus".equals(section))
|
||||||
|
buf.append(renderRestartStatusHTML());
|
||||||
|
else if ("Peers".equals(section))
|
||||||
|
buf.append(renderPeersHTML());
|
||||||
|
else if ("FirewallAndReseedStatus".equals(section))
|
||||||
|
buf.append(renderFirewallAndReseedStatusHTML());
|
||||||
|
else if ("Bandwidth".equals(section))
|
||||||
|
buf.append(renderBandwidthHTML());
|
||||||
|
else if ("Tunnels".equals(section))
|
||||||
|
buf.append(renderTunnelsHTML());
|
||||||
|
else if ("Congestion".equals(section))
|
||||||
|
buf.append(renderCongestionHTML());
|
||||||
|
else if ("TunnelStatus".equals(section))
|
||||||
|
buf.append(renderTunnelStatusHTML());
|
||||||
|
else if ("Destinations".equals(section))
|
||||||
|
buf.append(renderDestinationsHTML());
|
||||||
|
else if ("NewsHeadings".equals(section))
|
||||||
|
buf.append(renderNewsHeadingsHTML());
|
||||||
|
|
||||||
.append("<h3><a href=\"/help\" target=\"_top\" title=\"")
|
// Only output section if there's more than the <hr> to print
|
||||||
|
if (buf.length() > 5)
|
||||||
|
out.write(buf.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderHelpAndFAQHTML() {
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/help\" target=\"_top\" title=\"")
|
||||||
.append(_("I2P Router Help & FAQ"))
|
.append(_("I2P Router Help & FAQ"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("Help & FAQ"))
|
.append(_("Help & FAQ"))
|
||||||
.append("</a></h3><hr>");
|
.append("</a></h3>");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
File lpath = new File(_context.getBaseDir(), "docs/toolbar.html");
|
public String renderI2PServicesHTML() {
|
||||||
// you better have target="_top" for the links in there...
|
StringBuilder buf = new StringBuilder(512);
|
||||||
if (lpath.exists()) {
|
|
||||||
ContentHelper linkhelper = new ContentHelper();
|
|
||||||
linkhelper.setPage(lpath.getAbsolutePath());
|
|
||||||
linkhelper.setMaxLines("100");
|
|
||||||
buf.append(linkhelper.getContent());
|
|
||||||
} else {
|
|
||||||
buf.append("<h3><a href=\"/configclients\" target=\"_top\" title=\"")
|
buf.append("<h3><a href=\"/configclients\" target=\"_top\" title=\"")
|
||||||
.append(_("Configure startup of clients and webapps (services); manually start dormant services"))
|
.append(_("Configure startup of clients and webapps (services); manually start dormant services"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
@ -83,9 +153,13 @@ public class SummaryBarRenderer {
|
|||||||
|
|
||||||
.append(NavHelper.getClientAppLinks(_context))
|
.append(NavHelper.getClientAppLinks(_context))
|
||||||
|
|
||||||
.append("</td></tr></table>\n" +
|
.append("</td></tr></table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
"<hr><h3><a href=\"/config\" target=\"_top\" title=\"")
|
public String renderI2PInternalsHTML() {
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/config\" target=\"_top\" title=\"")
|
||||||
.append(_("Configure I2P Router"))
|
.append(_("Configure I2P Router"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("I2P Internals"))
|
.append(_("I2P Internals"))
|
||||||
@ -143,7 +217,7 @@ public class SummaryBarRenderer {
|
|||||||
.append(_("Stats"))
|
.append(_("Stats"))
|
||||||
.append("</a>\n" +
|
.append("</a>\n" +
|
||||||
|
|
||||||
"<a href=\"/i2ptunnel/\" target=\"_blank\" title=\"")
|
"<a href=\"/i2ptunnelmgr\" target=\"_top\" title=\"")
|
||||||
.append(_("Local Destinations"))
|
.append(_("Local Destinations"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("I2PTunnel"))
|
.append(_("I2PTunnel"))
|
||||||
@ -159,21 +233,23 @@ public class SummaryBarRenderer {
|
|||||||
if (javadoc.exists())
|
if (javadoc.exists())
|
||||||
buf.append("<a href=\"/javadoc/index.html\" target=\"_blank\">Javadoc</a>\n");
|
buf.append("<a href=\"/javadoc/index.html\" target=\"_blank\">Javadoc</a>\n");
|
||||||
buf.append("</td></tr></table>\n");
|
buf.append("</td></tr></table>\n");
|
||||||
|
return buf.toString();
|
||||||
out.write(buf.toString());
|
|
||||||
buf.setLength(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String renderGeneralHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
buf.append("<hr><h3><a href=\"/help\" target=\"_top\" title=\"")
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/help\" target=\"_top\" title=\"")
|
||||||
.append(_("I2P Router Help"))
|
.append(_("I2P Router Help"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("General"))
|
.append(_("General"))
|
||||||
.append("</a></h3><hr class=\"b\">\n" +
|
.append("</a></h3><hr class=\"b\">\n" +
|
||||||
|
|
||||||
"<table><tr>" +
|
"<table><tr>" +
|
||||||
"<td align=\"left\"><b>")
|
"<td align=\"left\"><b title=\"")
|
||||||
|
.append(_("Your Local Identity is your unique I2P router identity, similar to an ip address but tailored to I2P. "))
|
||||||
|
.append(_("Never disclose this to anyone, as it can reveal your real world ip."))
|
||||||
|
.append("\">")
|
||||||
.append(_("Local Identity"))
|
.append(_("Local Identity"))
|
||||||
.append(":</b></td>" +
|
.append(":</b></td>" +
|
||||||
"<td align=\"right\">" +
|
"<td align=\"right\">" +
|
||||||
@ -187,7 +263,10 @@ public class SummaryBarRenderer {
|
|||||||
.append(_("show"))
|
.append(_("show"))
|
||||||
.append("</a></td></tr>\n" +
|
.append("</a></td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The version of the I2P software we are running"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Version"))
|
.append(_("Version"))
|
||||||
.append(":</b></td>" +
|
.append(":</b></td>" +
|
||||||
"<td align=\"right\">")
|
"<td align=\"right\">")
|
||||||
@ -202,24 +281,67 @@ public class SummaryBarRenderer {
|
|||||||
.append(":</b></td>" +
|
.append(":</b></td>" +
|
||||||
"<td align=\"right\">")
|
"<td align=\"right\">")
|
||||||
.append(_helper.getUptime())
|
.append(_helper.getUptime())
|
||||||
.append("</td></tr></table>\n" +
|
.append("</td></tr></table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
"<hr><h4><a href=\"/confignet#help\" target=\"_top\" title=\"")
|
public String renderShortGeneralHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<table>" +
|
||||||
|
"<tr title=\"")
|
||||||
|
.append(_("The version of the I2P software we are running"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
|
.append(_("Version"))
|
||||||
|
.append(":</b></td>" +
|
||||||
|
"<td align=\"right\">")
|
||||||
|
.append(_helper.getVersion())
|
||||||
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
|
"<tr title=\"")
|
||||||
|
.append(_("How long we've been running for this session"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
|
.append(_("Uptime"))
|
||||||
|
.append(":</b></td>" +
|
||||||
|
"<td align=\"right\">")
|
||||||
|
.append(_helper.getUptime())
|
||||||
|
.append("</td></tr></table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderNetworkReachabilityHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h4><a href=\"/confignet#help\" target=\"_top\" title=\"")
|
||||||
.append(_("Help with configuring your firewall and router for optimal I2P performance"))
|
.append(_("Help with configuring your firewall and router for optimal I2P performance"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("Network"))
|
.append(_("Network"))
|
||||||
.append(": ")
|
.append(": ")
|
||||||
.append(_helper.getReachability())
|
.append(_helper.getReachability())
|
||||||
.append("</a></h4><hr>\n")
|
.append("</a></h4>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderUpdateStatusHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append(_helper.getUpdateStatus());
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
.append(_helper.getUpdateStatus())
|
public String renderRestartStatusHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append(_helper.getRestartStatus());
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderPeersHTML() {
|
||||||
.append(_helper.getRestartStatus())
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/peers\" target=\"_top\" title=\"")
|
||||||
.append("<hr><h3><a href=\"/peers\" target=\"_top\" title=\"")
|
|
||||||
.append(_("Show all current peer connections"))
|
.append(_("Show all current peer connections"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("Peers"))
|
.append(_("Peers"))
|
||||||
@ -227,7 +349,10 @@ public class SummaryBarRenderer {
|
|||||||
|
|
||||||
"<table>\n" +
|
"<table>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Peers we've been talking to in the last few minutes/last hour"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Active"))
|
.append(_("Active"))
|
||||||
.append(":</b></td><td align=\"right\">");
|
.append(":</b></td><td align=\"right\">");
|
||||||
int active = _helper.getActivePeers();
|
int active = _helper.getActivePeers();
|
||||||
@ -236,38 +361,56 @@ public class SummaryBarRenderer {
|
|||||||
.append(Math.max(active, _helper.getActiveProfiles()))
|
.append(Math.max(active, _helper.getActiveProfiles()))
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The number of peers available for building client tunnels (usually between 8 and 30)"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Fast"))
|
.append(_("Fast"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getFastPeers())
|
.append(_helper.getFastPeers())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The number of peers available for building exploratory tunnels (usually between 8 and 75)"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("High capacity"))
|
.append(_("High capacity"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getHighCapacityPeers())
|
.append(_helper.getHighCapacityPeers())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The number of peers available for network database inquries"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Integrated"))
|
.append(_("Integrated"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getWellIntegratedPeers())
|
.append(_helper.getWellIntegratedPeers())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The total number of peers in our network database"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Known"))
|
.append(_("Known"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getAllPeers())
|
.append(_helper.getAllPeers())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"</table><hr>\n");
|
"</table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
out.write(buf.toString());
|
|
||||||
buf.setLength(0);
|
|
||||||
|
|
||||||
|
public String renderFirewallAndReseedStatusHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
buf.append(_helper.getFirewallAndReseedStatus());
|
buf.append(_helper.getFirewallAndReseedStatus());
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderBandwidthHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
buf.append("<h3><a href=\"/config\" title=\"")
|
buf.append("<h3><a href=\"/config\" title=\"")
|
||||||
.append(_("Configure router bandwidth allocation"))
|
.append(_("Configure router bandwidth allocation"))
|
||||||
.append("\" target=\"_top\">")
|
.append("\" target=\"_top\">")
|
||||||
@ -303,82 +446,182 @@ public class SummaryBarRenderer {
|
|||||||
.append(_helper.getInboundTransferred())
|
.append(_helper.getInboundTransferred())
|
||||||
.append(SummaryHelper.THINSP)
|
.append(SummaryHelper.THINSP)
|
||||||
.append(_helper.getOutboundTransferred())
|
.append(_helper.getOutboundTransferred())
|
||||||
.append("</td></tr></table>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<hr><h3><a href=\"/tunnels\" target=\"_top\" title=\"")
|
"</table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderTunnelsHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/tunnels\" target=\"_top\" title=\"")
|
||||||
.append(_("View existing tunnels and tunnel build status"))
|
.append(_("View existing tunnels and tunnel build status"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("Tunnels"))
|
.append(_("Tunnels"))
|
||||||
.append("</a></h3><hr class=\"b\">" +
|
.append("</a></h3><hr class=\"b\">" +
|
||||||
"<table>\n" +
|
"<table>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Used for building and testing tunnels, and communicating with floodfill peers"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Exploratory"))
|
.append(_("Exploratory"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getInboundTunnels() + _helper.getOutboundTunnels())
|
.append(_helper.getInboundTunnels() + _helper.getOutboundTunnels())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Tunnels we are using to provide or access services on the network"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Client"))
|
.append(_("Client"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getInboundClientTunnels() + _helper.getOutboundClientTunnels())
|
.append(_helper.getInboundClientTunnels() + _helper.getOutboundClientTunnels())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Tunnels we are participating in, directly contributing bandwith to the network"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Participating"))
|
.append(_("Participating"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getParticipatingTunnels())
|
.append(_helper.getParticipatingTunnels())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("The ratio of tunnel hops we provide to tunnel hops we use - a value greater than 1.00 indicates a positive contribution to the network"))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Share ratio"))
|
.append(_("Share ratio"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getShareRatio())
|
.append(_helper.getShareRatio())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"</table><hr><h3><a href=\"/jobs\" target=\"_top\" title=\"")
|
"</table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderCongestionHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append("<h3><a href=\"/jobs\" target=\"_top\" title=\"")
|
||||||
.append(_("What's in the router's job queue?"))
|
.append(_("What's in the router's job queue?"))
|
||||||
.append("\">")
|
.append("\">")
|
||||||
.append(_("Congestion"))
|
.append(_("Congestion"))
|
||||||
.append("</a></h3><hr class=\"b\">" +
|
.append("</a></h3><hr class=\"b\">" +
|
||||||
"<table>\n" +
|
"<table>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Indicates router performance. "))
|
||||||
|
.append(_("Value should generally be near 0ms - consistently higher values may indicate configuration or system problems."))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Job lag"))
|
.append(_("Job lag"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getJobLag())
|
.append(_helper.getJobLag())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"<tr><td align=\"left\"><b>")
|
"<tr title=\"")
|
||||||
|
.append(_("Indicates how quickly outbound messages to other I2P routers are sent. "))
|
||||||
|
.append(_("If this is more than a few hundred milliseconds, you may have a bandwidth configuration problem."))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Message delay"))
|
.append(_("Message delay"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getMessageDelay())
|
.append(_helper.getMessageDelay())
|
||||||
.append("</td></tr>\n");
|
.append("</td></tr>\n");
|
||||||
|
|
||||||
if (!_context.getBooleanPropertyDefaultTrue("router.disableTunnelTesting")) {
|
if (!_context.getBooleanPropertyDefaultTrue("router.disableTunnelTesting")) {
|
||||||
buf.append("<tr><td align=\"left\"><b>")
|
buf.append("<tr title=\"")
|
||||||
|
.append(_("Round trip time for a tunnel test. "))
|
||||||
|
.append(_("If this is consistently higher than 5 seconds, you may have a network issue."))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Tunnel lag"))
|
.append(_("Tunnel lag"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getTunnelLag())
|
.append(_helper.getTunnelLag())
|
||||||
.append("</td></tr>\n");
|
.append("</td></tr>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.append("<tr><td align=\"left\"><b>")
|
buf.append("<tr title=\"")
|
||||||
|
.append(_("Queued requests from other routers to participate in tunnels. "))
|
||||||
|
.append(_("If this is frequently greater than 0, you may have an I2P bandwidth allocation issue."))
|
||||||
|
.append("\">" +
|
||||||
|
"<td align=\"left\"><b>")
|
||||||
.append(_("Backlog"))
|
.append(_("Backlog"))
|
||||||
.append(":</b></td><td align=\"right\">")
|
.append(":</b></td><td align=\"right\">")
|
||||||
.append(_helper.getInboundBacklog())
|
.append(_helper.getInboundBacklog())
|
||||||
.append("</td></tr>\n" +
|
.append("</td></tr>\n" +
|
||||||
|
|
||||||
"</table><hr><h4>")
|
"</table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String renderTunnelStatusHTML() {
|
||||||
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(50);
|
||||||
|
buf.append("<h4>")
|
||||||
.append(_(_helper.getTunnelStatus()))
|
.append(_(_helper.getTunnelStatus()))
|
||||||
.append("</h4><hr>\n")
|
.append("</h4>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
.append(_helper.getDestinations())
|
public String renderDestinationsHTML() {
|
||||||
.append("<hr>\n");
|
if (_helper == null) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
buf.append(_helper.getDestinations());
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @since 0.9.1 */
|
||||||
|
public String renderNewsHeadingsHTML() {
|
||||||
out.write(buf.toString());
|
if (_helper == null) return "";
|
||||||
|
NewsHelper newshelper = _helper.getNewsHelper();
|
||||||
|
if (newshelper == null || newshelper.shouldShowNews()) return "";
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
String consoleNonce = System.getProperty("router.consoleNonce");
|
||||||
|
if (consoleNonce != null) {
|
||||||
|
// Set up title and pre-headings stuff.
|
||||||
|
buf.append("<h3><a href=\"/configupdate\">")
|
||||||
|
.append(_("News & Updates"))
|
||||||
|
.append("</a></h3><hr class=\"b\"><div class=\"newsheadings\">\n");
|
||||||
|
// Get news content.
|
||||||
|
String newsContent = newshelper.getContent();
|
||||||
|
if (newsContent != "") {
|
||||||
|
buf.append("<ul>\n");
|
||||||
|
// Parse news content for headings.
|
||||||
|
int start = newsContent.indexOf("<h3>");
|
||||||
|
while (start >= 0) {
|
||||||
|
// Add offset to start:
|
||||||
|
// 4 - gets rid of <h3>
|
||||||
|
// 16 - gets rid of the date as well (assuming form "<h3>yyyy-mm-dd: Foobarbaz...")
|
||||||
|
newsContent = newsContent.substring(start+16, newsContent.length());
|
||||||
|
int end = newsContent.indexOf("</h3>");
|
||||||
|
if (end >= 0) {
|
||||||
|
String heading = newsContent.substring(0, end);
|
||||||
|
buf.append("<li>")
|
||||||
|
.append(heading)
|
||||||
|
.append("</li>\n");
|
||||||
|
}
|
||||||
|
start = newsContent.indexOf("<h3>");
|
||||||
|
}
|
||||||
|
buf.append("</ul>\n");
|
||||||
|
// Set up string containing <a> to show news.
|
||||||
|
buf.append("<a href=\"/?news=1&consoleNonce=")
|
||||||
|
.append(consoleNonce)
|
||||||
|
.append("\">")
|
||||||
|
.append(_("Show news"))
|
||||||
|
.append("</a>\n");
|
||||||
|
} else {
|
||||||
|
buf.append("<center><i>")
|
||||||
|
.append(_("none"))
|
||||||
|
.append("</i></center>");
|
||||||
|
}
|
||||||
|
// Add post-headings stuff.
|
||||||
|
buf.append("</div>\n");
|
||||||
|
}
|
||||||
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** translate a string */
|
/** translate a string */
|
||||||
|
@ -4,10 +4,13 @@ import java.io.IOException;
|
|||||||
import java.text.Collator;
|
import java.text.Collator;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeSet;
|
||||||
|
|
||||||
import net.i2p.data.DataHelper;
|
import net.i2p.data.DataHelper;
|
||||||
import net.i2p.data.Destination;
|
import net.i2p.data.Destination;
|
||||||
@ -17,6 +20,7 @@ import net.i2p.data.RouterAddress;
|
|||||||
import net.i2p.data.RouterInfo;
|
import net.i2p.data.RouterInfo;
|
||||||
import net.i2p.router.CommSystemFacade;
|
import net.i2p.router.CommSystemFacade;
|
||||||
import net.i2p.router.Router;
|
import net.i2p.router.Router;
|
||||||
|
import net.i2p.router.RouterContext;
|
||||||
import net.i2p.router.RouterVersion;
|
import net.i2p.router.RouterVersion;
|
||||||
import net.i2p.router.TunnelPoolSettings;
|
import net.i2p.router.TunnelPoolSettings;
|
||||||
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
|
import net.i2p.router.networkdb.kademlia.FloodfillNetworkDatabaseFacade;
|
||||||
@ -35,6 +39,35 @@ public class SummaryHelper extends HelperBase {
|
|||||||
// Opera 10.63 doesn't have the char, TODO check UA
|
// Opera 10.63 doesn't have the char, TODO check UA
|
||||||
//static final String THINSP = " / ";
|
//static final String THINSP = " / ";
|
||||||
static final String THINSP = " / ";
|
static final String THINSP = " / ";
|
||||||
|
private static final char S = ',';
|
||||||
|
static final String PROP_SUMMARYBAR = "routerconsole.summaryBar";
|
||||||
|
|
||||||
|
static final String PRESET_FULL =
|
||||||
|
"HelpAndFAQ" + S +
|
||||||
|
"I2PServices" + S +
|
||||||
|
"I2PInternals" + S +
|
||||||
|
"General" + S +
|
||||||
|
"NetworkReachability" + S +
|
||||||
|
"UpdateStatus" + S +
|
||||||
|
"RestartStatus" + S +
|
||||||
|
"Peers" + S +
|
||||||
|
"FirewallAndReseedStatus" + S +
|
||||||
|
"Bandwidth" + S +
|
||||||
|
"Tunnels" + S +
|
||||||
|
"Congestion" + S +
|
||||||
|
"TunnelStatus" + S +
|
||||||
|
"Destinations" + S +
|
||||||
|
"";
|
||||||
|
|
||||||
|
static final String PRESET_SHORT =
|
||||||
|
"ShortGeneral" + S +
|
||||||
|
"NewsHeadings" + S +
|
||||||
|
"UpdateStatus" + S +
|
||||||
|
"NetworkReachability" + S +
|
||||||
|
"FirewallAndReseedStatus" + S +
|
||||||
|
"Destinations" + S +
|
||||||
|
"RestartStatus" + S +
|
||||||
|
"";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieve the shortened 4 character ident for the router located within
|
* Retrieve the shortened 4 character ident for the router located within
|
||||||
@ -375,7 +408,7 @@ public class SummaryHelper extends HelperBase {
|
|||||||
List<Destination> clients = new ArrayList(_context.clientManager().listClients());
|
List<Destination> clients = new ArrayList(_context.clientManager().listClients());
|
||||||
|
|
||||||
StringBuilder buf = new StringBuilder(512);
|
StringBuilder buf = new StringBuilder(512);
|
||||||
buf.append("<h3><a href=\"/i2ptunnel/\" target=\"_blank\" title=\"").append(_("Add/remove/edit & control your client and server tunnels")).append("\">").append(_("Local Destinations")).append("</a></h3><hr class=\"b\"><div class=\"tunnels\">");
|
buf.append("<h3><a href=\"/i2ptunnelmgr\" target=\"_top\" title=\"").append(_("Add/remove/edit & control your client and server tunnels")).append("\">").append(_("Local Destinations")).append("</a></h3><hr class=\"b\"><div class=\"tunnels\">");
|
||||||
if (!clients.isEmpty()) {
|
if (!clients.isEmpty()) {
|
||||||
Collections.sort(clients, new AlphaComparator());
|
Collections.sort(clients, new AlphaComparator());
|
||||||
buf.append("<table>");
|
buf.append("<table>");
|
||||||
@ -651,7 +684,7 @@ public class SummaryHelper extends HelperBase {
|
|||||||
.append(_("Download Unsigned<br>Update {0}", getUnsignedUpdateVersion()))
|
.append(_("Download Unsigned<br>Update {0}", getUnsignedUpdateVersion()))
|
||||||
.append("</button><br>\n");
|
.append("</button><br>\n");
|
||||||
}
|
}
|
||||||
buf.append("</form>\n");
|
buf.append("</form><hr>\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return buf.toString();
|
return buf.toString();
|
||||||
@ -710,6 +743,22 @@ public class SummaryHelper extends HelperBase {
|
|||||||
return buf.toString();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private NewsHelper _newshelper;
|
||||||
|
public void storeNewsHelper(NewsHelper n) { _newshelper = n; }
|
||||||
|
public NewsHelper getNewsHelper() { return _newshelper; }
|
||||||
|
|
||||||
|
public List<String> getSummaryBarSections() {
|
||||||
|
String config = _context.getProperty(PROP_SUMMARYBAR, PRESET_FULL);
|
||||||
|
return Arrays.asList(config.split("" + S));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void saveSummaryBarSections(RouterContext ctx, Map<Integer, String> sections) {
|
||||||
|
StringBuilder buf = new StringBuilder(512);
|
||||||
|
for(String section : sections.values())
|
||||||
|
buf.append(section).append(S);
|
||||||
|
ctx.router().saveConfig(PROP_SUMMARYBAR, buf.toString());
|
||||||
|
}
|
||||||
|
|
||||||
/** output the summary bar to _out */
|
/** output the summary bar to _out */
|
||||||
public void renderSummaryBar() throws IOException {
|
public void renderSummaryBar() throws IOException {
|
||||||
SummaryBarRenderer renderer = new SummaryBarRenderer(_context, this);
|
SummaryBarRenderer renderer = new SummaryBarRenderer(_context, this);
|
||||||
@ -733,4 +782,56 @@ public class SummaryHelper extends HelperBase {
|
|||||||
private String _requestURI;
|
private String _requestURI;
|
||||||
public void setRequestURI(String s) { _requestURI = s; }
|
public void setRequestURI(String s) { _requestURI = s; }
|
||||||
public String getRequestURI() { return _requestURI; }
|
public String getRequestURI() { return _requestURI; }
|
||||||
|
|
||||||
|
public String getConfigTable() {
|
||||||
|
String[] allSections = SummaryBarRenderer.ALL_SECTIONS;
|
||||||
|
List<String> sections = getSummaryBarSections();
|
||||||
|
TreeSet<String> sortedSections = new TreeSet();
|
||||||
|
|
||||||
|
for (int i = 0; i < allSections.length; i++) {
|
||||||
|
String section = allSections[i];
|
||||||
|
if (!sections.contains(section))
|
||||||
|
sortedSections.add(section);
|
||||||
|
}
|
||||||
|
|
||||||
|
StringBuilder buf = new StringBuilder(2048);
|
||||||
|
buf.append("<table><tr><th>")
|
||||||
|
.append(_("Remove"))
|
||||||
|
.append("</th><th>")
|
||||||
|
.append(_("Order"))
|
||||||
|
.append("</th><th>")
|
||||||
|
.append(_("Name"))
|
||||||
|
.append("</th></tr>\n");
|
||||||
|
for (String section : sections) {
|
||||||
|
int i = sections.indexOf(section);
|
||||||
|
buf.append("<tr><td align=\"center\"><input type=\"checkbox\" class=\"optbox\" name=\"delete_")
|
||||||
|
.append(i)
|
||||||
|
.append("\"></td><td align=\"center\"><input type=\"text\" name=\"order_")
|
||||||
|
.append(i + "_" + section)
|
||||||
|
.append("\" value=\"")
|
||||||
|
.append(i)
|
||||||
|
.append("\"></td><td align=\"left\">")
|
||||||
|
.append(section)
|
||||||
|
.append("</td></tr>\n");
|
||||||
|
}
|
||||||
|
buf.append("<tr><td align=\"center\"><b>")
|
||||||
|
.append(_("Add")).append(":</b>" +
|
||||||
|
"</td><td align=\"center\"><input type=\"text\" name=\"order\" value=\"")
|
||||||
|
.append(sections.size())
|
||||||
|
.append("\"></td>" +
|
||||||
|
"<td align=\"left\">" +
|
||||||
|
"<select name=\"name\">\n" +
|
||||||
|
"<option value=\"\" selected=\"selected\">")
|
||||||
|
.append(_("Select a section to add"))
|
||||||
|
.append("</option>\n");
|
||||||
|
|
||||||
|
for (String s : sortedSections) {
|
||||||
|
buf.append("<option value=\"").append(s).append("\">")
|
||||||
|
.append(s).append("</option>\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
buf.append("</select></td></tr>")
|
||||||
|
.append("</table>\n");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("configure bandwidth")%>
|
<%=intl.title("configure bandwidth")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config advanced")%>
|
<%=intl.title("config advanced")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -10,7 +10,14 @@ button span.hide{
|
|||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
input.default { width: 1px; height: 1px; visibility: hidden; }
|
input.default { width: 1px; height: 1px; visibility: hidden; }
|
||||||
</style></head><body>
|
</style>
|
||||||
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -12,7 +12,13 @@ input.default {
|
|||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Home Page Configuration")%></h1>
|
<h1><%=intl._("I2P Home Page Configuration")%></h1>
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config keyring")%>
|
<%=intl.title("config keyring")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Keyring Configuration")%></h1>
|
<h1><%=intl._("I2P Keyring Configuration")%></h1>
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config logging")%>
|
<%=intl.title("config logging")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.ConfigLoggingHelper" id="logginghelper" scope="request" />
|
||||||
<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="logginghelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config networking")%>
|
<%=intl.title("config networking")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config peers")%>
|
<%=intl.title("config peers")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Peer Configuration")%></h1>
|
<h1><%=intl._("I2P Peer Configuration")%></h1>
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config reseeding")%>
|
<%=intl.title("config reseeding")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config service")%>
|
<%=intl.title("config service")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Service Configuration")%></h1>
|
<h1><%=intl._("I2P Service Configuration")%></h1>
|
||||||
|
74
apps/routerconsole/jsp/configsidebar.jsp
Normal file
74
apps/routerconsole/jsp/configsidebar.jsp
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
<%@page contentType="text/html"%>
|
||||||
|
<%@page pageEncoding="UTF-8"%>
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
|
||||||
|
<html><head>
|
||||||
|
<%@include file="css.jsi" %>
|
||||||
|
<%=intl.title("config summary bar")%>
|
||||||
|
<style type='text/css'>
|
||||||
|
input.default {
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
|
<%@include file="summary.jsi" %>
|
||||||
|
<h1><%=intl._("I2P Summary Bar Configuration")%></h1>
|
||||||
|
<div class="main" id="main">
|
||||||
|
<%@include file="confignav.jsi" %>
|
||||||
|
|
||||||
|
<jsp:useBean class="net.i2p.router.web.ConfigSummaryHandler" id="formhandler" scope="request" />
|
||||||
|
<% formhandler.storeMethod(request.getMethod()); %>
|
||||||
|
<jsp:setProperty name="formhandler" property="*" />
|
||||||
|
<jsp:setProperty name="formhandler" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<jsp:setProperty name="formhandler" property="settings" value="<%=request.getParameterMap()%>" />
|
||||||
|
<jsp:getProperty name="formhandler" property="allMessages" />
|
||||||
|
<%
|
||||||
|
String pageNonce = formhandler.getNewNonce();
|
||||||
|
%>
|
||||||
|
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="summaryhelper" scope="request" />
|
||||||
|
<jsp:setProperty name="summaryhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
|
||||||
|
<h3><%=intl._("Refresh Interval")%></h3>
|
||||||
|
<form action="" method="POST">
|
||||||
|
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||||
|
<input type="hidden" name="group" value="0">
|
||||||
|
<input type="text" name="refreshInterval" value="<jsp:getProperty name="intl" property="refresh" />" >
|
||||||
|
<%=intl._("seconds")%>
|
||||||
|
<input type="submit" name="action" class="accept" value="<%=intl._("Save")%>" >
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<h3><%=intl._("Use preset layout")%></h3>
|
||||||
|
<p><%=intl._("Several preset layouts for the summary bar are available.")%>
|
||||||
|
<%=intl._("Note that choosing one of the presets will cause the current summary bar configuration to be lost.")%></p>
|
||||||
|
<hr><div class="formaction">
|
||||||
|
<form action="" method="POST">
|
||||||
|
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||||
|
<input type="hidden" name="group" value="1">
|
||||||
|
<input type="submit" class="reload" name="action" value="<%=intl._("Use full preset")%>" >
|
||||||
|
<input type="submit" class="reload" name="action" value="<%=intl._("Use reduced preset")%>" >
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3><%=intl._("Customise Summary Bar")%></h3>
|
||||||
|
<form action="" method="POST">
|
||||||
|
<input type="hidden" name="nonce" value="<%=pageNonce%>" >
|
||||||
|
<input type="hidden" name="group" value="2">
|
||||||
|
<jsp:getProperty name="summaryhelper" property="configTable" />
|
||||||
|
<div class="formaction">
|
||||||
|
<input type="submit" name="action" class="default" value="<%=intl._("Add item")%>" >
|
||||||
|
<input type="submit" name="action" class="delete" value="<%=intl._("Delete selected")%>" >
|
||||||
|
<input type="reset" class="cancel" value="<%=intl._("Cancel")%>" >
|
||||||
|
<input type="submit" name="action" class="reload" value="<%=intl._("Save order")%>" >
|
||||||
|
<input type="submit" name="action" class="add" value="<%=intl._("Add item")%>" >
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div></body></html>
|
@ -6,10 +6,17 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config stats")%>
|
<%=intl.title("config stats")%>
|
||||||
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function init()
|
function init()
|
||||||
{
|
{
|
||||||
checkAll = false;
|
checkAll = false;
|
||||||
|
initAjax();
|
||||||
}
|
}
|
||||||
function toggleAll(category)
|
function toggleAll(category)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config tunnels")%>
|
<%=intl.title("config tunnels")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config UI")%>
|
<%=intl.title("config UI")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("config update")%>
|
<%=intl.title("config update")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Update Configuration")%></h1>
|
<h1><%=intl._("I2P Update Configuration")%></h1>
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("home")%>
|
<%=intl.title("home")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%
|
<%
|
||||||
String consoleNonce = System.getProperty("router.consoleNonce");
|
String consoleNonce = System.getProperty("router.consoleNonce");
|
||||||
if (consoleNonce == null) {
|
if (consoleNonce == null) {
|
||||||
@ -15,16 +21,13 @@
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|
||||||
<%@include file="summary.jsi" %><h1><%=intl._("I2P Router Console")%></h1>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
<h1><%=intl._("I2P Router Console")%></h1>
|
||||||
<div class="news" id="news">
|
<div class="news" id="news">
|
||||||
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
|
||||||
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
|
||||||
<%
|
<%
|
||||||
if (newshelper.shouldShowNews()) {
|
if (newshelper.shouldShowNews()) {
|
||||||
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
|
||||||
%>
|
%>
|
||||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
|
||||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
|
||||||
<jsp:getProperty name="newshelper" property="content" />
|
<jsp:getProperty name="newshelper" property="content" />
|
||||||
<hr>
|
<hr>
|
||||||
<%
|
<%
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>I2P Router Console - Debug</title>
|
<html><head><title>I2P Router Console - Debug</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1>Router SKM</h1>
|
<h1>Router SKM</h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
|
@ -16,7 +16,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("Page Not Found")%>
|
<%=intl.title("Page Not Found")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=ERROR_CODE%> <%=ERROR_MESSAGE%></h1>
|
<h1><%=ERROR_CODE%> <%=ERROR_MESSAGE%></h1>
|
||||||
<div class="sorry" id="warning">
|
<div class="sorry" id="warning">
|
||||||
|
@ -12,7 +12,13 @@
|
|||||||
<%
|
<%
|
||||||
graphHelper.storeWriter(out);
|
graphHelper.storeWriter(out);
|
||||||
%>
|
%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Performance Graphs")%></h1>
|
<h1><%=intl._("I2P Performance Graphs")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
|
@ -19,7 +19,13 @@
|
|||||||
out.print(graphHelper.getRefreshMeta());
|
out.print(graphHelper.getRefreshMeta());
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Performance Graphs")%></h1>
|
<h1><%=intl._("I2P Performance Graphs")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>I2P Router Console - help</title>
|
<html><head><title>I2P Router Console - help</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1>I2P Router Help & Support</h1>
|
<h1>I2P Router Help & Support</h1>
|
||||||
<div class="main" id="main"><p>
|
<div class="main" id="main"><p>
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>I2P مساعدة لوحة التحكم</title>
|
<html><head><title>I2P مساعدة لوحة التحكم</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1>I2P مساعدة لوحة التحكم</h1>
|
<h1>I2P مساعدة لوحة التحكم</h1>
|
||||||
<div class="main" id="main" dir="rtl" lang="ar"><p>
|
<div class="main" id="main" dir="rtl" lang="ar"><p>
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>Console du routeur I2P - Aide</title>
|
<html><head><title>Console du routeur I2P - Aide</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
Traduction de mars 2011 (magma@mail.i2p)
|
Traduction de mars 2011 (magma@mail.i2p)
|
||||||
<h1>Aide et assistance du routeur I2P</h1>
|
<h1>Aide et assistance du routeur I2P</h1>
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>I2P Router Console - help</title>
|
<html><head><title>I2P Router Console - help</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1>I2P Router Help & Support</h1>
|
<h1>I2P Router Help & Support</h1>
|
||||||
<div class="main" id="main"><p>
|
<div class="main" id="main"><p>
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>Консоль маршрутизатора I2P - справка</title>
|
<html><head><title>Консоль маршрутизатора I2P - справка</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
<h1>Справка маршрутизатора I2P</h1>
|
<h1>Справка маршрутизатора I2P</h1>
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<%=intl.title("home")%>
|
<%=intl.title("home")%>
|
||||||
<script src="/js/ajax.js" type="text/javascript"></script>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var failMessage = "<b><%=intl._("Router is down")%><\/b>";
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
function requestAjax1() { ajax("/xhr1.jsp", "xhr", 15000); }
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
function initAjax() { setTimeout(requestAjax1, 15000); }
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
</script>
|
</script>
|
||||||
</head><body onload="initAjax()">
|
</head><body onload="initAjax()">
|
||||||
<%
|
<%
|
||||||
@ -20,6 +20,11 @@
|
|||||||
%>
|
%>
|
||||||
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||||
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||||
|
%>
|
||||||
|
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||||
|
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||||
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.ConfigUpdateHelper" id="updatehelper" scope="request" />
|
||||||
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="updatehelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
|
||||||
@ -28,19 +33,10 @@
|
|||||||
<div style="height: 36px;">
|
<div style="height: 36px;">
|
||||||
<a href="/console"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/i2plogo.png" alt="<%=intl._("I2P Router Console")%>" title="<%=intl._("I2P Router Console")%>"></a>
|
<a href="/console"><img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/i2plogo.png" alt="<%=intl._("I2P Router Console")%>" title="<%=intl._("I2P Router Console")%>"></a>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
|
||||||
<div id="xhr">
|
<div id="xhr">
|
||||||
<!-- for non-script -->
|
<!-- for non-script -->
|
||||||
<%@include file="xhr1.jsi" %>
|
<%@include file="xhr1.jsi" %>
|
||||||
</div>
|
</div>
|
||||||
<%
|
|
||||||
if (!newshelper.shouldShowNews()) {
|
|
||||||
%>
|
|
||||||
<hr><h3><%=intl._("News")%></h3><hr class="b">
|
|
||||||
<jsp:getProperty name="updatehelper" property="newsStatus" />
|
|
||||||
<%
|
|
||||||
} // !shouldShowNews()
|
|
||||||
%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -48,11 +44,8 @@
|
|||||||
|
|
||||||
<%
|
<%
|
||||||
if (newshelper.shouldShowNews()) {
|
if (newshelper.shouldShowNews()) {
|
||||||
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
|
||||||
%>
|
%>
|
||||||
<div class="news" id="news">
|
<div class="news" id="news">
|
||||||
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
|
||||||
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
|
||||||
<jsp:getProperty name="newshelper" property="content" />
|
<jsp:getProperty name="newshelper" property="content" />
|
||||||
<hr>
|
<hr>
|
||||||
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
|
<jsp:getProperty name="updatehelper" property="newsStatus" /><br>
|
||||||
|
41
apps/routerconsole/jsp/i2ptunnelmgr.jsp
Normal file
41
apps/routerconsole/jsp/i2ptunnelmgr.jsp
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<%@page contentType="text/html"%>
|
||||||
|
<%@page trimDirectiveWhitespaces="true"%>
|
||||||
|
<%@page pageEncoding="UTF-8"%>
|
||||||
|
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="tester" scope="request" />
|
||||||
|
<jsp:setProperty name="tester" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
// CSSHelper is also pulled in by css.jsi below...
|
||||||
|
boolean testIFrame = tester.allowIFrame(request.getHeader("User-Agent"));
|
||||||
|
if (!testIFrame) {
|
||||||
|
response.setStatus(302, "Moved");
|
||||||
|
response.setHeader("Location", "/i2ptunnel/");
|
||||||
|
} else {
|
||||||
|
%>
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
|
||||||
|
<html><head>
|
||||||
|
<%@include file="css.jsi" %>
|
||||||
|
<%=intl.title("home")%>
|
||||||
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
function resizeFrame(f) { f.style.height = f.contentWindow.document.body.scrollHeight + "px"; }
|
||||||
|
function init() {
|
||||||
|
resizeFrame(document.getElementById("i2ptunnelframe"));
|
||||||
|
initAjax();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head><body onload="init()">
|
||||||
|
|
||||||
|
<%@include file="summary.jsi" %>
|
||||||
|
|
||||||
|
<h1><%=intl._("I2P Tunnel Manager")%></h1>
|
||||||
|
<div class="main" id="main">
|
||||||
|
<iframe src="/i2ptunnel/" width="100%" frameborder="0" border="0" name="i2ptunnelframe" id="i2ptunnelframe" onload="resizeFrame(document.getElementById('i2ptunnelframe'))">
|
||||||
|
</iframe>
|
||||||
|
</div></body></html>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("Jar File Dump")%>
|
<%=intl.title("Jar File Dump")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %><h1>Jar File Dump</h1>
|
<%@include file="summary.jsi" %><h1>Jar File Dump</h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
<jsp:useBean class="net.i2p.router.web.FileDumpHelper" id="dumpHelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.FileDumpHelper" id="dumpHelper" scope="request" />
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("job queue")%>
|
<%=intl.title("job queue")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %><h1><%=intl._("I2P Router Job Queue")%></h1>
|
<%@include file="summary.jsi" %><h1><%=intl._("I2P Router Job Queue")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
<jsp:useBean class="net.i2p.router.web.JobQueueHelper" id="jobQueueHelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.JobQueueHelper" id="jobQueueHelper" scope="request" />
|
||||||
|
@ -5,7 +5,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("logs")%>
|
<%=intl.title("logs")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Router Logs")%></h1>
|
<h1><%=intl._("I2P Router Logs")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
@ -33,8 +39,10 @@
|
|||||||
<p><%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%></p>
|
<p><%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%></p>
|
||||||
<h3><%=intl._("Critical Logs")%></h3><a name="criticallogs"> </a>
|
<h3><%=intl._("Critical Logs")%></h3><a name="criticallogs"> </a>
|
||||||
<jsp:getProperty name="logsHelper" property="criticalLogs" />
|
<jsp:getProperty name="logsHelper" property="criticalLogs" />
|
||||||
|
<hr>
|
||||||
<h3><%=intl._("Router Logs")%> (<a href="configlogging"><%=intl._("configure")%></a>)</h3>
|
<h3><%=intl._("Router Logs")%> (<a href="configlogging"><%=intl._("configure")%></a>)</h3>
|
||||||
<jsp:getProperty name="logsHelper" property="logs" />
|
<jsp:getProperty name="logsHelper" property="logs" />
|
||||||
|
<hr>
|
||||||
<h3><%=intl._("Service (Wrapper) Logs")%></h3><a name="servicelogs"> </a>
|
<h3><%=intl._("Service (Wrapper) Logs")%></h3><a name="servicelogs"> </a>
|
||||||
<jsp:getProperty name="logsHelper" property="serviceLogs" />
|
<jsp:getProperty name="logsHelper" property="serviceLogs" />
|
||||||
</div><hr></div></body></html>
|
</div><hr></div></body></html>
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("network database")%>
|
<%=intl.title("network database")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Network Database")%></h1>
|
<h1><%=intl._("I2P Network Database")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
|
@ -7,7 +7,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("WebApp Not Found")%>
|
<%=intl.title("WebApp Not Found")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("Web Application Not Running")%></h1>
|
<h1><%=intl._("Web Application Not Running")%></h1>
|
||||||
<div class="sorry" id="warning">
|
<div class="sorry" id="warning">
|
||||||
|
@ -9,7 +9,13 @@
|
|||||||
%>
|
%>
|
||||||
<html><head><title>I2P Router Console - internals</title>
|
<html><head><title>I2P Router Console - internals</title>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<jsp:useBean class="net.i2p.router.web.OldConsoleHelper" id="conhelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.OldConsoleHelper" id="conhelper" scope="request" />
|
||||||
<jsp:setProperty name="conhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="conhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("peer connections")%>
|
<%=intl.title("peer connections")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Network Peers")%></h1>
|
<h1><%=intl._("I2P Network Peers")%></h1>
|
||||||
<div class="main" id="main"><div class="wideload">
|
<div class="main" id="main"><div class="wideload">
|
||||||
|
@ -6,7 +6,14 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("peer profiles")%>
|
<%=intl.title("peer profiles")%>
|
||||||
</head><body><%@include file="summary.jsi" %>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("I2P Network Peer Profiles")%></h1>
|
<h1><%=intl._("I2P Network Peer Profiles")%></h1>
|
||||||
<div class="main" id="main"><div class="wideload">
|
<div class="main" id="main"><div class="wideload">
|
||||||
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("statistics")%>
|
<%=intl.title("statistics")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<jsp:useBean class="net.i2p.router.web.OldConsoleHelper" id="oldhelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.OldConsoleHelper" id="oldhelper" scope="request" />
|
||||||
<jsp:setProperty name="oldhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="oldhelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
@ -1,3 +1,10 @@
|
|||||||
|
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||||
|
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
java.io.File newspath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||||
|
%>
|
||||||
|
<jsp:setProperty name="newshelper" property="page" value="<%=newspath.getAbsolutePath()%>" />
|
||||||
|
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||||
<div class="routersummaryouter">
|
<div class="routersummaryouter">
|
||||||
<%
|
<%
|
||||||
// The refresh delay, 0 to disable
|
// The refresh delay, 0 to disable
|
||||||
@ -15,7 +22,7 @@
|
|||||||
newDelay = "?refresh=" + d;
|
newDelay = "?refresh=" + d;
|
||||||
}
|
}
|
||||||
if (!"0".equals(d))
|
if (!"0".equals(d))
|
||||||
out.print("<iframe src=\"/summaryframe.jsp" + newDelay + "\" height=\"1500\" width=\"200\" scrolling=\"auto\" frameborder=\"0\" title=\"sidepanel\">\n");
|
out.print("<noscript><iframe src=\"/summaryframe.jsp" + newDelay + "\" height=\"1500\" width=\"200\" scrolling=\"auto\" frameborder=\"0\" title=\"sidepanel\"></noscript>\n");
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
<div class="routersummary">
|
<div class="routersummary">
|
||||||
@ -34,11 +41,11 @@
|
|||||||
|
|
||||||
// d and allowIFrame defined above
|
// d and allowIFrame defined above
|
||||||
if (!"0".equals(d)) {
|
if (!"0".equals(d)) {
|
||||||
out.print("</div></iframe>\n");
|
out.print("</div><noscript></iframe></noscript>\n");
|
||||||
} else if (allowIFrame) {
|
} else if (allowIFrame) {
|
||||||
// since we don't have an iframe this will reload the base page, and
|
// since we don't have an iframe this will reload the base page, and
|
||||||
// the new delay will be passed to the iframe above
|
// the new delay will be passed to the iframe above
|
||||||
out.print("<div class=\"refresh\"><form action=\"" + request.getRequestURI() + "\" method=\"POST\">\n" +
|
out.print("<noscript><div class=\"refresh\"><form action=\"" + request.getRequestURI() + "\" method=\"POST\">\n" +
|
||||||
"<b>");
|
"<b>");
|
||||||
// We have intl defined when this is included, but not when compiled standalone.
|
// We have intl defined when this is included, but not when compiled standalone.
|
||||||
out.print(intl._("Refresh (s)"));
|
out.print(intl._("Refresh (s)"));
|
||||||
@ -47,7 +54,7 @@
|
|||||||
// ditto
|
// ditto
|
||||||
out.print(intl._("Enable"));
|
out.print(intl._("Enable"));
|
||||||
out.print("</button>\n" +
|
out.print("</button>\n" +
|
||||||
"</form></div></div>\n");
|
"</form></div></noscript></div>\n");
|
||||||
} else {
|
} else {
|
||||||
out.print("</div>\n");
|
out.print("</div>\n");
|
||||||
}
|
}
|
||||||
|
@ -52,11 +52,18 @@
|
|||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
</head><body style="margin: 0;"><div class="routersummary">
|
</head><body style="margin: 0;"><div class="routersummary">
|
||||||
|
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||||
|
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
java.io.File newspath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||||
|
%>
|
||||||
|
<jsp:setProperty name="newshelper" property="page" value="<%=newspath.getAbsolutePath()%>" />
|
||||||
|
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||||
<%@include file="summarynoframe.jsi" %>
|
<%@include file="summarynoframe.jsi" %>
|
||||||
<%
|
<%
|
||||||
// d and shutdownSoon defined above
|
// d and shutdownSoon defined above
|
||||||
if (!shutdownSoon) {
|
if (!shutdownSoon) {
|
||||||
out.print("<div class=\"refresh\"><form action=\"summaryframe.jsp\" method=\"POST\">\n");
|
out.print("<hr>\n<div class=\"refresh\"><form action=\"summaryframe.jsp\" method=\"POST\">\n");
|
||||||
if ("0".equals(d)) {
|
if ("0".equals(d)) {
|
||||||
out.print("<b>");
|
out.print("<b>");
|
||||||
out.print(intl._("Refresh (s)"));
|
out.print(intl._("Refresh (s)"));
|
||||||
|
@ -1,35 +1,17 @@
|
|||||||
<%@page import="net.i2p.router.web.SummaryHelper" %>
|
|
||||||
<%
|
<%
|
||||||
/*
|
/*
|
||||||
* Note:
|
* TODO - the bar would render more cleanly if we specified the img height and width here,
|
||||||
* This is included almost 30 times, so keep whitespace etc. to a minimum.
|
* but unfortunately the images in the different themes are different sizes.
|
||||||
|
* They range in height from 37 to 43 px. But there's a -2 bottom margin...
|
||||||
|
* So put it in a div.
|
||||||
*/
|
*/
|
||||||
%>
|
%>
|
||||||
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
|
<div style="height: 36px;">
|
||||||
<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<a href="/" target="_top">
|
||||||
<jsp:setProperty name="helper" property="action" value="<%=request.getParameter(\"action\")%>" />
|
<img src="<%=intl.getTheme(request.getHeader("User-Agent"))%>images/i2plogo.png" alt="<%=intl._("I2P Router Console")%>" title="<%=intl._("I2P Router Console")%>">
|
||||||
<jsp:setProperty name="helper" property="updateNonce" value="<%=request.getParameter(\"updateNonce\")%>" />
|
</a>
|
||||||
<jsp:setProperty name="helper" property="consoleNonce" value="<%=request.getParameter(\"consoleNonce\")%>" />
|
</div>
|
||||||
<jsp:setProperty name="helper" property="requestURI" value="<%=request.getRequestURI()%>" />
|
<div id="xhr">
|
||||||
<% helper.storeWriter(out); %>
|
<!-- for non-script -->
|
||||||
<%
|
<%@include file="xhr1.jsi" %>
|
||||||
/*
|
</div>
|
||||||
* The following is required for the reseed button to work, although we probably
|
|
||||||
* only need the reseedNonce property.
|
|
||||||
*/
|
|
||||||
%>
|
|
||||||
<jsp:useBean class="net.i2p.router.web.ReseedHandler" id="reseed" scope="request" />
|
|
||||||
<jsp:setProperty name="reseed" property="*" />
|
|
||||||
<%
|
|
||||||
/*
|
|
||||||
* The following is required for the update buttons to work, although we probably
|
|
||||||
* only need the updateNonce property.
|
|
||||||
*/
|
|
||||||
%>
|
|
||||||
<jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" />
|
|
||||||
<jsp:setProperty name="update" property="*" />
|
|
||||||
<jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
|
||||||
<%
|
|
||||||
// moved to java for ease of translation and to avoid 30 copies
|
|
||||||
helper.renderSummaryBar();
|
|
||||||
%>
|
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("tunnel summary")%>
|
<%=intl.title("tunnel summary")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %><h1><%=intl._("I2P Tunnel Summary")%></h1>
|
<%@include file="summary.jsi" %><h1><%=intl._("I2P Tunnel Summary")%></h1>
|
||||||
<div class="main" id="main">
|
<div class="main" id="main">
|
||||||
<jsp:useBean class="net.i2p.router.web.TunnelHelper" id="tunnelHelper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.TunnelHelper" id="tunnelHelper" scope="request" />
|
||||||
|
@ -6,7 +6,13 @@
|
|||||||
<html><head>
|
<html><head>
|
||||||
<%@include file="css.jsi" %>
|
<%@include file="css.jsi" %>
|
||||||
<%=intl.title("Peer Profile")%>
|
<%=intl.title("Peer Profile")%>
|
||||||
</head><body>
|
<script src="/js/ajax.js" type="text/javascript"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
var failMessage = "<hr><b><%=intl._("Router is down")%><\/b>";
|
||||||
|
function requestAjax1() { ajax("/xhr1.jsp", "xhr", <%=intl.getRefresh()%>000); }
|
||||||
|
function initAjax() { setTimeout(requestAjax1, <%=intl.getRefresh()%>000); }
|
||||||
|
</script>
|
||||||
|
</head><body onload="initAjax()">
|
||||||
<%@include file="summary.jsi" %>
|
<%@include file="summary.jsi" %>
|
||||||
<h1><%=intl._("Peer Profile")%></h1>
|
<h1><%=intl._("Peer Profile")%></h1>
|
||||||
<div class="main" id="main"><div class="wideload">
|
<div class="main" id="main"><div class="wideload">
|
||||||
|
@ -1,24 +1,41 @@
|
|||||||
|
<%@page import="net.i2p.router.web.SummaryHelper" %>
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
* Note:
|
||||||
|
* This is included on every refresh, so keep whitespace etc. to a minimum.
|
||||||
|
*/
|
||||||
|
%>
|
||||||
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.SummaryHelper" id="helper" scope="request" />
|
||||||
<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="helper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
<jsp:setProperty name="helper" property="action" value="<%=request.getParameter(\"action\")%>" />
|
<jsp:setProperty name="helper" property="action" value="<%=request.getParameter(\"action\")%>" />
|
||||||
<table><tr><td align="left"><b><%=intl._("Version")%>:</b></td><td align="right">
|
|
||||||
<jsp:getProperty name="helper" property="version" />
|
|
||||||
</td></tr><tr><td align="left"><b><%=intl._("Uptime")%>:</b></td><td align="right">
|
|
||||||
<jsp:getProperty name="helper" property="uptime" />
|
|
||||||
</td></tr></table><hr>
|
|
||||||
<jsp:setProperty name="helper" property="updateNonce" value="<%=request.getParameter(\"updateNonce\")%>" />
|
<jsp:setProperty name="helper" property="updateNonce" value="<%=request.getParameter(\"updateNonce\")%>" />
|
||||||
<jsp:setProperty name="helper" property="consoleNonce" value="<%=request.getParameter(\"consoleNonce\")%>" />
|
<jsp:setProperty name="helper" property="consoleNonce" value="<%=request.getParameter(\"consoleNonce\")%>" />
|
||||||
<%
|
<%
|
||||||
String reqURI = request.getRequestURI();
|
String reqURI = request.getRequestURI();
|
||||||
if (reqURI != null)
|
if (reqURI != null)
|
||||||
reqURI = reqURI.replace("/xhr1.jsp", "/home");
|
reqURI = reqURI.replace("/xhr1.jsp", "/");
|
||||||
helper.setRequestURI(reqURI);
|
helper.setRequestURI(reqURI);
|
||||||
%>
|
%>
|
||||||
<h4><a href="/confignet#help" title="<%=intl._("Help with configuring your firewall and router for optimal I2P performance")%>"><%=intl._("Network")%>:
|
<% helper.storeWriter(out); %>
|
||||||
<jsp:getProperty name="helper" property="reachability" /></a></h4>
|
<% helper.storeNewsHelper(newshelper); %>
|
||||||
<hr>
|
<%
|
||||||
<jsp:getProperty name="helper" property="updateStatus" />
|
/*
|
||||||
<jsp:getProperty name="helper" property="restartStatus" />
|
* The following is required for the reseed button to work, although we probably
|
||||||
<hr>
|
* only need the reseedNonce property.
|
||||||
<jsp:getProperty name="helper" property="firewallAndReseedStatus" />
|
*/
|
||||||
<jsp:getProperty name="helper" property="destinations" />
|
%>
|
||||||
|
<jsp:useBean class="net.i2p.router.web.ReseedHandler" id="reseed" scope="request" />
|
||||||
|
<jsp:setProperty name="reseed" property="*" />
|
||||||
|
<%
|
||||||
|
/*
|
||||||
|
* The following is required for the update buttons to work, although we probably
|
||||||
|
* only need the updateNonce property.
|
||||||
|
*/
|
||||||
|
%>
|
||||||
|
<jsp:useBean class="net.i2p.router.web.UpdateHandler" id="update" scope="request" />
|
||||||
|
<jsp:setProperty name="update" property="*" />
|
||||||
|
<jsp:setProperty name="update" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
// moved to java for ease of translation
|
||||||
|
helper.renderSummaryBar();
|
||||||
|
%>
|
||||||
|
@ -11,4 +11,11 @@
|
|||||||
%>
|
%>
|
||||||
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="intl" scope="request" />
|
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="intl" scope="request" />
|
||||||
<jsp:setProperty name="intl" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
<jsp:setProperty name="intl" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<jsp:useBean class="net.i2p.router.web.NewsHelper" id="newshelper" scope="request" />
|
||||||
|
<jsp:setProperty name="newshelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
|
||||||
|
<%
|
||||||
|
java.io.File fpath = new java.io.File(net.i2p.I2PAppContext.getGlobalContext().getRouterDir(), "docs/news.xml");
|
||||||
|
%>
|
||||||
|
<jsp:setProperty name="newshelper" property="page" value="<%=fpath.getAbsolutePath()%>" />
|
||||||
|
<jsp:setProperty name="newshelper" property="maxLines" value="300" />
|
||||||
<%@include file="xhr1.jsi" %>
|
<%@include file="xhr1.jsi" %>
|
||||||
|
@ -171,6 +171,10 @@ div.routersummary h4 {
|
|||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.routersummary ul {
|
||||||
|
text-align: left !important;
|
||||||
|
}
|
||||||
|
|
||||||
div.routersummary table {
|
div.routersummary table {
|
||||||
border: 0;
|
border: 0;
|
||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
@ -228,6 +232,11 @@ div routersummary hr:last-child {
|
|||||||
margin-bottom: -5px !important;
|
margin-bottom: -5px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.newsheadings {
|
||||||
|
text-align: right;
|
||||||
|
margin: 0 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
div.tunnels {
|
div.tunnels {
|
||||||
padding-top: 3px !important;
|
padding-top: 3px !important;
|
||||||
margin-left: -4px;
|
margin-left: -4px;
|
||||||
@ -401,14 +410,14 @@ div.news hr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div.confignav {
|
div.confignav {
|
||||||
padding: 15px 10px !important;
|
background: url('images/header.png') repeat-x scroll center center #000;
|
||||||
margin: 15px 0;
|
padding:5px 5px 6px !important;
|
||||||
background: #000 url('images/header.png') center center repeat-x ;
|
margin: -1px 0 0;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 0 0 4px 4px;
|
||||||
-khtml-border-radius: 4px;
|
-khtml-border-radius: 0 0 4px 4px;
|
||||||
border-radius: 4px;
|
border-radius: 0 0 4px 4px;
|
||||||
border: 1px solid #494;
|
border: 1px solid #494;
|
||||||
font-size: 9.5pt !important;
|
font-size: 8.5pt !important;
|
||||||
font-weight: bold !important;
|
font-weight: bold !important;
|
||||||
line-height: 160% !important;
|
line-height: 160% !important;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user