forked from I2P_Developers/i2p.i2p
Various small i2psnark HTML tweaks
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);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user