Changeset 428cbdc


Ignore:
Timestamp:
Oct 31, 2009 6:18:36 PM (10 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9314eeb
Parents:
7594c43
Message:
  • Console:
    • More tagging
    • Show user-installed themes on configui.jsp
    • Fix reseed button spacing
  • GraphHelper? cleanup
  • Susidns: add link to subscription faq
Files:
11 edited

Legend:

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

    r7594c43 r428cbdc  
    11package net.i2p.router.web;
    22
     3import java.io.File;
     4import java.util.TreeSet;
     5import java.util.Set;
     6
    37public class ConfigUIHelper extends HelperBase {
    4     public ConfigUIHelper() {}
    5    
    6     private static final String themes[] = {_x("classic"), _x("dark"), _x("light")};
    78
    89    public String getSettings() {
    910        StringBuilder buf = new StringBuilder(512);
    1011        String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
     12        Set<String> themes = themeSet();
    1113        for (String theme : themes) {
    1214            buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
     
    1820    }
    1921
     22    /** @return standard and user-installed themes, sorted (untranslated) */
     23    private Set<String> themeSet() {
     24         Set<String> rv = new TreeSet();
     25         // add a failsafe even if we can't find any themes
     26         rv.add(CSSHelper.DEFAULT_THEME);
     27         File dir = new File(_context.getBaseDir(), "docs/themes/console");
     28         File[] files = dir.listFiles();
     29         if (files == null)
     30             return rv;
     31         for (int i = 0; i < files.length; i++) {
     32             String name = files[i].getName();
     33             if (files[i].isDirectory() && ! name.equals("images"))
     34                 rv.add(name);
     35         }
     36         return rv;
     37    }
     38
    2039    private static final String langs[] = {"de", "en", "fr", "nl", "se", "zh"};
    2140    private static final String xlangs[] = {_x("German"), _x("English"), _x("French"),
    2241                                            _x("Dutch"), _x("Swedish"), _x("Chinese")};
    2342
     43    /** todo sort by translated string */
    2444    public String getLangSettings() {
    2545        StringBuilder buf = new StringBuilder(512);
  • apps/routerconsole/java/src/net/i2p/router/web/GraphHelper.java

    r7594c43 r428cbdc  
    120120        return "";
    121121    }
    122     public String getPeerSummary() {
    123         try {
    124             _context.commSystem().renderStatusHTML(_out);
    125             _context.bandwidthLimiter().renderStatusHTML(_out);
    126         } catch (IOException ioe) {
    127             ioe.printStackTrace();
    128         }
    129         return "";
    130     }
    131 }
    132122
    133 class AlphaComparator implements Comparator {
     123/** inner class, don't bother reindenting */
     124private static class AlphaComparator implements Comparator {
    134125    public int compare(Object lhs, Object rhs) {
    135126        SummaryListener l = (SummaryListener)lhs;
     
    140131    }
    141132}
     133
     134}
  • apps/routerconsole/java/src/net/i2p/router/web/SummaryBarRenderer.java

    r7594c43 r428cbdc  
    288288                System.setProperty("net.i2p.router.web.ReseedHandler.nonce", nonce+"");
    289289                String uri = _helper.getRequestURI();
    290                 buf.append("<form action=\"").append(uri).append("\" method=\"GET\">\n");
     290                buf.append("<p><form action=\"").append(uri).append("\" method=\"GET\">\n");
    291291                buf.append("<input type=\"hidden\" name=\"reseedNonce\" value=\"").append(nonce).append("\" >\n");
    292                 buf.append("<button type=\"submit\" value=\"Reseed\" >").append(_("Reseed")).append("</button></form>\n");
     292                buf.append("<button type=\"submit\" value=\"Reseed\" >").append(_("Reseed")).append("</button></form></p>\n");
    293293            }
    294294            anotherLine = true;
  • apps/routerconsole/java/strings/Strings.java

    r7594c43 r428cbdc  
    99class Dummy {
    1010    void dummy {
    11         // wars
     11        // wars for ConfigClientsHelper
    1212        _("addressbook");
    1313        _("i2psnark");
     
    1717        _("routerconsole");
    1818
    19         // clients, taken from clients.config
     19        // clients, taken from clients.config, for ConfigClientsHelper
    2020        // note that if the wording changes in clients.config, we have to
    2121        // keep the old string here as well for existing installs
     
    3636        // hardcoded in i2psnark
    3737        _("I2PSnark");
     38
     39        // standard themes for ConfigUIHelper
     40        _("classic");
     41        _("dark");
     42        _("light");
    3843    }
    3944}
  • apps/routerconsole/jsp/configpeer.jsp

    r7594c43 r428cbdc  
    6262 <input type="submit" name="action" value="<%=intl._("Adjust peer bonuses")%>" /></p></div>
    6363 </form>
    64  <a name="shitlist"> </a>
     64 <a name="shitlist"> </a><h2><%=intl._("Banned Peers")%></h2>
    6565 <jsp:useBean class="net.i2p.router.web.ProfilesHelper" id="profilesHelper" scope="request" />
    6666 <jsp:setProperty name="profilesHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
    6767 <jsp:setProperty name="profilesHelper" property="writer" value="<%=out%>" />
    6868 <jsp:getProperty name="profilesHelper" property="shitlistSummary" />
    69  <div class="wideload">
     69 <div class="wideload"><h2><%=intl._("Banned IPs")%></h2>
    7070 <jsp:getProperty name="peerhelper" property="blocklistSummary" />
    7171
  • apps/routerconsole/jsp/profiles.jsp

    r7594c43 r428cbdc  
    1313 <jsp:setProperty name="profilesHelper" property="writer" value="<%=out%>" />
    1414 <jsp:getProperty name="profilesHelper" property="profileSummary" />
    15  <a name="shitlist"> </a>
     15 <a name="shitlist"> </a><h2><%=intl._("Banned Peers")%></h2>
    1616 <jsp:getProperty name="profilesHelper" property="shitlistSummary" />
    1717<hr></div></div></body></html>
  • apps/susidns/src/jsp/subscriptions.jsp

    r7594c43 r428cbdc  
    7272file of other people. The default subscription is the hosts.txt from www.i2p2.i2p, which is updated infrequently.
    7373So it is a good idea to add additional subscriptions to sites that have the latest addresses.
     74<a href="http://www.i2p2.i2p/faq.html#subscriptions">See the FAQ for a list of subscription URLs.</a>
    7475</p>
    7576</div><hr>
  • history.txt

    r7594c43 r428cbdc  
     12009-10-31 zzz
     2    * Console:
     3      - More tagging
     4      - Show user-installed themes on configui.jsp
     5      - Fix reseed button spacing
     6    * GraphHelper cleanup
     7    * Susidns: add link to subscription faq
     8
    192009-10-29 zzz
    210    * Console tag fixes, bundle script fix
  • router/java/src/net/i2p/router/Blocklist.java

    r7594c43 r428cbdc  
    758758    /** write directly to the stream so we don't OOM on a huge list */
    759759    public void renderStatusHTML(Writer out) throws IOException {
    760         out.write("<h2>Banned IPs</h2>");
     760        // move to the jsp
     761        //out.write("<h2>Banned IPs</h2>");
    761762        Set singles = new TreeSet();
    762763        singles.addAll(_singleIPBlocklist);
  • router/java/src/net/i2p/router/RouterVersion.java

    r7594c43 r428cbdc  
    1919    public final static String ID = "Monotone";
    2020    public final static String VERSION = CoreVersion.VERSION;
    21     public final static long BUILD = 9;
     21    public final static long BUILD = 10;
    2222    /** for example "-test" */
    2323    public final static String EXTRA = "";
  • router/java/src/net/i2p/router/Shitlist.java

    r7594c43 r428cbdc  
    254254    public void renderStatusHTML(Writer out) throws IOException {
    255255        StringBuilder buf = new StringBuilder(1024);
    256         buf.append("<h2>Banned Peers</h2>");
     256        // move to the jsp
     257        //buf.append("<h2>Banned Peers</h2>");
    257258        Map<Hash, Entry> entries = new TreeMap(new HashComparator());
    258259       
Note: See TracChangeset for help on using the changeset viewer.