Alona Kaplan has uploaded a new change for review. Change subject: webadmin: If the vnic is unplugged, all its fields should be enabled ......................................................................
webadmin: If the vnic is unplugged, all its fields should be enabled If the vnic is unplugged, all its properties can be updated. The bug was that if while editing the vnic it was changed to unplugged, the editing of some properties was blocked. Change-Id: I7f652e88df37ffb48500a9e86c361d3f8964afe1 Bug-Url: https://bugzilla.redhat.com/906434 Signed-off-by: Alona Kaplan <[email protected]> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java 2 files changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/11/11911/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java index 220a0c4..e10d758 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/EditVmInterfaceModel.java @@ -42,7 +42,7 @@ return; } - Boolean plug = (Boolean) getPlugged().getEntity(); + Boolean plug = isPluggedBeforeAndAfterEdit(); if (plug) { getNicType().getChangeProhibitionReasons() @@ -71,7 +71,7 @@ return; } - boolean isPlugged = (Boolean) getPlugged().getEntity(); + boolean isPlugged = isPluggedBeforeAndAfterEdit(); boolean isPortMirroring = (Boolean) getPortMirroring().getEntity(); if (isVmUp() && hotUpdateSupported) { @@ -93,7 +93,7 @@ return; } - boolean isPlugged = (Boolean) getPlugged().getEntity(); + boolean isPlugged = isPluggedBeforeAndAfterEdit(); boolean isPortMirroring = (Boolean) getPortMirroring().getEntity(); if (isVmUp() && hotUpdateSupported) { @@ -131,4 +131,8 @@ } } } + + private boolean isPluggedBeforeAndAfterEdit() { + return getNic().isPlugged() && (Boolean) getPlugged().getEntity(); + } } diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java index bc34670..f42f2f9 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmInterfaceModel.java @@ -517,7 +517,6 @@ } protected void updateLinkChangability() { - boolean isPlugged = (Boolean) getPlugged().getEntity(); boolean isNullNetworkSelected = getNetwork().getSelectedItem() == null; if (isNullNetworkSelected) { -- To view, visit http://gerrit.ovirt.org/11911 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7f652e88df37ffb48500a9e86c361d3f8964afe1 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
