Separated disabling of iframe refresh from the refresh time

This commit is contained in:
str4d
2012-07-09 00:39:52 +00:00
parent bb39d9ddcf
commit 75046d11fb
3 changed files with 27 additions and 4 deletions

View File

@ -20,6 +20,7 @@ public class CSSHelper extends HelperBase {
public static final String PROP_REFRESH = "routerconsole.summaryRefresh";
public static final String DEFAULT_REFRESH = "60";
public static final int MIN_REFRESH = 3;
public static final String PROP_DISABLE_REFRESH = "routerconsole.summaryDisableRefresh";
private static final String PROP_XFRAME = "routerconsole.disableXFrame";
public String getTheme(String userAgent) {
@ -90,6 +91,25 @@ public class CSSHelper extends HelperBase {
return r;
}
/**
* change disable refresh boolean and save it
* @since 0.9.1
*/
public void setDisableRefresh(String r) {
String disableRefresh = "false";
if ("0".equals(r))
disableRefresh = "true";
_context.router().saveConfig(PROP_DISABLE_REFRESH, disableRefresh);
}
/**
* @return true if refresh is disabled
* @since 0.9.1
*/
public boolean getDisableRefresh() {
return _context.getBooleanProperty(PROP_DISABLE_REFRESH);
}
/** translate the title and display consistently */
public String title(String s) {
StringBuilder buf = new StringBuilder(128);