- Add container divs and styling markup
- Add top navigation menu
This commit is contained in:
str4d
2017-07-26 23:14:30 +00:00
parent ee1112cca7
commit 30eb089623
6 changed files with 70 additions and 41 deletions

View File

@ -730,13 +730,13 @@ public class KBucketSet<T extends SimpleDataStructure> {
public void getEntries(SelectionCollector<T> collector) {
throw new UnsupportedOperationException();
}
public void clear() {}
public boolean add(T peer) {
throw new UnsupportedOperationException();
}
public boolean remove(T peer) {
return false;
}
@ -765,6 +765,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
@Override
public String toString() {
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"debug_container buckets\">");
buf.append("<hr><b>Bucket set rooted on:</b> ").append(_us.toString())
.append(" K=").append(BUCKET_SIZE)
.append(" B=").append(B_VALUE)
@ -779,6 +780,7 @@ public class KBucketSet<T extends SimpleDataStructure> {
buf.append(b.toString()).append("<br>\n");
}
} finally { releaseReadLock(); }
buf.append("</div>");
return buf.toString();
}
}

View File

@ -179,7 +179,7 @@ public class PortMapper {
*/
public void renderStatusHTML(Writer out) throws IOException {
List<String> services = new ArrayList<String>(_dir.keySet());
out.write("<h2>Port Mapper</h2><table><tr><th>Service<th>Host<th>Port\n");
out.write("<h2 id=\"debug_portmapper\">Port Mapper</h2><table id=\"portmapper\"><tr><th>Service<th>Host<th>Port\n");
Collections.sort(services);
for (String s : services) {
InetSocketAddress ia = _dir.get(s);