forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head 198dad192e830f3eaf568af10f308bc98795470e)
to branch 'i2p.i2p.str4d.ui' (head 24039fce2eef425a63521138774a182aa07fec9f)
This commit is contained in:
@ -1014,7 +1014,7 @@ public class SnarkManager implements CompleteListener {
|
||||
if (theme != null) {
|
||||
if(!theme.equals(_config.getProperty(PROP_THEME))) {
|
||||
_config.setProperty(PROP_THEME, theme);
|
||||
addMessage(_t("{0} theme loaded, return to main i2psnark page to view.", theme));
|
||||
addMessage(_t("{0} theme loaded.", theme));
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ class DHTNodes {
|
||||
* @since 0.9.4
|
||||
*/
|
||||
public void renderStatusHTML(StringBuilder buf) {
|
||||
buf.append(_kad.toString().replace("\n", "<br>\n"));
|
||||
buf.append(_kad.toString().replace("\n", "<br><hr class=\"debug\">\n"));
|
||||
}
|
||||
|
||||
/** */
|
||||
|
@ -679,7 +679,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
|
||||
public String renderStatusHTML() {
|
||||
long uptime = Math.max(1000, _context.clock().now() - _started);
|
||||
StringBuilder buf = new StringBuilder(256);
|
||||
buf.append("<br><b>DHT DEBUG</b><br>TX: ").append(_txPkts.get()).append(" pkts / ")
|
||||
buf.append("<br><hr class=\"debug\"><b>DHT DEBUG</b><br><hr class=\"debug\">TX: ").append(_txPkts.get()).append(" pkts / ")
|
||||
.append(DataHelper.formatSize2(_txBytes.get())).append("B / ")
|
||||
.append(DataHelper.formatSize2(_txBytes.get() * 1000 / uptime)).append("Bps<br>" +
|
||||
"RX: ").append(_rxPkts.get()).append(" pkts / ")
|
||||
@ -689,7 +689,7 @@ public class KRPC implements I2PSessionMuxedListener, DHT {
|
||||
"Blacklisted: ").append(_blacklist.size()).append("<br>" +
|
||||
"Sent tokens: ").append(_outgoingTokens.size()).append("<br>" +
|
||||
"Rcvd tokens: ").append(_incomingTokens.size()).append("<br>" +
|
||||
"Pending queries: ").append(_sentQueries.size()).append("<br>");
|
||||
"Pending queries: ").append(_sentQueries.size()).append("<br><hr>");
|
||||
_tracker.renderStatusHTML(buf);
|
||||
_knownNodes.renderStatusHTML(buf);
|
||||
return buf.toString();
|
||||
|
@ -497,7 +497,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
: tx));
|
||||
if (showSort)
|
||||
out.write("</a>");
|
||||
out.write("</th>\n<th align=\"center\">");
|
||||
out.write("</th>\n<th id=\"pagenav\" align=\"center\">");
|
||||
if (total > 0 && (start > 0 || total > pageSize)) {
|
||||
writePageNav(out, req, start, pageSize, total, noThinsp);
|
||||
}
|
||||
@ -823,7 +823,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write("<a href=\"" + _contextPath);
|
||||
out.write(getQueryString(req, null, "", null));
|
||||
out.write("\">");
|
||||
out.write(toThemeImg("control_rewind_blue", _t("First"), _t("First page")));
|
||||
out.write(toThemeImg("first", _t("First"), _t("First page")));
|
||||
out.write("</a> ");
|
||||
int prev = Math.max(0, start - pageSize);
|
||||
//if (prev > 0) {
|
||||
@ -833,16 +833,16 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
String sprev = (prev > 0) ? Integer.toString(prev) : "";
|
||||
out.write(getQueryString(req, null, sprev, null));
|
||||
out.write("\">");
|
||||
out.write(toThemeImg("control_back_blue", _t("Prev"), _t("Previous page")));
|
||||
out.write(toThemeImg("previous", _t("Prev"), _t("Previous page")));
|
||||
out.write("</a> ");
|
||||
}
|
||||
} else {
|
||||
out.write(
|
||||
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
|
||||
_imgPath + "control_rewind_blue.png\">" +
|
||||
_imgPath + "first.png\">" +
|
||||
" " +
|
||||
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
|
||||
_imgPath + "control_back_blue.png\">" +
|
||||
_imgPath + "previous.png\">" +
|
||||
" ");
|
||||
}
|
||||
// Page count
|
||||
@ -866,7 +866,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write(" <a href=\"" + _contextPath);
|
||||
out.write(getQueryString(req, null, Integer.toString(next), null));
|
||||
out.write("\">");
|
||||
out.write(toThemeImg("control_play_blue", _t("Next"), _t("Next page")));
|
||||
out.write(toThemeImg("next", _t("Next"), _t("Next page")));
|
||||
out.write("</a> ");
|
||||
}
|
||||
// Last
|
||||
@ -874,15 +874,15 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write(" <a href=\"" + _contextPath);
|
||||
out.write(getQueryString(req, null, Integer.toString(last), null));
|
||||
out.write("\">");
|
||||
out.write(toThemeImg("control_fastforward_blue", _t("Last"), _t("Last page")));
|
||||
out.write(toThemeImg("last", _t("Last"), _t("Last page")));
|
||||
out.write("</a> ");
|
||||
} else {
|
||||
out.write(" " +
|
||||
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
|
||||
_imgPath + "control_play_blue.png\">" +
|
||||
_imgPath + "next.png\">" +
|
||||
" " +
|
||||
"<img alt=\"\" border=\"0\" class=\"disable\" src=\"" +
|
||||
_imgPath + "control_fastforward_blue.png\">");
|
||||
_imgPath + "last.png\">");
|
||||
}
|
||||
}
|
||||
|
||||
@ -2064,14 +2064,14 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write(":<td><input type=\"text\" name=\"nofilter_newURL\" size=\"85\" value=\"" + newURL + "\" spellcheck=\"false\"");
|
||||
out.write(" title=\"");
|
||||
out.write(_t("Enter the torrent file download URL (I2P only), magnet link, maggot link, or info hash"));
|
||||
out.write("\"> \n");
|
||||
out.write("\">\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>");
|
||||
out.write("<input type=\"submit\" class=\"add\" value=\"");
|
||||
out.write(_t("Add torrent"));
|
||||
out.write("\" name=\"foo\" ><br>\n" +
|
||||
|
||||
"<tr><td>");
|
||||
|
||||
out.write(_t("Data dir"));
|
||||
out.write(":<td><input type=\"text\" name=\"nofilter_newDir\" size=\"85\" value=\"\" spellcheck=\"false\"");
|
||||
out.write(" title=\"");
|
||||
@ -2085,7 +2085,7 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write("<br></span></table>\n");
|
||||
out.write("</div></form></div>");
|
||||
}
|
||||
|
||||
|
||||
private void writeSeedForm(PrintWriter out, HttpServletRequest req, List<Tracker> sortedTrackers) throws IOException {
|
||||
out.write("<a name=\"add\"></a><div class=\"newtorrentsection\"><div class=\"snarkNewTorrent\">\n");
|
||||
// *not* enctype="multipart/form-data", so that the input type=file sends the filename, not the file
|
||||
@ -2103,20 +2103,23 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
+ "\" spellcheck=\"false\" title=\"");
|
||||
out.write(_t("File or directory to seed (full path or within the directory {0} )",
|
||||
_manager.getDataDir().getAbsolutePath() + File.separatorChar));
|
||||
out.write("\" ><tr><td>\n");
|
||||
out.write("\" > <input type=\"submit\" class=\"create\" value=\"");
|
||||
out.write(_t("Create torrent"));
|
||||
out.write("\" name=\"foo\" >");
|
||||
out.write("<tr><td>\n");
|
||||
out.write(_t("Trackers"));
|
||||
out.write(":<td><table style=\"width: 30%;\"><tr><td></td><td align=\"center\">");
|
||||
out.write(":<td><table id=\"trackerselect\" style=\"width: 30%;\"><tr><td></td><td align=\"center\">");
|
||||
out.write(_t("Primary"));
|
||||
out.write("</td><td align=\"center\">");
|
||||
out.write(_t("Alternates"));
|
||||
out.write("</td><td rowspan=\"0\">" +
|
||||
" <input type=\"submit\" class=\"create\" value=\"");
|
||||
out.write(_t("Create torrent"));
|
||||
out.write("\" name=\"foo\" >" +
|
||||
"</td></tr>\n");
|
||||
out.write("</td><td>");
|
||||
out.write(_t("Tracker URL"));
|
||||
out.write("</td></tr>\n");
|
||||
|
||||
for (Tracker t : sortedTrackers) {
|
||||
String name = t.name;
|
||||
String announceURL = t.announceURL.replace("=", "=");
|
||||
String homeURL = t.baseURL;
|
||||
out.write("<tr><td>");
|
||||
out.write(name);
|
||||
out.write("</td><td align=\"center\"><input type=\"radio\" name=\"announceURL\" value=\"");
|
||||
@ -2126,14 +2129,18 @@ public class I2PSnarkServlet extends BasicServlet {
|
||||
out.write(" checked");
|
||||
out.write("></td><td align=\"center\"><input type=\"checkbox\" name=\"backup_");
|
||||
out.write(announceURL);
|
||||
out.write("\" value=\"foo\"></td></tr>\n");
|
||||
out.write("\" value=\"foo\"></td><td><a href=\"");
|
||||
out.write(homeURL);
|
||||
out.write("\">");
|
||||
out.write(homeURL);
|
||||
out.write("</a></td></tr>\n");
|
||||
}
|
||||
out.write("<tr><td><i>");
|
||||
out.write(_t("none"));
|
||||
out.write("</i></td><td align=\"center\"><input type=\"radio\" name=\"announceURL\" value=\"none\"");
|
||||
if (_lastAnnounceURL == null)
|
||||
out.write(" checked");
|
||||
out.write("></td><td></td></tr></table>\n");
|
||||
out.write("></td><td></td><td></td></tr></table>\n");
|
||||
// make the user add a tracker on the config form now
|
||||
//out.write(_t("or"));
|
||||
//out.write(" <input type=\"text\" name=\"announceURLOther\" size=\"57\" value=\"http://\" " +
|
||||
|
Reference in New Issue
Block a user