Lior Vernia has uploaded a new change for review.

Change subject: webadmin: Disable Host/Interfaces subtab refresh pre-3.1
......................................................................

webadmin: Disable Host/Interfaces subtab refresh pre-3.1

In pre-3.1 clusters, host networking is setup through the subtab, and
refreshing the subtab (for the statistics) makes that hard to do as it
resets the row selection.

Change-Id: Idb1d14be079936eac2fb302320eb7000e970bc32
Bug-Url: https://bugzilla.redhat.com/1027597
Signed-off-by: Lior Vernia <lver...@redhat.com>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostInterfaceListModel.java
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/31/21031/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostInterfaceListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostInterfaceListModel.java
index 307e912..2bfd027 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostInterfaceListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostInterfaceListModel.java
@@ -2245,8 +2245,7 @@
         // Setup Networks is only available on 3.1 Clusters, all the other 
commands (except save network configuration)
         // available only on less than 3.1 Clusters
         if (host != null) {
-            Version v31 = new Version(3, 1);
-            boolean isLessThan31 = 
host.getVdsGroupCompatibilityVersion().compareTo(v31) < 0;
+            boolean isLessThan31 = 
host.getVdsGroupCompatibilityVersion().compareTo(Version.v3_1) < 0;
 
             getSetupNetworksCommand().setIsAvailable(!isLessThan31);
 
@@ -2258,6 +2257,12 @@
             getEditManagementNetworkCommand().setIsAvailable(isLessThan31);
 
             setSelectionAvailable(isLessThan31);
+
+            // disable subtab refresh for pre-3.1 clusters, to avoid 
interfering with row selection
+            setIsTimerDisabled(isLessThan31);
+            if (isLessThan31) {
+                stopRefresh();
+            }
         }
     }
 


-- 
To view, visit http://gerrit.ovirt.org/21031
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb1d14be079936eac2fb302320eb7000e970bc32
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <lver...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to