Kanagaraj M has uploaded a new change for review. Change subject: webadmin: Fix Add brick popup issue ......................................................................
webadmin: Fix Add brick popup issue While creating a new gluster volume, the Add Brick popup will be opened automatically while changing the volume type if the brick count is greater than 0. Change-Id: Iec1c95e1fb5ddcbd3bf49ae72410293db2454d25 Bug-Url: https://bugzilla.redhat.com/884441 Signed-off-by: Kanagaraj M <kmayi...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeModel.java 1 file changed, 6 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/99/10499/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeModel.java index 3052c5a..efa4b2c 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/gluster/VolumeModel.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; +import java.util.List; import org.ovirt.engine.core.common.businessentities.VDS; import org.ovirt.engine.core.common.businessentities.VDSGroup; @@ -121,6 +122,8 @@ getReplicaCount().setIsAvailable(false); getStripeCount().setIsAvailable(false); + setBricks(new ListModel()); + getTypeList().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override @@ -141,14 +144,14 @@ getStripeCount().setIsAvailable(false); } - if (!validateBrickCount() && getAddBricksCommand().getIsExecutionAllowed()) + if (getBricks().getItems() != null && ((List) getBricks().getItems()).size() > 0 + && !validateBrickCount() + && getAddBricksCommand().getIsExecutionAllowed()) { getAddBricksCommand().Execute(); } } }); - - setBricks(new ListModel()); setGluster_accecssProtocol(new EntityModel()); getGluster_accecssProtocol().setEntity(true); -- To view, visit http://gerrit.ovirt.org/10499 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iec1c95e1fb5ddcbd3bf49ae72410293db2454d25 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Kanagaraj M <kmayi...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches