merge of '2b0329ad66b84d90d1b7e6e1a6247c6d826321f9'

and '77a4e2e18ab0e48d6f102388838e1367c1d56ebd'
This commit is contained in:
zzz
2010-11-27 16:34:15 +00:00
18 changed files with 280 additions and 160 deletions

View File

@ -93,10 +93,6 @@
<jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" />
</target>
<target name="jarWithJavadoc" depends="jar">
<jar destfile="build/routerconsole.war" basedir="../../../build/" includes="javadoc/**/*" update="true" />
</target>
<target name="poupdate" depends="build">
<ant target="war" />
<!-- Update the messages_*.po files.

View File

@ -5,7 +5,6 @@ import java.util.List;
import java.util.StringTokenizer;
import net.i2p.stat.StatManager;
import net.i2p.util.Log;
/**
* Handler to deal with form submissions from the stats config form and act
@ -41,14 +40,10 @@ public class ConfigStatsHandler extends FormHandler {
if (stats != null) {
for (int i = 0; i < stats.length; i++) {
String cur = stats[i].trim();
if (_log.shouldLog(Log.DEBUG))
_log.debug("Stat: [" + cur + "]");
if ( (cur.length() > 0) && (!_stats.contains(cur)) )
_stats.add(cur);
}
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("Updated stats: " + _stats);
}
public void setGraphList(String stats[]) {
@ -66,8 +61,6 @@ public class ConfigStatsHandler extends FormHandler {
} else {
_graphs = "";
}
if (_log.shouldLog(Log.DEBUG))
_log.debug("Updated graphs: " + _graphs);
}
public void setExplicitFilter(String foo) { _explicitFilter = true; }

View File

@ -55,7 +55,7 @@ public class FormHandler {
/**
* Call this to prevent changes using GET
*
* @param the request method
* @param val the request method
* @since 0.8.2
*/
public void storeMethod(String val) { _method = val; }

View File

@ -366,8 +366,18 @@ public class PluginUpdateHandler extends UpdateHandler {
} else {
// start everything
try {
if (PluginStarter.startPlugin(_context, appName))
statusDone("<b>" + _("Plugin {0} installed and started", appName) + "</b>");
if (PluginStarter.startPlugin(_context, appName)) {
String linkName = ConfigClientsHelper.stripHTML(props, "consoleLinkName_" + Messages.getLanguage(_context));
if (linkName == null)
linkName = ConfigClientsHelper.stripHTML(props, "consoleLinkName");
String linkURL = ConfigClientsHelper.stripHTML(props, "consoleLinkURL");
String link;
if (linkName != null && linkURL != null)
link = "<a target=\"_blank\" href=\"" + linkURL + "\"/>" + linkName + "</a>";
else
link = appName;
statusDone("<b>" + _("Plugin {0} installed and started", link) + "</b>");
}
else
statusDone("<b>" + _("Plugin {0} installed but failed to start, check logs", appName) + "</b>");
} catch (Throwable e) {

View File

@ -147,8 +147,12 @@ public class SummaryBarRenderer {
.append(_("Local Destinations"))
.append("\">")
.append(_("I2PTunnel"))
.append("</a>\n");
.append("</a></td></tr></table>\n");
File javadoc = new File(_context.getBaseDir(), "docs/javadoc/index.html");
if (javadoc.exists())
buf.append("<a href=\"/javadoc/index.html\" target=\"_blank\">Javadoc</a>\n");
buf.append("</td></tr></table>\n");
out.write(buf.toString());
buf.setLength(0);