Yaniv Bronhaim has uploaded a new change for review.

Change subject: webadmin: Blocking port field in edit host popup and refactor 
its name
......................................................................

webadmin: Blocking port field in edit host popup and refactor its name

Was a bug, before we locked the vdsm port (54321) field, instead of the
auth port. To avoid such confusions this patch also modifies the name of the
field from hostPort to authSshPort.

Change-Id: Ic2af8e3168d7ac9688079f6a32edc71d79f997b0
Signed-off-by: Yaniv Bronhaim <[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/EditHostModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
M 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
M 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
8 files changed, 24 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/42/18342/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 ea45de8..e3f1741 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
@@ -467,7 +467,7 @@
         host.setVdsName((String) model.getName().getEntity());
         host.setHostName((String) model.getHost().getEntity());
         host.setPort((Integer) model.getPort().getEntity());
-        host.setSshPort((Integer) model.getHostPort().getEntity());
+        host.setSshPort((Integer) model.getAuthSshPort().getEntity());
         host.setSshUsername(model.getUserName().getEntity().toString());
         
host.setSshKeyFingerprint(model.getFetchSshFingerprint().getEntity().toString());
         host.setVdsGroupId(((VDSGroup) 
model.getCluster().getSelectedItem()).getId());
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 f5b779a..ed3cd62 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
@@ -1601,7 +1601,7 @@
         host.setVdsName((String) model.getName().getEntity());
         host.setHostName((String) model.getHost().getEntity());
         host.setPort(Integer.parseInt(model.getPort().getEntity().toString()));
-        
host.setSshPort(Integer.parseInt(model.getHostPort().getEntity().toString()));
+        
host.setSshPort(Integer.parseInt(model.getAuthSshPort().getEntity().toString()));
         host.setSshUsername(model.getUserName().getEntity().toString());
         
host.setSshKeyFingerprint(model.getFetchSshFingerprint().getEntity().toString());
         host.setVdsGroupId(((VDSGroup) 
model.getCluster().getSelectedItem()).getId());
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java
index 41eb9e2..5ca67f0 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/EditHostModel.java
@@ -38,10 +38,10 @@
     protected void setAllowChangeHost(VDS vds) {
         if (vds.getStatus() != VDSStatus.InstallFailed) {
             getHost().setIsChangable(false);
-            getPort().setIsChangable(false);
+            getAuthSshPort().setIsChangable(false);
         } else {
             getHost().setIsChangable(true);
-            getPort().setIsChangable(true);
+            getAuthSshPort().setIsChangable(true);
         }
     }
 
@@ -64,7 +64,7 @@
     }
 
     @Override
-    protected void setHostPort(VDS vds) {
+    protected void setPort(VDS vds) {
         getPort().setEntity(vds.getPort());
     }
 
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 046f3b5..89c776a 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
@@ -849,7 +849,7 @@
         host.setComment((String) model.getComment().getEntity());
         host.setHostName((String) model.getHost().getEntity());
         host.setPort(Integer.parseInt(model.getPort().getEntity().toString()));
-        
host.setSshPort(Integer.parseInt(model.getHostPort().getEntity().toString()));
+        
host.setSshPort(Integer.parseInt(model.getAuthSshPort().getEntity().toString()));
         boolean sshUsernameSet = model.getUserName().getEntity() != null;
         host.setSshUsername(sshUsernameSet ? 
model.getUserName().getEntity().toString() : null);
         boolean sshFpSet = model.getFetchSshFingerprint().getEntity() != null;
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 ec115ae..be944e1 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
@@ -176,16 +176,16 @@
         privateFetchSshFingerprint = value;
     }
 
-    private EntityModel privateHostPort;
+    private EntityModel privateAuthSshPort;
 
-    public EntityModel getHostPort()
+    public EntityModel getAuthSshPort()
     {
-        return privateHostPort;
+        return privateAuthSshPort;
     }
 
-    private void setHostPort(EntityModel value)
+    private void setAuthSshPort(EntityModel value)
     {
-        privateHostPort = value;
+        privateAuthSshPort = value;
     }
 
     private EntityModel privateUserPassword;
@@ -873,8 +873,8 @@
         setHost(new EntityModel());
         setPkSection(new EntityModel());
         setPasswordSection(new EntityModel());
-        setHostPort(new EntityModel());
-        getHostPort().setEntity(constants.defaultHostSSHPort());
+        setAuthSshPort(new EntityModel());
+        getAuthSshPort().setEntity(constants.defaultHostSSHPort());
         setUserName(new EntityModel());
         getUserName().setEntity(constants.defaultUserName());
         // TODO: remove setIsChangable when configured ssh username is enabled
