Kanagaraj M has uploaded a new change for review. Change subject: webadmin: check up server in gluster cluster guide me ......................................................................
webadmin: check up server in gluster cluster guide me While showing the Guide Me popup for a gluster supported cluster, 'Add Another Host' will be shown only if there is a host in Up status. Change-Id: I0cea3a3c2a64eca78740d921680faeeb0c5473c7 Bug-Url: https://bugzilla.redhat.com/906703 Signed-off-by: Kanagaraj M <kmayi...@redhat.com> --- M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java 1 file changed, 17 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/50/12050/1 diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java index bbc9e77..5494241 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java @@ -66,6 +66,7 @@ private ArrayList<VDS> hosts; private ArrayList<VDS> allHosts; + private Boolean isAnyHostUpInCluster; private VDS localStorageHost; private storage_pool dataCenter; @@ -93,6 +94,17 @@ clusterGuideModel.UpdateOptionsNonLocalFS(); } })); + if (getEntity().supportsGlusterService()) { + AsyncDataProvider.isAnyHostUpInCluster(new AsyncQuery(this, + new INewAsyncCallback() { + @Override + public void OnSuccess(Object target, Object returnValue) { + ClusterGuideModel clusterGuideModel = (ClusterGuideModel) target; + isAnyHostUpInCluster = (Boolean) returnValue; + clusterGuideModel.UpdateOptionsNonLocalFS(); + } + }), getEntity().getname()); + } } private void UpdateOptionsLocalFSData() { @@ -110,7 +122,7 @@ } private void UpdateOptionsNonLocalFS() { - if (hosts == null || allHosts == null) { + if (hosts == null || allHosts == null || (getEntity().supportsGlusterService() && isAnyHostUpInCluster == null)) { return; } @@ -127,11 +139,12 @@ addHostAction.setTitle(ClusterConfigureHostsAction); getCompulsoryActions().add(addHostAction); } - else + else if (!getEntity().supportsGlusterService() || isAnyHostUpInCluster) { addHostAction.setTitle(ClusterAddAnotherHostAction); getOptionalActions().add(addHostAction); } + if (getEntity().getStoragePoolId() == null) { addHostAction.getExecuteProhibitionReasons().add(ConstantsManager.getInstance() @@ -161,7 +174,7 @@ selectHostAction.setTitle(SelectHostsAction); getCompulsoryActions().add(selectHostAction); } - else + else if (!getEntity().supportsGlusterService() || isAnyHostUpInCluster) { selectHostAction.setTitle(SelectHostsAction); getOptionalActions().add(selectHostAction); @@ -232,6 +245,7 @@ allHosts = null; localStorageHost = null; dataCenter = null; + isAnyHostUpInCluster = null; } public void SelectHost() -- To view, visit http://gerrit.ovirt.org/12050 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0cea3a3c2a64eca78740d921680faeeb0c5473c7 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