Ravi Nori has uploaded a new change for review.

Change subject: webadmin: New Data Center "Guide Me" does not reflect hosts 
presence
......................................................................

webadmin: New Data Center "Guide Me" does not reflect hosts presence

DataCenter guide me dialog does not reflect the
presence of hosts. "Configure Host" button appears
under "There are still unconfigured entities:"
even when hosts exist in the datacenter.

Change-Id: I6dbbac65e439f0d58b4104da8e1acb2860e7556c
Bug-Url: https://bugzilla.redhat.com/1023330
Signed-off-by: Ravi Nori <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
2 files changed, 13 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/24833/1

diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
index 59f4c4e..950deb7 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
@@ -86,6 +86,9 @@
     public final String DataCenterConfigureHostsAction = 
ConstantsManager.getInstance()
             .getConstants()
             .dataCenterConfigureHostsAction();
+    public final String DataCenterAddAnotherHostAction = 
ConstantsManager.getInstance()
+            .getConstants()
+            .dataCenterAddAnotherHostAction();
     public final String DataCenterSelectHostsAction = 
ConstantsManager.getInstance()
             .getConstants()
             .dataCenterSelectHostsAction();
@@ -298,8 +301,13 @@
         tempVar.setIsExecutionAllowed(clusters.size() > 0);
         UICommand addHostAction = tempVar;
 
-        addHostAction.setTitle(DataCenterConfigureHostsAction);
-        getCompulsoryActions().add(addHostAction);
+        if (hosts.isEmpty()){
+            addHostAction.setTitle(DataCenterConfigureHostsAction);
+            getCompulsoryActions().add(addHostAction);
+        } else {
+            addHostAction.setTitle(DataCenterAddAnotherHostAction);
+            getOptionalActions().add(addHostAction);
+        }
 
         // Select host action.
         UICommand selectHostAction = new UICommand("SelectHost", this); 
//$NON-NLS-1$
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
index a6a1529..f17fc10 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java
@@ -950,6 +950,9 @@
     @DefaultStringValue("Configure Host")
     String dataCenterConfigureHostsAction();
 
+    @DefaultStringValue("Add another Host")
+    String dataCenterAddAnotherHostAction();
+
     @DefaultStringValue("Select Hosts")
     String dataCenterSelectHostsAction();
 


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

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

Reply via email to