I2PSnark layout, themes, tunnel tables..
This commit is contained in:
@ -698,11 +698,12 @@ public class SnarkManager implements Snark.CompleteListener {
|
||||
// , "Orion", "http://gKik1lMlRmuroXVGTZ~7v4Vez3L3ZSpddrGZBrxVriosCQf7iHu6CIk8t15BKsj~P0JJpxrofeuxtm7SCUAJEr0AIYSYw8XOmp35UfcRPQWyb1LsxUkMT4WqxAT3s1ClIICWlBu5An~q-Mm0VFlrYLIPBWlUFnfPR7jZ9uP5ZMSzTKSMYUWao3ejiykr~mtEmyls6g-ZbgKZawa9II4zjOy-hdxHgP-eXMDseFsrym4Gpxvy~3Fv9TuiSqhpgm~UeTo5YBfxn6~TahKtE~~sdCiSydqmKBhxAQ7uT9lda7xt96SS09OYMsIWxLeQUWhns-C~FjJPp1D~IuTrUpAFcVEGVL-BRMmdWbfOJEcWPZ~CBCQSO~VkuN1ebvIOr9JBerFMZSxZtFl8JwcrjCIBxeKPBmfh~xYh16BJm1BBBmN1fp2DKmZ2jBNkAmnUbjQOqWvUcehrykWk5lZbE7bjJMDFH48v3SXwRuDBiHZmSbsTY6zhGY~GkMQHNGxPMMSIAAAA.i2p/bt/announce.php=http://orion.i2p/bt/"
|
||||
// , "anonymity", "http://8EoJZIKrWgGuDrxA3nRJs1jsPfiGwmFWL91hBrf0HA7oKhEvAna4Ocx47VLUR9retVEYBAyWFK-eZTPcvhnz9XffBEiJQQ~kFSCqb1fV6IfPiV3HySqi9U5Caf6~hC46fRd~vYnxmaBLICT3N160cxBETqH3v2rdxdJpvYt8q4nMk9LUeVXq7zqCTFLLG5ig1uKgNzBGe58iNcsvTEYlnbYcE930ABmrzj8G1qQSgSwJ6wx3tUQNl1z~4wSOUMan~raZQD60lRK70GISjoX0-D0Po9WmPveN3ES3g72TIET3zc3WPdK2~lgmKGIs8GgNLES1cXTolvbPhdZK1gxddRMbJl6Y6IPFyQ9o4-6Rt3Lp-RMRWZ2TG7j2OMcNSiOmATUhKEFBDfv-~SODDyopGBmfeLw16F4NnYednvn4qP10dyMHcUASU6Zag4mfc2-WivrOqeWhD16fVAh8MoDpIIT~0r9XmwdaVFyLcjbXObabJczxCAW3fodQUnvuSkwzAAAA.i2p/anonymityTracker/announce.php=http://anonymityweb.i2p/anonymityTracker/"
|
||||
// , "The freak's tracker", "http://mHKva9x24E5Ygfey2llR1KyQHv5f8hhMpDMwJDg1U-hABpJ2NrQJd6azirdfaR0OKt4jDlmP2o4Qx0H598~AteyD~RJU~xcWYdcOE0dmJ2e9Y8-HY51ie0B1yD9FtIV72ZI-V3TzFDcs6nkdX9b81DwrAwwFzx0EfNvK1GLVWl59Ow85muoRTBA1q8SsZImxdyZ-TApTVlMYIQbdI4iQRwU9OmmtefrCe~ZOf4UBS9-KvNIqUL0XeBSqm0OU1jq-D10Ykg6KfqvuPnBYT1BYHFDQJXW5DdPKwcaQE4MtAdSGmj1epDoaEBUa9btQlFsM2l9Cyn1hzxqNWXELmx8dRlomQLlV4b586dRzW~fLlOPIGC13ntPXogvYvHVyEyptXkv890jC7DZNHyxZd5cyrKC36r9huKvhQAmNABT2Y~pOGwVrb~RpPwT0tBuPZ3lHYhBFYmD8y~AOhhNHKMLzea1rfwTvovBMByDdFps54gMN1mX4MbCGT4w70vIopS9yAAAA.i2p/bytemonsoon/announce.php"
|
||||
"welterde", "http://BGKmlDOoH3RzFbPRfRpZV2FjpVj8~3moFftw5-dZfDf2070TOe8Tf2~DAVeaM6ZRLdmFEt~9wyFL8YMLMoLoiwGEH6IGW6rc45tstN68KsBDWZqkTohV1q9XFgK9JnCwE~Oi89xLBHsLMTHOabowWM6dkC8nI6QqJC2JODqLPIRfOVrDdkjLwtCrsckzLybNdFmgfoqF05UITDyczPsFVaHtpF1sRggOVmdvCM66otyonlzNcJbn59PA-R808vUrCPMGU~O9Wys0i-NoqtIbtWfOKnjCRFMNw5ex4n9m5Sxm9e20UkpKG6qzEuvKZWi8vTLe1NW~CBrj~vG7I3Ok4wybUFflBFOaBabxYJLlx4xTE1zJIVxlsekmAjckB4v-cQwulFeikR4LxPQ6mCQknW2HZ4JQIq6hL9AMabxjOlYnzh7kjOfRGkck8YgeozcyTvcDUcUsOuSTk06L4kdrv8h2Cozjbloi5zl6KTbj5ZTciKCxi73Pn9grICn-HQqEAAAA.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
|
||||
// , "mastertracker", "http://VzXD~stRKbL3MOmeTn1iaCQ0CFyTmuFHiKYyo0Rd~dFPZFCYH-22rT8JD7i-C2xzYFa4jT5U2aqHzHI-Jre4HL3Ri5hFtZrLk2ax3ji7Qfb6qPnuYkuiF2E2UDmKUOppI8d9Ye7tjdhQVCy0izn55tBaB-U7UWdcvSK2i85sauyw3G0Gfads1Rvy5-CAe2paqyYATcDmGjpUNLoxbfv9KH1KmwRTNH6k1v4PyWYYnhbT39WfKMbBjSxVQRdi19cyJrULSWhjxaQfJHeWx5Z8Ev4bSPByBeQBFl2~4vqy0S5RypINsRSa3MZdbiAAyn5tr5slWR6QdoqY3qBQgBJFZppy-3iWkFqqKgSxCPundF8gdDLC5ddizl~KYcYKl42y9SGFHIukH-TZs8~em0~iahzsqWVRks3zRG~tlBcX2U3M2~OJs~C33-NKhyfZT7-XFBREvb8Szmd~p66jDxrwOnKaku-G6DyoQipJqIz4VHmY9-y5T8RrUcJcM-5lVoMpAAAA.i2p/announce.php=http://tracker.mastertracker.i2p/"
|
||||
// , "Galen", "http://5jpwQMI5FT303YwKa5Rd38PYSX04pbIKgTaKQsWbqoWjIfoancFdWCShXHLI5G5ofOb0Xu11vl2VEMyPsg1jUFYSVnu4-VfMe3y4TKTR6DTpetWrnmEK6m2UXh91J5DZJAKlgmO7UdsFlBkQfR2rY853-DfbJtQIFl91tbsmjcA5CGQi4VxMFyIkBzv-pCsuLQiZqOwWasTlnzey8GcDAPG1LDcvfflGV~6F5no9mnuisZPteZKlrv~~TDoXTj74QjByWc4EOYlwqK8sbU9aOvz~s31XzErbPTfwiawiaZ0RUI-IDrKgyvmj0neuFTWgjRGVTH8bz7cBZIc3viy6ioD-eMQOrXaQL0TCWZUelRwHRvgdPiQrxdYQs7ixkajeHzxi-Pq0EMm5Vbh3j3Q9kfUFW3JjFDA-MLB4g6XnjCbM5J1rC0oOBDCIEfhQkszru5cyLjHiZ5yeA0VThgu~c7xKHybv~OMXION7V8pBKOgET7ZgAkw1xgYe3Kkyq5syAAAA.i2p/tr/announce.php=http://galen.i2p/tr/"
|
||||
, "crstrack", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
|
||||
, "PaTracker", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
|
||||
"POSTMAN", "http://tracker2.postman.i2p/announce.php=http://tracker2.postman.i2p/"
|
||||
,"WELTERDE", "http://BGKmlDOoH3RzFbPRfRpZV2FjpVj8~3moFftw5-dZfDf2070TOe8Tf2~DAVeaM6ZRLdmFEt~9wyFL8YMLMoLoiwGEH6IGW6rc45tstN68KsBDWZqkTohV1q9XFgK9JnCwE~Oi89xLBHsLMTHOabowWM6dkC8nI6QqJC2JODqLPIRfOVrDdkjLwtCrsckzLybNdFmgfoqF05UITDyczPsFVaHtpF1sRggOVmdvCM66otyonlzNcJbn59PA-R808vUrCPMGU~O9Wys0i-NoqtIbtWfOKnjCRFMNw5ex4n9m5Sxm9e20UkpKG6qzEuvKZWi8vTLe1NW~CBrj~vG7I3Ok4wybUFflBFOaBabxYJLlx4xTE1zJIVxlsekmAjckB4v-cQwulFeikR4LxPQ6mCQknW2HZ4JQIq6hL9AMabxjOlYnzh7kjOfRGkck8YgeozcyTvcDUcUsOuSTk06L4kdrv8h2Cozjbloi5zl6KTbj5ZTciKCxi73Pn9grICn-HQqEAAAA.i2p/a=http://tracker.welterde.i2p/stats?mode=top5"
|
||||
, "CRSTRACK", "http://b4G9sCdtfvccMAXh~SaZrPqVQNyGQbhbYMbw6supq2XGzbjU4NcOmjFI0vxQ8w1L05twmkOvg5QERcX6Mi8NQrWnR0stLExu2LucUXg1aYjnggxIR8TIOGygZVIMV3STKH4UQXD--wz0BUrqaLxPhrm2Eh9Hwc8TdB6Na4ShQUq5Xm8D4elzNUVdpM~RtChEyJWuQvoGAHY3ppX-EJJLkiSr1t77neS4Lc-KofMVmgI9a2tSSpNAagBiNI6Ak9L1T0F9uxeDfEG9bBSQPNMOSUbAoEcNxtt7xOW~cNOAyMyGydwPMnrQ5kIYPY8Pd3XudEko970vE0D6gO19yoBMJpKx6Dh50DGgybLQ9CpRaynh2zPULTHxm8rneOGRcQo8D3mE7FQ92m54~SvfjXjD2TwAVGI~ae~n9HDxt8uxOecAAvjjJ3TD4XM63Q9TmB38RmGNzNLDBQMEmJFpqQU8YeuhnS54IVdUoVQFqui5SfDeLXlSkh4vYoMU66pvBfWbAAAA.i2p/tracker/announce.php=http://crstrack.i2p/tracker/"
|
||||
|
||||
};
|
||||
|
||||
/** comma delimited list of name=announceURL=baseURL for the trackers to be displayed */
|
||||
|
@ -82,8 +82,8 @@ public class I2PSnarkServlet extends HttpServlet {
|
||||
// we want it to go to the base URI so we don't refresh with some funky action= value
|
||||
out.write("<meta http-equiv=\"refresh\" content=\"60;" + req.getRequestURI() + peerString + "\">\n");
|
||||
out.write(HEADER);
|
||||
|
||||
out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=\"center\" valign=\"top\" class=\"snarkTitle\">I2PSnark<br>Anonymous BitTorrent Client for I2P<hr /></hr></td></tr>");
|
||||
out.write("</head><body>");
|
||||
out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=\"center\" valign=\"top\" class=\"snarkTitle\">I2PSnark<br>Anonymous BitTorrent Client for I2P<hr /></hr></td></tr>");
|
||||
out.write("<tr><td align=\"center\"><a href=\"" + req.getRequestURI() + peerString + "\" class=\"snarkRefresh\">Refresh</a>");
|
||||
out.write(" | <a href=\"http://forum.i2p/viewforum.php?f=21\" class=\"snarkRefresh\">Forum</a>\n");
|
||||
Map trackers = _manager.getTrackers();
|
||||
@ -98,13 +98,13 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
out.write(" | <a href=\"" + baseURL + "\" class=\"snarkRefresh\">" + name + "</a>");
|
||||
}
|
||||
out.write("</table>\n");
|
||||
out.write("<div class=\"snarkMessages\"><table><tr><td valign=\"top\" align=\"left\"><pre>");
|
||||
out.write("<div class=\"section\"><div class=\"snarkMessages\"><table><tr><td valign=\"top\" align=\"left\"><pre>");
|
||||
List msgs = _manager.getMessages();
|
||||
for (int i = msgs.size()-1; i >= 0; i--) {
|
||||
String msg = (String)msgs.get(i);
|
||||
out.write(msg + "\n");
|
||||
}
|
||||
out.write("</pre></td></tr></table></div>\n");
|
||||
out.write("</pre></td></tr></table></div>");
|
||||
|
||||
List snarks = getSortedSnarks(req);
|
||||
String uri = req.getRequestURI();
|
||||
@ -653,14 +653,14 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
|
||||
out.write("<form action=\"" + uri + "\" method=\"POST\">\n");
|
||||
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" />\n");
|
||||
out.write("<span class=\"snarkConfigTitle\">Add Torrent:</span><br />\n");
|
||||
out.write("<div class=\"section\"><span class=\"snarkConfigTitle\">Add Torrent:</span><br />\n");
|
||||
out.write("From URL : <input type=\"text\" name=\"newURL\" size=\"80\" value=\"" + newURL + "\" /> \n");
|
||||
// not supporting from file at the moment, since the file name passed isn't always absolute (so it may not resolve)
|
||||
//out.write("From file: <input type=\"file\" name=\"newFile\" size=\"50\" value=\"" + newFile + "\" /><br />\n");
|
||||
out.write("<input type=\"submit\" value=\"Add torrent\" name=\"action\" /><br />\n");
|
||||
out.write("<span class=\"snarkAddInfo\">Alternately, you can copy .torrent files to " + _manager.getDataDir().getAbsolutePath() + "<br />\n");
|
||||
out.write("Removing that .torrent file will cause the torrent to stop.<br /></span>\n");
|
||||
out.write("</form>\n</span>\n");
|
||||
out.write("</form>\n</span></div>");
|
||||
}
|
||||
|
||||
private void writeSeedForm(PrintWriter out, HttpServletRequest req) throws IOException {
|
||||
@ -669,7 +669,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
if (baseFile == null)
|
||||
baseFile = "";
|
||||
|
||||
out.write("<span class=\"snarkNewTorrent\"><hr />\n");
|
||||
out.write("<div class=\"section\"><span class=\"snarkNewTorrent\">\n");
|
||||
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
|
||||
out.write("<form action=\"" + uri + "\" method=\"POST\">\n");
|
||||
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" />\n");
|
||||
@ -693,7 +693,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
out.write("or <input type=\"text\" name=\"announceURLOther\" size=\"50\" value=\"http://\" " +
|
||||
"title=\"Custom tracker URL\" /> ");
|
||||
out.write("<input type=\"submit\" value=\"Create torrent\" name=\"action\" />\n");
|
||||
out.write("</form>\n</span>\n");
|
||||
out.write("</form>\n</span></div>");
|
||||
}
|
||||
|
||||
private void writeConfigForm(PrintWriter out, HttpServletRequest req) throws IOException {
|
||||
@ -705,7 +705,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
//int seedPct = 0;
|
||||
|
||||
out.write("<form action=\"" + uri + "\" method=\"POST\">\n");
|
||||
out.write("<span class=\"snarkConfig\"><hr />\n");
|
||||
out.write("<div class=\"section\"><span class=\"snarkConfig\">\n");
|
||||
out.write("<input type=\"hidden\" name=\"nonce\" value=\"" + _nonce + "\" />\n");
|
||||
out.write("<span class=\"snarkConfigTitle\">Configuration:</span><br />\n");
|
||||
out.write("Data directory: <input type=\"text\" size=\"40\" name=\"dataDir\" value=\"" + dataDir + "\" ");
|
||||
@ -743,7 +743,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
out.write("Announce URLs: <input type=\"text\" name=\"openTrackers\" value=\""
|
||||
+ openTrackers + "\" size=\"50\" /><br />\n");
|
||||
|
||||
//out.write("<hr />\n");
|
||||
//out.write("\n");
|
||||
out.write("EepProxy host: <input type=\"text\" name=\"eepHost\" value=\""
|
||||
+ _manager.util().getEepProxyHost() + "\" size=\"15\" /> ");
|
||||
out.write("port: <input type=\"text\" name=\"eepPort\" value=\""
|
||||
@ -764,7 +764,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
+ opts.toString() + "\" /><br />\n");
|
||||
out.write("<input type=\"submit\" value=\"Save configuration\" name=\"action\" />\n");
|
||||
out.write("</span>\n");
|
||||
out.write("</form>\n");
|
||||
out.write("</form></div>");
|
||||
}
|
||||
|
||||
// rounding makes us look faster :)
|
||||
@ -781,7 +781,7 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
|
||||
private static final String HEADER_BEGIN = "<html>\n" +
|
||||
"<head>\n" +
|
||||
"<title>I2PSnark - anonymous bittorrent</title>\n";
|
||||
"<title>I2PSnark - Anonymous BitTorrent Client</title>\n";
|
||||
|
||||
private static final String HEADER = "<link href=\"../themes/console/snark.css\" rel=\"stylesheet\" type=\"text/css\" />";
|
||||
|
||||
@ -800,11 +800,11 @@ out.write("<div class=\"page\"><table border=\"0\" width=\"100%\"><tr><td align=
|
||||
|
||||
private static final String TABLE_EMPTY = "<tr class=\"snarkTorrentEven\">" +
|
||||
"<td class=\"snarkTorrentEven\" align=\"center\"" +
|
||||
" valign=\"top\" colspan=\"8\"><i>No torrents</i></td></tr>\n";
|
||||
" valign=\"top\" colspan=\"8\"><i>No torrents loaded.</i></td></tr>\n";
|
||||
|
||||
private static final String TABLE_FOOTER = "</table>\n";
|
||||
private static final String TABLE_FOOTER = "</table></div>\n";
|
||||
|
||||
private static final String FOOTER = "</div></div></body></html>";
|
||||
private static final String FOOTER = "</div></div></div></body></html>";
|
||||
|
||||
/** inner class, don't bother reindenting */
|
||||
private static class FetchAndAdd implements Runnable {
|
||||
|
@ -1,93 +0,0 @@
|
||||
body {
|
||||
background-color: #eef;
|
||||
color:#001;
|
||||
font-family:"Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.snarkTitle {
|
||||
text-align: left;
|
||||
float: left;
|
||||
margin: 0px 0px 5px 5px;
|
||||
display: inline;
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
.snarkRefresh {
|
||||
font-size: 10pt;
|
||||
}
|
||||
.snarkMessages {
|
||||
border: none;
|
||||
background-color: #ddf;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
font-weight: 100;
|
||||
width: 100%;
|
||||
text-align: left;
|
||||
margin: 0px 0px 15px 15px;
|
||||
border: 0px;
|
||||
padding: 5px;
|
||||
border-width: 0px;
|
||||
border-spacing: 0px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #001;
|
||||
}
|
||||
table {
|
||||
margin: 0px 0px 0px 0px;
|
||||
border: 0px;
|
||||
padding: 0px;
|
||||
border-width: 0px;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
th {
|
||||
background-color: #C7D5D5;
|
||||
padding: 5px;
|
||||
font-size: 9pt;
|
||||
}
|
||||
td {
|
||||
padding: 5px;
|
||||
}
|
||||
.snarkTorrentEven {
|
||||
background-color: #E7E7E7;
|
||||
}
|
||||
.snarkTorrentOdd {
|
||||
background-color: #DDDDCC;
|
||||
}
|
||||
.snarkNewTorrent {
|
||||
font-size: 10pt;
|
||||
}
|
||||
.snarkAddInfo {
|
||||
font-size: 10pt;
|
||||
line-height: 130% !important;
|
||||
}
|
||||
.snarkConfigTitle {
|
||||
font-size: 11pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
.snarkConfig {
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.page {
|
||||
background-color: #fff;
|
||||
color:#001;
|
||||
margin: 20px;
|
||||
padding: 20px 20px 0 20px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #001;
|
||||
font-size: 9pt !important;
|
||||
line-height: 160% !important;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #002;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
form {
|
||||
line-height: 300%
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 150%
|
||||
}
|
@ -75,19 +75,20 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
out.getQuantity() + out.getBackupQuantity() >= WARN_QUANTITY)
|
||||
buf.append("<tr><th colspan=\"3\"><font color=\"red\">PERFORMANCE WARNING - Settings include high tunnel quantities</font></th></tr>");
|
||||
|
||||
buf.append("<tr><th></th><th><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound Tunnels\"/> Inbound</th><th><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound Tunnels\" title=\"Outbound\"/> Outbound</th></tr>\n");
|
||||
|
||||
buf.append("<tr><th></th><th>Inbound</th><th>Outbound</th></tr>\n");
|
||||
// buf.append("<tr><th></th><th>Inbound</th><th>Outbound</th></tr>\n");
|
||||
|
||||
// tunnel depth
|
||||
buf.append("<tr><td>Depth</td>\n");
|
||||
buf.append("<td><select name=\"").append(index).append(".depthInbound\">\n");
|
||||
buf.append("<tr><td align=\"right\">Depth</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".depthInbound\">\n");
|
||||
int now = in.getLength();
|
||||
renderOptions(buf, 0, MAX_LENGTH, now, "", "hop");
|
||||
if (now > MAX_LENGTH)
|
||||
renderOptions(buf, now, now, now, "", "hop");
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
buf.append("<td><select name=\"").append(index).append(".depthOutbound\">\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".depthOutbound\">\n");
|
||||
now = out.getLength();
|
||||
renderOptions(buf, 0, MAX_LENGTH, now, "", "hop");
|
||||
if (now > MAX_LENGTH)
|
||||
@ -96,8 +97,8 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// tunnel depth variance
|
||||
buf.append("<tr><td>Randomization</td>\n");
|
||||
buf.append("<td><select name=\"").append(index).append(".varianceInbound\">\n");
|
||||
buf.append("<tr><td align=\"right\">Randomization</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".varianceInbound\">\n");
|
||||
now = in.getLengthVariance();
|
||||
renderOptions(buf, 0, 0, now, "", "hop");
|
||||
renderOptions(buf, 1, MAX_VARIANCE, now, "+ 0-", "hop");
|
||||
@ -108,7 +109,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
renderOptions(buf, now, now, now, "+/- 0", "hop");
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
buf.append("<td><select name=\"").append(index).append(".varianceOutbound\">\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".varianceOutbound\">\n");
|
||||
now = out.getLengthVariance();
|
||||
renderOptions(buf, 0, 0, now, "", "hop");
|
||||
renderOptions(buf, 1, MAX_VARIANCE, now, "+ 0-", "hop");
|
||||
@ -120,15 +121,15 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
// tunnel quantity
|
||||
buf.append("<tr><td>Quantity</td>\n");
|
||||
buf.append("<td><select name=\"").append(index).append(".quantityInbound\">\n");
|
||||
buf.append("<tr><td align=\"right\">Quantity</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".quantityInbound\">\n");
|
||||
now = in.getQuantity();
|
||||
renderOptions(buf, 1, MAX_QUANTITY, now, "", "tunnel");
|
||||
if (now > MAX_QUANTITY)
|
||||
renderOptions(buf, now, now, now, "", "tunnel");
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
buf.append("<td><select name=\"").append(index).append(".quantityOutbound\">\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".quantityOutbound\">\n");
|
||||
now = out.getQuantity();
|
||||
renderOptions(buf, 1, MAX_QUANTITY, now, "", "tunnel");
|
||||
if (now > MAX_QUANTITY)
|
||||
@ -137,15 +138,15 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// tunnel backup quantity
|
||||
buf.append("<tr><td>Backup quantity</td>\n");
|
||||
buf.append("<td><select name=\"").append(index).append(".backupInbound\">\n");
|
||||
buf.append("<tr><td align=\"right\">Backup quantity</td>\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".backupInbound\">\n");
|
||||
now = in.getBackupQuantity();
|
||||
renderOptions(buf, 0, MAX_BACKUP_QUANTITY, now, "", "tunnel");
|
||||
if (now > MAX_BACKUP_QUANTITY)
|
||||
renderOptions(buf, now, now, now, "", "tunnel");
|
||||
buf.append("</select></td>\n");
|
||||
|
||||
buf.append("<td><select name=\"").append(index).append(".backupOutbound\">\n");
|
||||
buf.append("<td align=\"center\"><select name=\"").append(index).append(".backupOutbound\">\n");
|
||||
now = out.getBackupQuantity();
|
||||
renderOptions(buf, 0, MAX_BACKUP_QUANTITY, now, "", "tunnel");
|
||||
if (now > MAX_BACKUP_QUANTITY)
|
||||
@ -154,9 +155,9 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append("</tr>\n");
|
||||
|
||||
// custom options
|
||||
buf.append("<tr><td>Inbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\"><input name=\"").append(index);
|
||||
buf.append(".inboundOptions\" type=\"text\" size=\"40\" ");
|
||||
buf.append("<tr><td align=\"right\">Inbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
|
||||
buf.append(".inboundOptions\" type=\"text\" size=\"32\" ");
|
||||
buf.append("value=\"");
|
||||
Properties props = in.getUnknownOptions();
|
||||
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
|
||||
@ -165,9 +166,9 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append(prop).append("=").append(val).append(" ");
|
||||
}
|
||||
buf.append("\"/></td></tr>\n");
|
||||
buf.append("<tr><td>Outbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\"><input name=\"").append(index);
|
||||
buf.append(".outboundOptions\" type=\"text\" size=\"40\" ");
|
||||
buf.append("<tr><td align=\"right\">Outbound options:</td>\n");
|
||||
buf.append("<td colspan=\"2\" align=\"center\"><input name=\"").append(index);
|
||||
buf.append(".outboundOptions\" type=\"text\" size=\"32\" ");
|
||||
buf.append("value=\"");
|
||||
props = in.getUnknownOptions();
|
||||
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
|
||||
@ -176,7 +177,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
buf.append(prop).append("=").append(val).append(" ");
|
||||
}
|
||||
buf.append("\"/></td></tr>\n");
|
||||
buf.append("<tr><td colspan=\"3\"><hr /></td></tr>\n");
|
||||
// buf.append("<tr><td colspan=\"3\"><hr /></td></tr>\n");
|
||||
}
|
||||
|
||||
private void renderOptions(StringBuilder buf, int min, int max, int now, String prefix, String name) {
|
||||
|
@ -38,7 +38,8 @@
|
||||
<input type="submit" name="shouldsave" value="Apply" /> <input type="reset" value="Cancel" />
|
||||
</form>
|
||||
<% } else { %>
|
||||
Theme selection disabled for Internet Explorer, sorry.
|
||||
Theme selection disabled for Internet Explorer, sorry.<hr>If you're not using IE, it's likely that
|
||||
your browser is pretending to be IE; please configure your browser (or proxy) to use a different User Agent string if you'd like to access the console themes.
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -28,8 +28,8 @@
|
||||
<u><b>I2P Services</b></u><br />
|
||||
<a href="susimail/susimail" target="blank">Susimail</a>
|
||||
<a href="susidns/index.jsp" target="_blank">SusiDNS</a>
|
||||
<a href="i2psnark/" target="_blank">I2PSnark</a>
|
||||
<a href="http://127.0.0.1:7658/" target="_blank">Eepsite</a><hr />
|
||||
<a href="i2psnark/" target="_blank">Torrents</a>
|
||||
<a href="http://127.0.0.1:7658/" target="_blank">Webserver</a><hr />
|
||||
<u><b>I2P Internals</b></u><br />
|
||||
<a href="i2ptunnel/index.jsp" target="_blank">I2PTunnel</a>
|
||||
<a href="tunnels.jsp" target="_top">Tunnels</a>
|
||||
|
@ -49,13 +49,14 @@ div.routersummaryouter {
|
||||
|
||||
div.routersummary {
|
||||
background: #fafaff;
|
||||
width: 200px;
|
||||
width: 175px;
|
||||
color: inherit;
|
||||
margin: 0em;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
border: medium solid #efefff;
|
||||
font-size: 0.82em;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.warning {
|
||||
|
@ -115,6 +115,7 @@ div.warning {
|
||||
background-position:15px center;
|
||||
background-repeat:no-repeat;
|
||||
-moz-box-shadow: inset 0px 0px 0px 1px #f00;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.main {
|
||||
@ -153,6 +154,7 @@ div.news li {
|
||||
margin: 0 10px 0 30px;
|
||||
padding: 5px;
|
||||
vertical-align: middle;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.confignav {
|
||||
@ -170,7 +172,7 @@ div.confignav {
|
||||
}
|
||||
|
||||
div.configure {
|
||||
padding: 0 15px;
|
||||
padding: 0 15px 15px 15px;
|
||||
margin: 10px 0px;
|
||||
background: #005;
|
||||
-moz-border-radius: 4px;
|
||||
@ -220,7 +222,7 @@ table {
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 4px;
|
||||
padding: 8px;
|
||||
color: #eef;
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
@ -240,17 +242,16 @@ tr:nth-child(odd) {
|
||||
background: #003 url('images/darkbluetile.png') !important;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
tr:last-child {
|
||||
background: #004 url('images/lightbluetile.png') !important;
|
||||
font-weight: bold;
|
||||
border: 1px solid #99f !important;
|
||||
}
|
||||
|
||||
*/
|
||||
td {
|
||||
padding: 5px 10px;
|
||||
color: #eef;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@ -266,6 +267,7 @@ div.main li {
|
||||
margin: 2px 0px 2px 30px;
|
||||
padding: 1px 20px 1px 0px;
|
||||
line-height: 150%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.tidylist {
|
||||
@ -291,6 +293,9 @@ code {
|
||||
|
||||
a:link, h2 a:link{
|
||||
color: #99f;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
a:visited{
|
||||
@ -349,6 +354,7 @@ h2 {
|
||||
vertical-align: middle;
|
||||
margin: 25px 0 20px 0 !important;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #eef;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h2 a:visited {
|
||||
@ -441,6 +447,7 @@ input {
|
||||
padding: 1px 2px;
|
||||
text-decoration: none;
|
||||
min-width: 110px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
input:hover {
|
||||
|
BIN
installer/resources/themes/console/images/inbound.png
Normal file
BIN
installer/resources/themes/console/images/inbound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 587 B |
BIN
installer/resources/themes/console/images/outbound.png
Normal file
BIN
installer/resources/themes/console/images/outbound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 577 B |
@ -35,7 +35,7 @@ div.logo {
|
||||
border-radius: 4px;
|
||||
background: #ddddff url('images/lightbluetile.png');
|
||||
width: 175px;
|
||||
-moz-box-shadow: inset 0px 0px 16px 1px #eef;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #002;
|
||||
}
|
||||
|
||||
div.toolbar {
|
||||
@ -86,18 +86,20 @@ div.routersummaryouter {
|
||||
|
||||
div.routersummary {
|
||||
/* margin: 0px 20px 20px 0px; */
|
||||
width: auto;
|
||||
width: 175px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
border: 1px solid #000033;
|
||||
background: #ddddff url('images/lightbluetile.png');
|
||||
background: #ddf url('images/lightbluetile.png');
|
||||
color: #000;
|
||||
font-size: 8pt;
|
||||
clear: left;/* fixes a bug in Opera */
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
/*
|
||||
float: left;
|
||||
*/
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #002;
|
||||
}
|
||||
|
||||
@ -116,6 +118,7 @@ div.warning {
|
||||
background-position:15px center;
|
||||
background-repeat:no-repeat;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #d00;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
div.main {
|
||||
@ -214,7 +217,7 @@ div.confignav {
|
||||
}
|
||||
|
||||
div.configure {
|
||||
padding: 0 15px !important;
|
||||
padding: 0 15px 15px 15px !important;
|
||||
margin: 10px 0px 25px 0;
|
||||
background: #ddf url('images/lightbluetile.png');
|
||||
-moz-border-radius: 4px;
|
||||
@ -265,11 +268,11 @@ table {
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 4px;
|
||||
padding: 8px;
|
||||
color: #000;
|
||||
background: #b4c8ff url('images/tabletitlelight.png') repeat-x;
|
||||
text-align: center;
|
||||
font-size: 8pt;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
tr {
|
||||
@ -293,7 +296,7 @@ tr:last-child {
|
||||
td {
|
||||
padding: 5px;
|
||||
color: #000;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
tt {
|
||||
@ -308,6 +311,7 @@ div.main li {
|
||||
margin: 2px 5px 0px 20px;
|
||||
padding: 1px 20px 1px 10px;
|
||||
line-height: 150%;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.tidylist {
|
||||
@ -338,6 +342,7 @@ a:link{
|
||||
color: #007;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
a:visited{
|
||||
@ -395,6 +400,7 @@ h2 {
|
||||
-khtml-border-radius: 4px;
|
||||
margin: 25px 0 20px 0 !important;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #002;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
h2 a:hover {
|
||||
@ -471,25 +477,28 @@ button:active{
|
||||
|
||||
input {
|
||||
background: #eef;
|
||||
color: #003;
|
||||
color: #001;
|
||||
margin: 5px 10px 5px 10px;
|
||||
padding: 4px 2px;
|
||||
font: bold 8pt "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif;
|
||||
border: 1px solid #001;
|
||||
text-decoration: none;
|
||||
min-width: 110px;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
input:hover {
|
||||
background: #f60;
|
||||
color: #fff;
|
||||
border: 1px solid #f60;
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
input:active {
|
||||
background: #002;
|
||||
color: #f60;
|
||||
border: 1px solid #f60;
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
submit {
|
||||
|
@ -5,19 +5,8 @@ body {
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
/*
|
||||
.snarkTitle {
|
||||
text-align: left;
|
||||
float: left;
|
||||
margin: 0px 0px 5px 5px;
|
||||
display: inline;
|
||||
font-size: 16pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
*/
|
||||
|
||||
.snarkTitle {
|
||||
font-size: 16pt;
|
||||
font-size: 12pt;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
}
|
||||
@ -27,23 +16,27 @@ body {
|
||||
}
|
||||
|
||||
.snarkMessages {
|
||||
border: none;
|
||||
background-color: #9f9;
|
||||
font-family: monospace;
|
||||
font-size: 10pt;
|
||||
background-color: #fe9;
|
||||
font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono !important;
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
/* width: 100%; */
|
||||
text-align: left;
|
||||
margin: 0 0 15px 0;
|
||||
border: 0px;
|
||||
padding: 5px;
|
||||
border-width: 0px;
|
||||
border-spacing: 0px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border: 2px inset #770;
|
||||
overflow-x: scroll;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: "Lucida Console", "DejaVu Sans Mono", Courier, mono !important;
|
||||
width: 100%;
|
||||
font-size: 8pt;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
@ -54,19 +47,25 @@ table {
|
||||
border-spacing: 0px;
|
||||
}
|
||||
th {
|
||||
background-color: #C7D5D5;
|
||||
background-color: #f91;
|
||||
padding: 5px;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.SnarkTorrents {
|
||||
margin: 0;
|
||||
border: 1px solid #001;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 5px;
|
||||
}
|
||||
.snarkTorrentEven {
|
||||
background-color: #bbf;
|
||||
background-color: #fb1;
|
||||
font-size: 8pt;
|
||||
}
|
||||
.snarkTorrentOdd {
|
||||
background-color: #ddf;
|
||||
background-color: #fa1;
|
||||
font-size: 8pt;
|
||||
}
|
||||
.snarkNewTorrent {
|
||||
@ -83,14 +82,14 @@ td {
|
||||
}
|
||||
|
||||
.snarkConfig {
|
||||
font-size: 10pt;
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.page {
|
||||
background-color: #fff;
|
||||
color:#001;
|
||||
margin: 20px;
|
||||
padding: 20px 20px 0 20px;
|
||||
padding: 0 20px 5px 20px;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
@ -102,7 +101,7 @@ td {
|
||||
}
|
||||
|
||||
form {
|
||||
line-height: 300%
|
||||
line-height: 250%
|
||||
}
|
||||
|
||||
p {
|
||||
@ -111,4 +110,27 @@ p {
|
||||
|
||||
a:link {
|
||||
padding 5px;
|
||||
}
|
||||
|
||||
hr {
|
||||
color: #003;
|
||||
background: #003;
|
||||
height: 1px;
|
||||
border: 0px solid #003;
|
||||
margin: 5px 0;
|
||||
}
|
||||
|
||||
div.section {
|
||||
margin: 20px 0 0 0;
|
||||
padding: 10px;
|
||||
background: #ffe;
|
||||
border: 1px solid #001;
|
||||
text-align: left;
|
||||
color: #001;
|
||||
-moz-border-radius: 4px;
|
||||
-khtml-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
-moz-box-shadow: inset 0px 0px 1px 0px #002;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
@ -455,46 +455,47 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
}
|
||||
out.write("<tr>");
|
||||
if (cfg.getReceiveTunnel() != null)
|
||||
out.write("<td>" + cfg.getReceiveTunnel().getTunnelId() +"</td>");
|
||||
out.write("<td align=\"center\">" + cfg.getReceiveTunnel().getTunnelId() +"</td>");
|
||||
else
|
||||
out.write("<td>n/a</td>");
|
||||
out.write("<td align=\"center\">n/a</td>");
|
||||
if (cfg.getReceiveFrom() != null)
|
||||
out.write("<td align=\"right\">" + netDbLink(cfg.getReceiveFrom()) +"</td>");
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
out.write("<td align=\"center\"> </td>");
|
||||
if (cfg.getSendTunnel() != null)
|
||||
out.write("<td>" + cfg.getSendTunnel().getTunnelId() +"</td>");
|
||||
out.write("<td align=\"center\">" + cfg.getSendTunnel().getTunnelId() +"</td>");
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
out.write("<td align=\"center\"> </td>");
|
||||
if (cfg.getSendTo() != null)
|
||||
out.write("<td align=\"right\">" + netDbLink(cfg.getSendTo()) +"</td>");
|
||||
out.write("<td align=\"center\">" + netDbLink(cfg.getSendTo()) +"</td>");
|
||||
else
|
||||
out.write("<td> </td>");
|
||||
// out.write("<td align=\"center\"> </td>");
|
||||
out.write("<td align=\"center\"> </td>");
|
||||
long timeLeft = cfg.getExpiration()-_context.clock().now();
|
||||
if (timeLeft > 0)
|
||||
out.write("<td align=right>" + DataHelper.formatDuration(timeLeft) + "</td>");
|
||||
out.write("<td align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>");
|
||||
else
|
||||
out.write("<td align=right>(grace period)</td>");
|
||||
out.write("<td align=right>" + cfg.getProcessedMessagesCount() + "KB</td>");
|
||||
out.write("<td align=\"center\">(grace period)</td>");
|
||||
out.write("<td align=\"center\">" + cfg.getProcessedMessagesCount() + "KB</td>");
|
||||
int lifetime = (int) ((_context.clock().now() - cfg.getCreation()) / 1000);
|
||||
if (lifetime <= 0)
|
||||
lifetime = 1;
|
||||
if (lifetime > 10*60)
|
||||
lifetime = 10*60;
|
||||
int bps = 1024 * (int) cfg.getProcessedMessagesCount() / lifetime;
|
||||
out.write("<td align=right>" + bps + "Bps</td>");
|
||||
out.write("<td align=\"center\">" + bps + "Bps</td>");
|
||||
if (cfg.getSendTo() == null)
|
||||
out.write("<td>Outbound Endpoint</td>");
|
||||
out.write("<td align=\"center\">Outbound Endpoint</td>");
|
||||
else if (cfg.getReceiveFrom() == null)
|
||||
out.write("<td>Inbound Gateway</td>");
|
||||
out.write("<td align=\"center\">Inbound Gateway</td>");
|
||||
else
|
||||
out.write("<td>Participant</td>");
|
||||
out.write("<td align=\"center\">Participant</td>");
|
||||
out.write("</tr>\n");
|
||||
processed += cfg.getProcessedMessagesCount();
|
||||
}
|
||||
out.write("</table>\n");
|
||||
out.write("Inactive participating tunnels: " + inactive + "<br />\n");
|
||||
out.write("Lifetime bandwidth usage: " + DataHelper.formatSize(processed*1024) + "B<br />\n");
|
||||
out.write("<center>Inactive participating tunnels: " + inactive + "<br />\n");
|
||||
out.write("Lifetime bandwidth usage: " + DataHelper.formatSize(processed*1024) + "B</center><br />\n");
|
||||
renderPeers(out);
|
||||
}
|
||||
|
||||
@ -542,23 +543,23 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
continue; // don't display tunnels in their grace period
|
||||
live++;
|
||||
if (info.isInbound())
|
||||
out.write("<tr><td><b>inbound</b></td>");
|
||||
out.write("<tr><td align=\"center\"><img src=\"/themes/console/images/inbound.png\" alt=\"Inbound\" title=\"Inbound\"/></td>");
|
||||
else
|
||||
out.write("<tr><td><b>outbound</b></td>");
|
||||
out.write("<td align=right>" + DataHelper.formatDuration(timeLeft) + "</td>\n");
|
||||
out.write("<td align=right>" + info.getProcessedMessagesCount() + "KB</td>\n");
|
||||
out.write("<tr><td align=\"center\"><img src=\"/themes/console/images/outbound.png\" alt=\"Outbound\" title=\"Outbound\"/></td>");
|
||||
out.write("<td align=\"center\">" + DataHelper.formatDuration(timeLeft) + "</td>\n");
|
||||
out.write("<td align=\"center\">" + info.getProcessedMessagesCount() + "KB</td>\n");
|
||||
for (int j = 0; j < info.getLength(); j++) {
|
||||
Hash peer = info.getPeer(j);
|
||||
TunnelId id = (info.isInbound() ? info.getReceiveTunnelId(j) : info.getSendTunnelId(j));
|
||||
if (_context.routerHash().equals(peer)) {
|
||||
out.write("<td>" + (id == null ? "" : "" + id) + "</td>");
|
||||
out.write("<td align=\"center\">" + (id == null ? "" : "" + id) + "</td>");
|
||||
} else {
|
||||
String cap = getCapacity(peer);
|
||||
out.write("<td>" + netDbLink(peer) + (id == null ? "" : " " + id) + cap + "</td>");
|
||||
out.write("<td align=\"center\">" + netDbLink(peer) + (id == null ? "" : " " + id) + cap + "</td>");
|
||||
}
|
||||
if (info.getLength() < maxLength && (info.getLength() == 1 || j == info.getLength() - 2)) {
|
||||
for (int k = info.getLength(); k < maxLength; k++)
|
||||
out.write("<td> </td>");
|
||||
out.write("<td align=\"center\"> </td>");
|
||||
}
|
||||
}
|
||||
out.write("</tr>\n");
|
||||
@ -572,19 +573,19 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
if (in != null) {
|
||||
List pending = in.listPending();
|
||||
if (pending.size() > 0)
|
||||
out.write("Build in progress: " + pending.size() + " inbound<br />\n");
|
||||
out.write("<center>Build in progress: " + pending.size() + " inbound</center><br />\n");
|
||||
live += pending.size();
|
||||
}
|
||||
if (outPool != null) {
|
||||
List pending = outPool.listPending();
|
||||
if (pending.size() > 0)
|
||||
out.write("Build in progress: " + pending.size() + " outbound<br />\n");
|
||||
out.write("<center>Build in progress: " + pending.size() + " outbound</center><br />\n");
|
||||
live += pending.size();
|
||||
}
|
||||
if (live <= 0)
|
||||
out.write("<b>No tunnels, waiting for the grace period to end</b><br />\n");
|
||||
out.write("Lifetime bandwidth usage: " + DataHelper.formatSize(processedIn*1024) + "B in, " +
|
||||
DataHelper.formatSize(processedOut*1024) + "B out<br />");
|
||||
out.write("<b><center>No tunnels, waiting for the grace period to end.</center></b><br />\n");
|
||||
out.write("<center>Lifetime bandwidth usage: " + DataHelper.formatSize(processedIn*1024) + "B in, " +
|
||||
DataHelper.formatSize(processedOut*1024) + "B out</center><br />");
|
||||
}
|
||||
|
||||
private void renderPeers(Writer out) throws IOException {
|
||||
@ -604,25 +605,25 @@ public class TunnelPoolManager implements TunnelManagerFacade {
|
||||
out.write("<h2><a name=\"peers\"></a>Tunnel Counts By Peer:</h2>\n");
|
||||
out.write("<table border=\"1\"><tr><th>Peer</th><th>Expl. + Client</th><th>% of total</th><th>Part. from + to</th><th>% of total</th></tr>\n");
|
||||
for (Hash h : peerList) {
|
||||
out.write("<tr><td align=\"right\">");
|
||||
out.write("<tr><td align=\"center\">");
|
||||
out.write(netDbLink(h));
|
||||
out.write("<td align=\"right\">" + lc.count(h));
|
||||
out.write("<td align=\"right\">");
|
||||
out.write("<td align=\"center\">" + lc.count(h));
|
||||
out.write("<td align=\"center\">");
|
||||
if (tunnelCount > 0)
|
||||
out.write("" + (lc.count(h) * 100 / tunnelCount));
|
||||
else
|
||||
out.write('0');
|
||||
out.write("<td align=\"right\">" + pc.count(h));
|
||||
out.write("<td align=\"right\">");
|
||||
out.write("<td align=\"center\">" + pc.count(h));
|
||||
out.write("<td align=\"center\">");
|
||||
if (partCount > 0)
|
||||
out.write("" + (pc.count(h) * 100 / partCount));
|
||||
else
|
||||
out.write('0');
|
||||
out.write('\n');
|
||||
}
|
||||
out.write("<tr><td>Tunnels<td align=\"right\">" + tunnelCount);
|
||||
out.write("<td> <td align=\"right\">" + partCount);
|
||||
out.write("<td> </table>\n");
|
||||
out.write("<tr><td align=\"center\"><b>Tunnels</b><td align=\"center\"><b>" + tunnelCount);
|
||||
out.write("</b><td align=\"center\"> <td align=\"center\"><b>" + partCount);
|
||||
out.write("<td align=\"center\"> </b></table>\n");
|
||||
}
|
||||
|
||||
/** @return total number of non-fallback expl. + client tunnels */
|
||||
|
Reference in New Issue
Block a user