Martin Peřina has uploaded a new change for review. Change subject: webadmin: Save PM options even when PM disabled ......................................................................
webadmin: Save PM options even when PM disabled Fixes limitation where PM options were saved only when PM was enabled for host. Change-Id: Iccc3121e35c05123a110f98802bb548034aaa308 Bug-Url: https://bugzilla.redhat.com/1113478 Signed-off-by: Martin Perina <mper...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java 1 file changed, 21 insertions(+), 23 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/93/29593/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java index a38eefa..8590b47 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java @@ -1441,30 +1441,28 @@ HashMap<String, String> dict = new HashMap<String, String>(); - if (getIsPm().getEntity()) { - // Add well known pm options. - if (port.getIsAvailable() && port.getEntity() != null) { - dict.put(PmPortKey, port.getEntity()); - } - if (slot.getIsAvailable() && slot.getEntity() != null) { - dict.put(PmSlotKey, slot.getEntity()); - } - if (secure.getIsAvailable()) { - dict.put(PmSecureKey, secure.getEntity().toString()); - } + // Add well known pm options. + if (port.getIsAvailable() && port.getEntity() != null) { + dict.put(PmPortKey, port.getEntity()); + } + if (slot.getIsAvailable() && slot.getEntity() != null) { + dict.put(PmSlotKey, slot.getEntity()); + } + if (secure.getIsAvailable()) { + dict.put(PmSecureKey, secure.getEntity().toString()); + } - // Add unknown pm options. - // Assume Validate method was called before this getter. - String pmOptions = options.getEntity(); - if (!StringHelper.isNullOrEmpty(pmOptions)) { - for (String pair : pmOptions.split("[,]", -1)) //$NON-NLS-1$ - { - String[] array = pair.split("[=]", -1); //$NON-NLS-1$ - if (array.length == 2) { - dict.put(array[0], array[1]); - } else if (array.length == 1) { - dict.put(array[0], ""); //$NON-NLS-1$ - } + // Add unknown pm options. + // Assume Validate method was called before this getter. + String pmOptions = options.getEntity(); + if (!StringHelper.isNullOrEmpty(pmOptions)) { + for (String pair : pmOptions.split("[,]", -1)) //$NON-NLS-1$ + { + String[] array = pair.split("[=]", -1); //$NON-NLS-1$ + if (array.length == 2) { + dict.put(array[0], array[1]); + } else if (array.length == 1) { + dict.put(array[0], ""); //$NON-NLS-1$ } } } -- To view, visit http://gerrit.ovirt.org/29593 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iccc3121e35c05123a110f98802bb548034aaa308 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Peřina <mper...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches