Gilad Chaplik has uploaded a new change for review.

Change subject: webadmin: cpu pinning visibility in vm dialog
......................................................................

webadmin: cpu pinning visibility in vm dialog

Fix showing CPU pinning section when the VM:
* Respective to CpuPinningEnabled, CpuPinMigrationEnabled
* Pinned
* Assigned to host & admin-migration & cpu-host are checked

Change-Id: I7343e94f6133f0ad796b5446718af98dcd734c30
Bug-Url: https://bugzilla.redhat.com/867039
Signed-off-by: Gilad Chaplik <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
2 files changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/72/11972/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
index f89ad1a..fac2b4b 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/UnitVmModel.java
@@ -1297,7 +1297,10 @@
             {
                 IsAutoAssign_EntityChanged(sender, args);
             }
-
+            else if (sender == getHostCpu())
+            {
+                behavior.updateCpuPinningVisibility();
+            }
             else if (sender == getProvisioning())
             {
                 Provisioning_SelectedItemChanged(sender, args);
@@ -1697,6 +1700,7 @@
             clearAndDisable(getHostCpu());
             getRunVMOnSpecificHost().setIsChangable(true);
         }
+        behavior.updateCpuPinningVisibility();
     }
 
     private void IsAutoAssign_EntityChanged(Object sender, EventArgs args)
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
index 0b4ce5f..7a7932b 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmModelBehaviorBase.java
@@ -753,9 +753,10 @@
     }
 
     private boolean isVmMigratable() {
-        if 
(Boolean.TRUE.equals(getModel().getRunVMOnSpecificHost().getEntity())
-                || 
Boolean.FALSE.equals(getModel().getIsAutoAssign().getEntity())
-                || 
Boolean.TRUE.equals(getModel().getDontMigrateVM().getEntity())) {
+        if 
(Boolean.TRUE.equals(getModel().getRunVMOnSpecificHost().getEntity()) ||
+                (Boolean.FALSE.equals(getModel().getIsAutoAssign().getEntity())
+                && 
Boolean.TRUE.equals(getModel().getDontMigrateVM().getEntity())
+                        && 
Boolean.TRUE.equals(getModel().getHostCpu().getEntity()))) {
             return false;
         }
         return true;


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7343e94f6133f0ad796b5446718af98dcd734c30
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to