ofri masad has uploaded a new change for review. Change subject: webadmin: Change tool-tip for refresh (#836222) ......................................................................
webadmin: Change tool-tip for refresh (#836222) https://bugzilla.redhat.com/836222 The tool-tip for the refresh button contains to much information, most of which is irrelevant to the user. The new tool-tip contains only the interval for refresh. Change-Id: I85fda448a93c5a2e326121febb1396f32ebf0629 Signed-off-by: Ofri Masad <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java 1 file changed, 22 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/30/8130/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java index fa4c193..486f60c 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/GridTimer.java @@ -13,6 +13,19 @@ import com.google.gwt.event.shared.SimpleEventBus; import com.google.gwt.user.client.Timer; +/** + * The GridTimer holds information about the current refresh rate. + * The GridTimer can work in one of two modes: + * 1. Normal mode - in this mode the rate will be determined by selecting one out + * of 5 intervals (5,10,20,30,60 sec). + * 2. Fast-Forward mode - in this mode the timer enters a cycle: + * - 3 fast (2 sec) refresh rotations + * - 30 medium (4 sec) refresh rotations + * - 3 slow (8 sec) refresh rotations + * After completing the cycle the GridTimer will return to Normal mode (with the last set + * refresh rate). This mode is triggered by the fastForward() method. each call reset the cycle + * to the start point. + */ public abstract class GridTimer extends Timer implements HasValueChangeHandlers<String> { private enum RATE { @@ -144,13 +157,18 @@ } /** - * get the refresh rate in seconds + * Get the refresh rate + * @return refresh rate in milliseconds */ public int getRefreshRate() { RATE rate = rateCycle[currentRate]; return rate == RATE.NORMAL ? normalInterval : rate.getInterval(); } + /** + * Is this GridTimer currently running on Fast-Forward mode + * @return - true if running in Fast-Forward mode. false otherwise. + */ public boolean isFastForwarding() { return rateCycle[currentRate] != RATE.NORMAL; } @@ -224,8 +242,9 @@ } private String getValue() { - return (isActive() ? "Refresh Status: Active(" : "Inactive(") + (isPaused() ? "paused)" : "running)") + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - + " Rate: " + rateCycle[currentRate] + "(" + getRefreshRate() / 1000 + " sec)"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + logger.fine((isActive() ? "Refresh Status: Active(" : "Inactive(") + (isPaused() ? "paused)" : "running)") + ":" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + + " Rate: " + rateCycle[currentRate] + "(" + getRefreshRate() / 1000 + " sec)"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$); } + return "Refresh Interval: " + getRefreshRate() / 1000 + " sec"; //$NON-NLS-1$ //$NON-NLS-2$ } private void doStop() { -- To view, visit http://gerrit.ovirt.org/8130 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I85fda448a93c5a2e326121febb1396f32ebf0629 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: ofri masad <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