@@ -1583,7 +1583,7 @@
                 new HostAddressValidation() });
 
         getPort().validateEntity(new IValidation[] {new NotEmptyValidation(), 
new IntegerValidation(1, 65535)});
-        getHostPort().validateEntity(new IValidation[] {new 
NotEmptyValidation(), new IntegerValidation(1, 65535)});
+        getAuthSshPort().validateEntity(new IValidation[] {new 
NotEmptyValidation(), new IntegerValidation(1, 65535)});
 
         if ((Boolean) getConsoleAddressEnabled().getEntity()) {
             getConsoleAddress().validateEntity(new IValidation[] {new 
NotEmptyValidation(), new HostAddressValidation()});
@@ -1664,7 +1664,8 @@
         getHost().setEntity(vds.getHostName());
         getFetchSshFingerprint().setEntity(vds.getSshKeyFingerprint());
         getUserName().setEntity(vds.getSshUsername());
-        setHostPort(vds);
+        getAuthSshPort().setEntity(vds.getSshPort());
+        setPort(vds);
         boolean consoleAddressEnabled = vds.getConsoleAddress() != null;
         getConsoleAddressEnabled().setEntity(consoleAddressEnabled);
         getConsoleAddress().setEntity(vds.getConsoleAddress());
@@ -1768,7 +1769,7 @@
 
     protected abstract void updateHosts();
 
-    protected abstract void setHostPort(VDS vds);
+    protected abstract void setPort(VDS vds);
 
     public abstract boolean showNetworkProviderTab();
 }
diff --git 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java
index b78864e..01b3301 100644
--- 
a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java
+++ 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/NewHostModel.java
@@ -150,7 +150,7 @@
     }
 
     @Override
-    protected void setHostPort(VDS vds) {
+    protected void setPort(VDS vds) {
         // If port is "0" then we set it to the default port
         if (vds.getPort() == 0) {
             getPort().setEntity(NewHostDefaultPort);
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
index e2ef174..2665797 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.java
@@ -155,9 +155,9 @@
     EntityModelTextBoxEditor hostAddressEditor;
 
     @UiField
-    @Path(value = "hostPort.entity")
-    @WithElementId("hostPort")
-    EntityModelTextBoxEditor hostPortEditor;
+    @Path(value = "authSshPort.entity")
+    @WithElementId("authSshPort")
+    EntityModelTextBoxEditor authSshPortEditor;
 
     @UiField
     @Path(value = "userPassword.entity")
@@ -547,7 +547,7 @@
         userNameEditor.setLabel(constants.hostPopupUsernameLabel());
         commentEditor.setLabel(constants.commentLabel());
         hostAddressEditor.setLabel(constants.hostPopupHostAddressLabel());
-        hostPortEditor.setLabel(constants.hostPopupPortLabel());
+        authSshPortEditor.setLabel(constants.hostPopupPortLabel());
         authLabel.setText(constants.hostPopupAuthLabel());
 
         fingerprintLabel.setText(constants.hostPopupHostFingerprintLabel());
@@ -973,7 +973,7 @@
         providerSearchFilterLabel.setTabIndex(nextTabIndex++);
         nameEditor.setTabIndex(nextTabIndex++);
         hostAddressEditor.setTabIndex(nextTabIndex++);
-        hostPortEditor.setTabIndex(nextTabIndex++);
+        authSshPortEditor.setTabIndex(nextTabIndex++);
         userNameEditor.setTabIndex(nextTabIndex++);
         rbPassword.setTabIndex(nextTabIndex++);
         passwordEditor.setTabIndex(nextTabIndex++);
diff --git 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
index fe40e8e..d5b41a7 100644
--- 
a/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
+++ 
b/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/host/HostPopupView.ui.xml
@@ -247,7 +247,7 @@
                                     <e:EntityModelTextBoxEditor 
ui:field="nameEditor"/>
                                     <e:EntityModelTextBoxEditor 
ui:field="commentEditor"/>
                                     <e:EntityModelTextBoxEditor 
ui:field="hostAddressEditor" />
-                                    <e:EntityModelTextBoxEditor 
ui:field="hostPortEditor"/>
+                                    <e:EntityModelTextBoxEditor 
ui:field="authSshPortEditor"/>
                                     <g:VerticalPanel 
addStyleNames="{style.content}">
                                         <g:Label ui:field="authLabel" 
addStyleNames="{style.headerAuthLabel}"/>
                                         <e:EntityModelTextBoxEditor 
ui:field="userNameEditor"/>


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

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

Reply via email to