forked from I2P_Developers/i2p.i2p
Wizard: Ajax fixes for IE (thx zlatinb) (summary bar also)
Form notices on results panel Hide results if skipped
This commit is contained in:
@ -224,7 +224,7 @@ public class MLabRunner {
|
||||
results.put("down", down_bps);
|
||||
results.put("server_host", server_host);
|
||||
if (server_city != null)
|
||||
results.put("server_city", server_city);
|
||||
results.put("server_city", server_city.replace("_", ", "));
|
||||
if (server_country != null)
|
||||
results.put("server_country", server_country);
|
||||
listener.complete(results);
|
||||
|
@ -46,6 +46,19 @@ public class WizardHandler extends FormHandler {
|
||||
}
|
||||
if ("4".equals(page)) {
|
||||
startNDT();
|
||||
} else if ("5".equals(page)) {
|
||||
synchronized (_helper) {
|
||||
if (_helper.isNDTSuccessful()) {
|
||||
addFormNotice(_t("Bandwidth test completed successfully"));
|
||||
} else if (_helper.isNDTComplete()) {
|
||||
addFormError(_t("Bandwidth test failed"));
|
||||
} else if (_helper.isNDTRunning()) {
|
||||
addFormError(_t("Bandwidth test did not complete"));
|
||||
} else {
|
||||
// didn't run at all?
|
||||
addFormError(_t("Bandwidth test did not complete"));
|
||||
}
|
||||
}
|
||||
} else if ("6".equals(page)) {
|
||||
Map<String, String> changes = new HashMap<String, String>();
|
||||
boolean updated = updateRates(changes);
|
||||
|
@ -55,6 +55,10 @@ public class WizardHelper extends HelperBase {
|
||||
return _listener != null && !_listener.isComplete();
|
||||
}
|
||||
|
||||
public synchronized boolean isNDTSuccessful() {
|
||||
return isNDTComplete() && getUpBandwidth() > 0 && getDownBandwidth() > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HTML-escaped status string or ""
|
||||
*/
|
||||
|
Reference in New Issue
Block a user