I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 66e1c94b authored by zzz's avatar zzz
Browse files

Console: Use full hash for links to RI

for efficient lookup and to prevent display of dup prefixes
parent 04495894
No related branches found
No related tags found
No related merge requests found
......@@ -716,7 +716,7 @@ public class SybilRenderer {
*
*/
private void renderIPGroupsFamily(Writer out, StringBuilder buf, Map<String, List<RouterInfo>> map) throws IOException {
buf.append("<h3 id=\"samefamily\" class=\"sybils\">Routers in the same Family</h3><div class=\"sybil_container\">");
buf.append("<h3 id=\"samefamily\" class=\"sybils\">Routers in the same family</h3><div class=\"sybil_container\">");
List<String> foo = new ArrayList<String>(map.keySet());
Collections.sort(foo, new FoofComparator(map));
FamilyKeyCrypto fkc = _context.router().getFamilyKeyCrypto();
......@@ -836,8 +836,8 @@ public class SybilRenderer {
" src=\"/flags.jsp?c=").append(country).append("\"> ").append("</a>");
}
if (!full) {
buf.append("<a title=\"View extended router info\" class=\"viewfullentry\" href=\"netdb?r=")
.append(hash, 0, 6).append("\" >[").append(_t("Full entry")).append("]</a>");
buf.append("<a title=\"").append(_t("View extended router info")).append("\" class=\"viewfullentry\" href=\"netdb?r=")
.append(hash).append("\" >[").append(_t("Full entry")).append("]</a>");
buf.append("<a title=\"View profile data\" class=\"viewfullentry\" href=\"viewprofile?peer=")
.append(hash).append("\" >[").append(_t("profile")).append("]</a>");
buf.append("<a title=\"").append(_t("Configure peer")).append("\" class=\"viewfullentry\" href=\"configpeer?peer=")
......
......@@ -619,7 +619,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
/** Provide a consistent "look" for displaying router IDs in the console */
@Override
public String renderPeerHTML(Hash peer) {
String h = peer.toBase64().substring(0, 4);
String h = peer.toBase64();
StringBuilder buf = new StringBuilder(128);
String c = getCountry(peer);
if (c != null) {
......@@ -636,7 +636,7 @@ public class CommSystemFacadeImpl extends CommSystemFacade {
boolean found = _context.netDb().lookupRouterInfoLocally(peer) != null;
if (found)
buf.append("<a title=\"").append(_t("NetDb entry")).append("\" href=\"netdb?r=").append(h).append("\">");
buf.append(h);
buf.append(h, 0, 4);
if (found)
buf.append("</a>");
buf.append("</tt>");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment