Changeset 960636c


Ignore:
Timestamp:
Oct 6, 2018 1:25:22 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
8dc3163
Parents:
e528775
Message:

Console: Sort addresses in RIs, remove note about O cap

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/NetDbRenderer.java

    re528775 r960636c  
    786786
    787787    /**
     788     *  Sort by style, then host
     789     *  @since 0.9.38
     790     */
     791    private static class RAComparator implements Comparator<RouterAddress> {
     792         private static final long serialVersionUID = 1L;
     793
     794         public int compare(RouterAddress l, RouterAddress r) {
     795             int rv = l.getTransportStyle().compareTo(r.getTransportStyle());
     796             if (rv != 0)
     797                 return rv;
     798             String lh = l.getHost();
     799             String rh = r.getHost();
     800             if (lh == null)
     801                 return (rh == null) ? 0 : -1;
     802             if (rh == null)
     803                 return 1;
     804             return lh.compareTo(rh);
     805        }
     806    }
     807
     808    /**
    788809     *  Be careful to use stripHTML for any displayed routerInfo data
    789810     *  to prevent vulnerabilities
     
    837858            buf.append(_t("none"));
    838859        } else {
    839             for (RouterAddress addr : info.getAddresses()) {
     860            if (addrs.size() > 1) {
     861                // addrs is unmodifiable
     862                List<RouterAddress> laddrs = new ArrayList<RouterAddress>(addrs);
     863                Collections.sort(laddrs, new RAComparator());
     864                addrs = laddrs;
     865            }
     866            for (RouterAddress addr : addrs) {
    840867                String style = addr.getTransportStyle();
    841868                buf.append("<br><b class=\"netdb_transport\">").append(DataHelper.stripHTML(style)).append(":</b>");
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ProfileOrganizerRenderer.java

    re528775 r960636c  
    331331           .append("<td><b>X</b></td><td>").append(_t("Over {0} shared bandwidth", Math.round(Router.MIN_BW_X * 1.024f) + " KBps")).append("</td>")
    332332           .append("<td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>");
    333         buf.append("<tr><td>&nbsp;</td><td colspan=\"5\">").append(_t("Note: For P and X bandwidth tiers, O is included for the purpose of backward compatibility in the NetDB."))
    334            .append("</tr>");
    335333        buf.append("</tbody></table></td></tr>"); // profile_defs
    336334        buf.append("<tr><td><b>")
  • history.txt

    re528775 r960636c  
     12018-10-06 zzz
     2 * Console: Sort addresses in RIs
     3
    14* 2018-10-04 0.9.37 released
    25
  • router/java/src/net/i2p/router/RouterVersion.java

    re528775 r960636c  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 0;
     21    public final static long BUILD = 1;
    2222
    2323    /** for example "-test" */
Note: See TracChangeset for help on using the changeset viewer.