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
thei field from hostPort to authSshPort.

Change-Id: I53d42bbefb33396730ec8228d979953e5e079783
Reviewed-in: http://gerrit.ovirt.org/#/c/18342
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=997542
Signed-off-by: Yaniv Bronhaim <ybron...@redhat.com>
---
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/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
7 files changed, 23 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/24/18624/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 d261dbe..5b40f61 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
@@ -468,7 +468,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 675e47f..805c277 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
@@ -1602,7 +1602,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 42c9103..9f44ef7 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
@@ -36,10 +36,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);
         }
     }
 
@@ -61,7 +61,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/HostModel.java
 
b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostModel.java
index 7d1e7f7..5561255 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
@@ -177,16 +177,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;
@@ -874,8 +874,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
@@ -1585,7 +1585,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()});
@@ -1666,7 +1666,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 ceb1166..1b69f4f 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());
@@ -972,7 +972,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 5b704ab..a48752f 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
@@ -251,7 +251,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/18624
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53d42bbefb33396730ec8228d979953e5e079783
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Yaniv Bronhaim <ybron...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to