qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1555217 - in /qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java: org/apache/qpid/server/management/plugin/HttpManagement.java resources/addPort.html resources/js/qpid/management/addPort.js
Date Fri, 03 Jan 2014 19:27:29 GMT
Author: rgodfrey
Date: Fri Jan  3 19:27:29 2014
New Revision: 1555217

URL: http://svn.apache.org/r1555217
Log:
QPID-5437 : [Java Broker] Allow HTTP ports to be bound only to specific interfaces

Modified:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java?rev=1555217&r1=1555216&r2=1555217&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/HttpManagement.java
Fri Jan  3 19:27:29 2014
@@ -261,6 +261,11 @@ public class HttpManagement extends Abst
                 throw new IllegalArgumentException("Unexpected transport on port " + port.getName()
+ ":" + transports);
             }
             lastPort = port.getPort();
+            String bindingAddress = port.getBindingAddress();
+            if(bindingAddress != null && !bindingAddress.trim().equals("") &&
!bindingAddress.trim().equals("*"))
+            {
+                connector.setHost(bindingAddress.trim());
+            }
             connector.setPort(port.getPort());
             server.addConnector(connector);
         }

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html?rev=1555217&r1=1555216&r2=1555217&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
Fri Jan  3 19:27:29 2014
@@ -42,9 +42,11 @@
                     data-dojo-props="name:'authenticationProvider',label:'Authentication
Provider*:', searchAttr: 'name', required: true, placeHolder: 'Select Provider'">
                 </select>
             </div>
-            <div id="formAddPort:fieldsAMQP">
+            <div id="formAddPort:fieldsBindingAddress">
                 <input id="formAddPort.bindingAddress" type="text" name="bindingAddress"
placeholder="*"
-                   dojoType="dijit.form.TextBox" data-dojo-props="label: 'Binding address:'"/>
+                       dojoType="dijit.form.TextBox" data-dojo-props="label: 'Binding address:'"/>
+            </div>
+            <div id="formAddPort:fieldsAMQP">
                 <input id="formAddPort.protocolsDefault" type="checkbox" checked="checked"
                    dojoType="dijit.form.CheckBox" data-dojo-props="label: 'Support default
protocols:'"/>
                 <select id="formAddPort.protocolsAMQP" name="protocols" data-dojo-type="dijit.form.MultiSelect"
multiple="true"

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js?rev=1555217&r1=1555216&r2=1555217&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
(original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
Fri Jan  3 19:27:29 2014
@@ -246,13 +246,15 @@ define(["dojo/_base/xhr",
                                 transportWidget.set("disabled", disableTransportWidget);
                                 registry.byId("formAddPort.authenticationProvider").set("disabled",
isRMI);
                                 registry.byId("formAddPort:fieldsAuthenticationProvider").domNode.style.display
= isRMI? "none" : "block";
+                                registry.byId("formAddPort:fieldsBindingAddress").domNode.style.display
= newValue == "JMX" ? "none" : "block";
+
                             });
 
                             theForm = registry.byId("formAddPort");
 
                             var containers = ["formAddPort:fields", "formAddPort:fieldsTransportSSL",
"formAddPort:fieldsAMQP",
                                               "formAddPort:fieldsJMX", "formAddPort:fieldsHTTP",
"formAddPort:transport",
-                                              "formAddPort:fieldsClientAuthCheckboxes", "formAddPort:fieldsAuthenticationProvider"];
+                                              "formAddPort:fieldsClientAuthCheckboxes", "formAddPort:fieldsAuthenticationProvider",
"formAddPort:fieldsBindingAddress"];
                             var labelWidthValue = "200";
                             for(var i = 0; i < containers.length; i++)
                             {
@@ -448,8 +450,10 @@ define(["dojo/_base/xhr",
                        {
                            var httpProtocolsWidget = registry.byId("formAddPort.protocolsHTTP");
                            httpProtocolsWidget.set("disabled", false);
-                           httpProtocolsWidget.set("value", protocols[0])
+                           httpProtocolsWidget.set("value", protocols[0]);
                            typeWidget.set("value", "HTTP");
+                           var addressWidget = registry.byId("formAddPort.bindingAddress");
+                           addressWidget.set("value", port.bindingAddress)
                        }
                        registry.byId("formAddPort:fields" + typeWidget.value).domNode.style.display
= "block";
                        typeWidget.set("disabled", true);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message