Changeset e6f111c5


Ignore:
Timestamp:
Jun 16, 2016 3:24:24 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
4ee66c82
Parents:
e146480
Message:

Split up /configclients, add /configi2cp, /configplugins, /configwebappsx
(ticket #1804)

Location:
apps/routerconsole
Files:
3 added
3 edited

Legend:

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

    re146480 re6f111c5  
    2020                                          {"", "net", "ui", "sidebar", "home", "service", "update", "tunnels",
    2121                                           "clients", "peer", "keyring", "logging", "stats",
     22                                           "i2cp", "plugins", "webapps",
    2223                                           "reseed", "advanced", "family" };
    2324
     
    2627                                           _x("Service"), _x("Update"), _x("Tunnels"),
    2728                                           _x("Clients"), _x("Peers"), _x("Keyring"), _x("Logging"), _x("Stats"),
     29                                           _x("I2CP"), _x("Plugins"), _x("Web Apps"),
    2830                                           _x("Reseeding"), _x("Advanced"), _x("Router Family") };
    2931
     
    6264            buf.append("<center>");
    6365        List<Tab> tabs = new ArrayList<Tab>(pages.length);
     66        boolean hidePlugins = !PluginStarter.pluginsEnabled(_context);
    6467        for (int i = 0; i < pages.length; i++) {
     68            if (hidePlugins && pages[i].equals("plugins"))
     69                continue;
    6570            tabs.add(new Tab(pages[i], _t(titles[i])));
    6671        }
  • apps/routerconsole/jsp/configclients.jsp

    re146480 re6f111c5  
    4545 <input type="submit" class="accept" name="action" value="<%=intl._t("Save Client Configuration")%>" />
    4646</div></form></div>
    47 
    48 <h3><a name="i2cp"></a><%=intl._t("Advanced Client Interface Configuration")%></h3>
    49 <form action="" method="POST">
    50 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    51 <p>
    52 <b><%=intl._t("External I2CP (I2P Client Protocol) Interface Configuration")%></b><br>
    53 <input type="radio" class="optbox" name="mode" value="1" <%=clientshelper.i2cpModeChecked(1) %> >
    54 <%=intl._t("Enabled without SSL")%><br>
    55 <input type="radio" class="optbox" name="mode" value="2" <%=clientshelper.i2cpModeChecked(2) %> >
    56 <%=intl._t("Enabled with SSL required")%><br>
    57 <input type="radio" class="optbox" name="mode" value="0" <%=clientshelper.i2cpModeChecked(0) %> >
    58 <%=intl._t("Disabled - Clients outside this Java process may not connect")%><br>
    59 <%=intl._t("I2CP Interface")%>:
    60 <select name="interface">
    61 <%
    62        String[] ips = clientshelper.intfcAddresses();
    63        for (int i = 0; i < ips.length; i++) {
    64            out.print("<option value=\"");
    65            out.print(ips[i]);
    66            out.print('\"');
    67            if (clientshelper.isIFSelected(ips[i]))
    68                out.print(" selected=\"selected\"");
    69            out.print('>');
    70            out.print(ips[i]);
    71            out.print("</option>\n");
    72        }
    73 %>
    74 </select><br>
    75 <%=intl._t("I2CP Port")%>:
    76 <input name="port" type="text" size="5" maxlength="5" value="<jsp:getProperty name="clientshelper" property="port" />" ><br>
    77 <b><%=intl._t("Authorization")%></b><br>
    78 <input type="checkbox" class="optbox" name="auth" value="true" <jsp:getProperty name="clientshelper" property="auth" /> >
    79 <%=intl._t("Require username and password")%><br>
    80 <%=intl._t("Username")%>:
    81 <input name="user" type="text" value="" /><br>
    82 <%=intl._t("Password")%>:
    83 <input name="nofilter_pw" type="password" value="" /><br>
    84 </p><p><b><%=intl._t("The default settings will work for most people.")%></b>
    85 <%=intl._t("Any changes made here must also be configured in the external client.")%>
    86 <%=intl._t("Many clients do not support SSL or authorization.")%>
    87 <i><%=intl._t("All changes require restart to take effect.")%></i>
    88 </p><hr><div class="formaction">
    89 <input type="submit" class="default" name="action" value="<%=intl._t("Save Interface Configuration")%>" />
    90 <input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
    91 <input type="submit" class="accept" name="action" value="<%=intl._t("Save Interface Configuration")%>" />
    92 </div></form>
    93 
    94 <h3><a name="webapp"></a><%=intl._t("WebApp Configuration")%></h3><p>
    95  <%=intl._t("The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. They are usually web applications accessible through the router console. They may be complete applications (e.g. i2psnark),front-ends to another client or application which must be separately enabled (e.g. susidns, i2ptunnel), or have no web interface at all (e.g. addressbook).")%>
    96  </p><p>
    97  <%=intl._t("A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method.")%>
    98  </p><div class="wideload">
    99 <form action="configclients" method="POST">
    100 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    101  <jsp:getProperty name="clientshelper" property="form2" />
    102  <p><i><%=intl._t("All changes require restart to take effect.")%></i>
    103  </p><hr><div class="formaction">
    104  <input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
    105  <input type="submit" name="action" class="accept" value="<%=intl._t("Save WebApp Configuration")%>" />
    106 </div></form></div>
    107 
    108 <%
    109    if (clientshelper.showPlugins()) {
    110        if (clientshelper.isPluginUpdateEnabled()) {
    111 %>
    112 <h3><a name="pconfig"></a><%=intl._t("Plugin Configuration")%></h3><p>
    113  <%=intl._t("The plugins listed below are started by the webConsole client.")%>
    114  </p><div class="wideload">
    115 <form action="" method="POST">
    116 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    117  <jsp:getProperty name="clientshelper" property="form3" />
    118 <div class="formaction">
    119  <input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
    120  <input type="submit" name="action" class="accept" value="<%=intl._t("Save Plugin Configuration")%>" />
    121 </div></form></div>
    122 <%
    123        } // pluginUpdateEnabled
    124        if (clientshelper.isPluginInstallEnabled()) {
    125 %>
    126 <h3><a name="plugin"></a><%=intl._t("Plugin Installation from URL")%></h3><p>
    127  <%=intl._t("Look for available plugins on {0}.", "<a href=\"http://i2pwiki.i2p/index.php?title=Plugins\">i2pwiki.i2p</a>")%>
    128  <%=intl._t("To install a plugin, enter the download URL:")%>
    129  </p>
    130 <div class="wideload">
    131 <form action="configclients" method="POST">
    132 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    133 <p>
    134  <input type="text" size="60" name="pluginURL" >
    135  </p><hr><div class="formaction">
    136  <input type="submit" name="action" class="default" value="<%=intl._t("Install Plugin")%>" />
    137  <input type="submit" class="cancel" name="foo" value="<%=intl._t("Cancel")%>" />
    138  <input type="submit" name="action" class="download" value="<%=intl._t("Install Plugin")%>" />
    139 </div></form></div>
    140 
    141 
    142 <div class="wideload">
    143 <h3><a name="plugin"></a><%=intl._t("Plugin Installation from File")%></h3>
    144 <form action="configclients" method="POST" enctype="multipart/form-data" accept-charset="UTF-8">
    145 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    146 <p><%=intl._t("Install plugin from file.")%>
    147 <br><%=intl._t("Select xpi2p or su3 file")%> :
    148 <input type="file" name="pluginFile" >
    149 </p><hr><div class="formaction">
    150 <input type="submit" name="action" class="download" value="<%=intl._t("Install Plugin from File")%>" />
    151 </div></form></div>
    152 <%
    153        } // pluginInstallEnabled
    154        if (clientshelper.isPluginUpdateEnabled()) {
    155 %>
    156 <h3><a name="plugin"></a><%=intl._t("Update All Plugins")%></h3>
    157 <div class="formaction">
    158 <form action="configclients" method="POST">
    159 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    160  <input type="submit" name="action" class="reload" value="<%=intl._t("Update All Installed Plugins")%>" />
    161 </form></div>
    162 <%
    163        } // pluginUpdateEnabled
    164    } // showPlugins
    165 %>
    16647</div></div></body></html>
  • apps/routerconsole/jsp/nowebapp.jsp

    re146480 re6f111c5  
    1515<div class="sorry" id="warning">
    1616<%=intl._t("The requested web application is not running.")%>
    17 <%=intl._t("Please visit the {0}config clients page{1} to start it.", "<a href=\"/configclients.jsp#webapp\" target=\"_top\">", "</a>")%>
     17<%=intl._t("Please visit the {0}config clients page{1} to start it.", "<a href=\"/configwebapps.jsp#webapp\" target=\"_top\">", "</a>")%>
    1818</div></body></html>
Note: See TracChangeset for help on using the changeset viewer.