Alexey Chub has uploaded a new change for review.

Change subject: webadmin: "Power management" confirmation fix (#848133)
......................................................................

webadmin: "Power management" confirmation fix (#848133)

Change-Id: I7636e84ffc66ae6fda3d3bc5f5c48d9e1449da6a
Signed-off-by: Alexey Chub <[email protected]>
---
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/clusters/ClusterGuideModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
M 
frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
4 files changed, 27 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/7670/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 057cb88..0d2ec0e 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
@@ -511,7 +511,6 @@
 
         HostModel hostModel = (HostModel) getWindow();
         hostModel.setIsPowerManagementTabSelected(true);
-        hostModel.getIsPm().setEntity(true);
     }
 
     @Override
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 ce134ac..707a26a 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
@@ -1678,7 +1678,6 @@
 
         HostModel hostModel = (HostModel) getWindow();
         hostModel.setIsPowerManagementTabSelected(true);
-        hostModel.getIsPm().setEntity(true);
     }
 
     @Override
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
index 8d43d90..30e827f 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
@@ -622,14 +622,18 @@
                     
innerHostModel.getDataCenter().setSelectedItem(Linq.FirstOrDefault(dataCenters));
                 }
 
-                UICommand tempVar = new UICommand("OnSaveFalse", 
hostListModel); //$NON-NLS-1$
-                
tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok());
-                tempVar.setIsDefault(true);
-                innerHostModel.getCommands().add(tempVar);
-                UICommand tempVar2 = new UICommand("Cancel", hostListModel); 
//$NON-NLS-1$
-                
tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel());
-                tempVar2.setIsCancel(true);
-                innerHostModel.getCommands().add(tempVar2);
+
+                UICommand command;
+
+                command = new UICommand("OnSaveFalse", hostListModel); 
//$NON-NLS-1$
+                
command.setTitle(ConstantsManager.getInstance().getConstants().ok());
+                command.setIsDefault(true);
+                innerHostModel.getCommands().add(command);
+
+                command = new UICommand("Cancel", hostListModel); //$NON-NLS-1$
+                
command.setTitle(ConstantsManager.getInstance().getConstants().cancel());
+                command.setIsCancel(true);
+                innerHostModel.getCommands().add(command);
             }
         };
         AsyncDataProvider.GetDataCenterList(_asyncQuery);
@@ -699,15 +703,18 @@
                 confirmModel.setHashName("power_management_configuration"); 
//$NON-NLS-1$
                 
confirmModel.setMessage(ConstantsManager.getInstance().getConstants().youHavntConfigPmMsg());
 
-                UICommand tempVar =
-                        new UICommand(approveInitiated ? 
"OnSaveInternalFromApprove" : "OnSaveInternalNotFromApprove", this); 
//$NON-NLS-1$ //$NON-NLS-2$
-                
tempVar.setTitle(ConstantsManager.getInstance().getConstants().ok());
-                tempVar.setIsDefault(true);
-                confirmModel.getCommands().add(tempVar);
-                UICommand tempVar2 = new UICommand("CancelConfirmFocusPM", 
this); //$NON-NLS-1$
-                
tempVar2.setTitle(ConstantsManager.getInstance().getConstants().cancel());
-                tempVar2.setIsCancel(true);
-                confirmModel.getCommands().add(tempVar2);
+
+                UICommand command;
+
+                command = new UICommand(approveInitiated ? 
"OnSaveInternalFromApprove" : "OnSaveInternalNotFromApprove", this); 
//$NON-NLS-1$ //$NON-NLS-2$
+                
command.setTitle(ConstantsManager.getInstance().getConstants().ok());
+                command.setIsDefault(true);
+                confirmModel.getCommands().add(command);
+
+                command = new UICommand("CancelConfirmFocusPM", this); 
//$NON-NLS-1$
+                
command.setTitle(ConstantsManager.getInstance().getConstants().configurePowerManagement());
+                command.setIsCancel(true);
+                confirmModel.getCommands().add(command);
             }
             else
             {
@@ -732,7 +739,6 @@
     {
         HostModel hostModel = (HostModel) getWindow();
         hostModel.setIsPowerManagementTabSelected(true);
-        hostModel.getIsPm().setEntity(true);
 
         setConfirmWindow(null);
     }
diff --git 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
index e1f6076..dedb76a 100644
--- 
a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
+++ 
b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/Constants.java
@@ -28,6 +28,9 @@
     @DefaultStringValue("Error")
     String errorTitle();
 
+    @DefaultStringValue("Configure Power Management")
+    String configurePowerManagement();
+
     @DefaultStringValue("Create New Bond")
     String createNewBondTitle();
 


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

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

Reply via email to