forked from I2P_Developers/i2p.i2p
* Checklist updates
* Console: - Don't reset graph settings when clicking restart or shutdown on graphs page - Don't recommend guest login on trac, it's disabled - Catch and remove corrupt jrb file (ticket #1186) - Always set default language on /configui * Readme: Update links * Transports: Reduce target connection count again to reduce tunnel reject rate further
This commit is contained in:
@ -103,11 +103,33 @@ public class ConfigUIHelper extends HelperBase {
|
||||
|
||||
/** todo sort by translated string */
|
||||
public String getLangSettings() {
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
String current = Messages.getLanguage(_context);
|
||||
String clang = Messages.getLanguage(_context);
|
||||
String current = clang;
|
||||
String country = Messages.getCountry(_context);
|
||||
if (country != null && country.length() > 0)
|
||||
current += '_' + country;
|
||||
// find best match
|
||||
boolean found = false;
|
||||
for (int i = 0; i < langs.length; i++) {
|
||||
if (langs[i][0].equals(current)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
if (country != null && country.length() > 0) {
|
||||
current = clang;
|
||||
for (int i = 0; i < langs.length; i++) {
|
||||
if (langs[i][0].equals(current)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
current = "en";
|
||||
}
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
for (int i = 0; i < langs.length; i++) {
|
||||
// we use "lang" so it is set automagically in CSSHelper
|
||||
buf.append("<input type=\"radio\" class=\"optbox\" name=\"lang\" ");
|
||||
|
@ -351,7 +351,7 @@ public class GraphHelper extends FormHandler {
|
||||
try {
|
||||
_out.write("<br><h3>" + _("Configure Graph Display") + " [<a href=\"configstats\">" + _("Select Stats") + "</a>]</h3>");
|
||||
_out.write("<form action=\"graphs\" method=\"POST\">\n" +
|
||||
"<input type=\"hidden\" name=\"action\" value=\"foo\">\n" +
|
||||
"<input type=\"hidden\" name=\"action\" value=\"save\">\n" +
|
||||
"<input type=\"hidden\" name=\"nonce\" value=\"" + nonce + "\" >\n");
|
||||
_out.write(_("Periods") + ": <input size=\"5\" style=\"text-align: right;\" type=\"text\" name=\"periodCount\" value=\"" + _periodCount + "\"><br>\n");
|
||||
_out.write(_("Plot averages") + ": <input type=\"radio\" class=\"optbox\" name=\"showEvents\" value=\"false\" " + (_showEvents ? "" : "checked=\"checked\" ") + "> ");
|
||||
@ -380,7 +380,7 @@ public class GraphHelper extends FormHandler {
|
||||
if (persistent)
|
||||
_out.write(" checked=\"checked\"");
|
||||
_out.write(">" +
|
||||
"<hr><div class=\"formaction\"><input type=\"submit\" class=\"acceot\" value=\"" + _("Save settings and redraw graphs") + "\"></div></form>");
|
||||
"<hr><div class=\"formaction\"><input type=\"submit\" class=\"accept\" value=\"" + _("Save settings and redraw graphs") + "\"></div></form>");
|
||||
} catch (IOException ioe) {
|
||||
ioe.printStackTrace();
|
||||
}
|
||||
@ -413,7 +413,8 @@ public class GraphHelper extends FormHandler {
|
||||
*/
|
||||
@Override
|
||||
protected void processForm() {
|
||||
saveSettings();
|
||||
if ("save".equals(_action))
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -78,8 +78,17 @@ class SummaryListener implements RateSummaryListener {
|
||||
//String names[] = _sample.getDsNames();
|
||||
//System.out.println("Add " + val + " over " + eventCount + " for " + _name
|
||||
// + " [" + names[0] + ", " + names[1] + "]");
|
||||
} catch (IllegalArgumentException iae) {
|
||||
// ticket #1186
|
||||
// apparently a corrupt file, thrown from update()
|
||||
_log.error("Error adding", iae);
|
||||
String path = _isPersistent ? _db.getPath() : null;
|
||||
stopListening();
|
||||
if (path != null)
|
||||
(new File(path)).delete();
|
||||
} catch (IOException ioe) {
|
||||
_log.error("Error adding", ioe);
|
||||
stopListening();
|
||||
} catch (RrdException re) {
|
||||
// this can happen after the time slews backwards, so don't make it an error
|
||||
// org.jrobin.core.RrdException: Bad sample timestamp 1264343107. Last update time was 1264343172, at least one second step is required
|
||||
|
Reference in New Issue
Block a user