Changeset e3abea1a


Ignore:
Timestamp:
Jan 11, 2009 3:25:23 PM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
85615b9
Parents:
bc54908
Message:

add netdb links on tunnels.jsp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java

    rbc54908 re3abea1a  
    473473                out.write("<td>n/a</td>");
    474474            if (cfg.getReceiveFrom() != null)
    475                 out.write("<td>" + cfg.getReceiveFrom().toBase64().substring(0,4) +"</td>");
     475                out.write("<td>" + netDbLink(cfg.getReceiveFrom()) +"</td>");
    476476            else
    477477                out.write("<td>&nbsp;</td>");
     
    481481                out.write("<td>&nbsp;</td>");
    482482            if (cfg.getSendTo() != null)
    483                 out.write("<td>" + cfg.getSendTo().toBase64().substring(0,4) +"</td>");
     483                out.write("<td>" + netDbLink(cfg.getSendTo()) +"</td>");
    484484            else
    485485                out.write("<td>&nbsp;</td>");
     
    550550                    out.write("<td>" + (id == null ? "" : "" + id) + "</td>");
    551551                else
    552                     out.write("<td>" + peer.toBase64().substring(0,4) + (id == null ? "" : ":" + id) + cap + "</td>");               
     552                    out.write("<td>" + netDbLink(peer) + (id == null ? "" : ":" + id) + cap + "</td>");               
    553553            }
    554554            out.write("</tr>\n");
     
    602602        }
    603603    }
     604
     605    private static String netDbLink(Hash peer) {
     606        String h = peer.toBase64().substring(0, 4);
     607        return "<a href=\"netdb.jsp?r=" + h + "\">" + h + "</a>";
     608    }
    604609}
Note: See TracChangeset for help on using the changeset viewer.