source: apps/routerconsole/jsp/config.jsp @ f32d3aae

Last change on this file since f32d3aae was f32d3aae, checked in by zzz <zzz@…>, 3 years ago

Console: Show and set burst bandwidth on /config (ticket #2123)
Better error handling
Comment out some unused things, misc. cleanups

  • Property mode set to 100644
File size: 4.2 KB
Line 
1<%@page contentType="text/html" %>
2<%@page trimDirectiveWhitespaces="true"%>
3<%@page pageEncoding="UTF-8"%>
4<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5
6<html><head>
7<%@include file="css.jsi" %>
8<%=intl.title("configure bandwidth")%>
9<script src="/js/ajax.js" type="text/javascript"></script>
10<%@include file="summaryajax.jsi" %>
11</head><body onload="initAjax()">
12
13<%@include file="summary.jsi" %>
14
15<jsp:useBean class="net.i2p.router.web.helpers.ConfigNetHelper" id="nethelper" scope="request" />
16<jsp:setProperty name="nethelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
17<h1><%=intl._t("I2P Bandwidth Configuration")%></h1>
18<div class="main" id="config_bandwidth">
19 <%@include file="confignav.jsi" %>
20
21 <jsp:useBean class="net.i2p.router.web.helpers.ConfigNetHandler" id="formhandler" scope="request" />
22<%@include file="formhandler.jsi" %>
23 <form action="" method="POST">
24 <input type="hidden" name="nonce" value="<%=pageNonce%>">
25 <input type="hidden" name="action" value="blah" >
26 <input type="hidden" name="ratesOnly" value="1" >
27
28 <h3 id="bwlimiter" class="tabletitle"><%=intl._t("Bandwidth Limiter")%>&nbsp;<a href="confignet">[<%=intl._t("Advanced Network Configuration")%>]</a></h3>
29 <table id="bandwidthconfig" class="configtable">
30 <tr><td class="infohelp" colspan="2">
31 <b><%=intl._t("I2P will work best if you configure your rates to match the speed of your internet connection.")%></b>
32 </td></tr>
33<%-- display burst, set standard, handler will fix up --%>
34   <tr><td><input style="text-align: right; width: 5em;" name="inboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="inboundBurstRate" />" >
35          <%=intl._t("KBps In")%>
36        </td><td>(<jsp:getProperty name="nethelper" property="inboundBurstRateBits" />)</td>
37<%--
38<!-- let's keep this simple...
39 bursting up to
40    <input name="inboundburstrate" type="text" size="5" value="<jsp:getProperty name="nethelper" property="inboundBurstRate" />" /> KBps for
41    <jsp:getProperty name="nethelper" property="inboundBurstFactorBox" /><br>
42-->
43--%>
44    </tr><tr>
45<%-- display burst, set standard, handler will fix up --%>
46        <td><input style="text-align: right; width: 5em;" name="outboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="outboundBurstRate" />" >
47         <%=intl._t("KBps Out")%>
48        </td><td>(<jsp:getProperty name="nethelper" property="outboundBurstRateBits" />)</td>
49<%--
50<!-- let's keep this simple...
51 bursting up to
52    <input name="outboundburstrate" type="text" size="2" value="<jsp:getProperty name="nethelper" property="outboundBurstRate" />" /> KBps for
53  <jsp:getProperty name="nethelper" property="outboundBurstFactorBox" /><br>
54 <i>KBps = kilobytes per second = 1024 bytes per second = 8192 bits per second.<br>
55    A negative rate sets the default.</i><br>
56-->
57--%>
58    </tr><tr>
59        <td><jsp:getProperty name="nethelper" property="sharePercentageBox" /> <%=intl._t("Share")%></td>
60        <td>(<jsp:getProperty name="nethelper" property="shareRateBits" />)
61</td></tr>
62<tr><td class="infohelp" colspan="2">
63<% int share = nethelper.getShareBandwidth();
64    if (share < 12) {
65        out.print("<b>");
66        out.print(intl._t("NOTE"));
67        out.print("</b>: ");
68        out.print(intl._t("You have configured I2P to share only {0} KBps.", share));
69        out.print("\n");
70
71        out.print(intl._t("I2P requires at least 12KBps to enable sharing. "));
72        out.print(intl._t("Please enable sharing (participating in tunnels) by configuring more bandwidth. "));
73        out.print(intl._t("It improves your anonymity by creating cover traffic, and helps the network."));
74    } else {
75        out.print(intl._t("You have configured I2P to share {0} KBps.", share));
76        out.print("\n");
77
78        out.print(intl._t("The higher the share bandwidth the more you improve your anonymity and help the network."));
79    }
80 %></td></tr>
81  <tr><td class="optionsave" colspan="2">
82<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
83<input type="submit" class="accept" name="save" value="<%=intl._t("Save changes")%>" >
84  </td></tr>
85 </table>
86</form>
87</div></body></html>
Note: See TracBrowser for help on using the repository browser.