diff options
| author | Keith Wall <kwall@apache.org> | 2014-07-16 11:07:18 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-07-16 11:07:18 +0000 |
| commit | e9f4e542b245f40cdcbe4694657b19e636bbecaa (patch) | |
| tree | e29da884b37fb3e27da1e7bd6b92ab95c9f494c9 /qpid/java/broker-plugins | |
| parent | ee4da00c15c9af165766060dc365255b910c9381 (diff) | |
| download | qpid-python-e9f4e542b245f40cdcbe4694657b19e636bbecaa.tar.gz | |
QPID-5413: [Java Broker] Add virtualhostnode/virtualhost creation dialogue
Work by Andrew MacBean <macbean@apache.org> and me.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610967 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
30 files changed, 925 insertions, 604 deletions
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/add.html b/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/add.html index 76684c0d63..452005d144 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/add.html +++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/add.html @@ -20,23 +20,23 @@ --> <div> <div style="clear:both"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Name*:</div> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Name*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyNodeName" + <input type="text" id="addVirtualHostNode.name" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'name', - placeHolder: 'node name', + placeHolder: 'virtual host node name', required: true, - missingMessage: 'A node name must be supplied', - title: 'Enter node name', + missingMessage: 'A virtual host node name must be supplied', + title: 'Enter virtual host node name', pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" /> </div> </div> <div style="clear:both"> <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store path*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyStorePath" + <input type="text" id="addVirtualHostNode.storePath" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'storePath', @@ -46,16 +46,5 @@ title: 'Enter store path'" /> </div> </div> - <div style="clear:both;display:none"> - <div class="formLabel-labelCell" style="float:left; width: 300px;">Combined store:</div> - <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyMessageStoreProvider" - data-dojo-type="dijit/form/CheckBox" - data-dojo-props=" - name: 'messageStoreProvider', - required: true, - checked: true" /> - </div> - </div> <div style="clear:both"></div> </div> diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js index 3a9b23274d..ccdcf643fb 100644 --- a/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js +++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js @@ -33,18 +33,18 @@ define(["dojo/_base/xhr", "dojo/domReady!"], function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { return { - show: function() { - var node = dom.byId("addVirtualHost.storeSpecificDiv"); + show: function(poolSpecificDivId, formFieldPrefix, htmlUrl) { + var node = dom.byId(poolSpecificDivId); var that = this; array.forEach(registry.toArray(), function(item) { - if(item.id.substr(0,33) == "formAddVirtualHost.specific.store") { + if(item.id.substr(0,formFieldPrefix.length) == formFieldPrefix) { item.destroyRecursive(); } }); - xhr.get({url: "virtualhost/store/memory/add.html", + xhr.get({url: htmlUrl, sync: true, load: function(data) { node.innerHTML = data; diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/virtualhost/store/pool/bonecp/add.js b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/virtualhost/store/pool/bonecp/add.js deleted file mode 100644 index f051116868..0000000000 --- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/virtualhost/store/pool/bonecp/add.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -define(["dojo/_base/xhr", - "dojo/dom", - "dojo/dom-construct", - "dojo/_base/window", - "dijit/registry", - "dojo/parser", - "dojo/_base/array", - "dojo/_base/event", - "dojo/_base/json", - "dojo/string", - "dojo/store/Memory", - "dijit/form/FilteringSelect", - "dojo/domReady!"], - function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { - return { - show: function() { - var node = dom.byId("addVirtualHost.poolSpecificDiv"); - var that = this; - - array.forEach(registry.toArray(), - function(item) { - if(item.id.substr(0,39) == "formAddVirtualHost.specific.store.pool.") { - item.destroyRecursive(); - } - }); - - xhr.get({url: "virtualhost/store/pool/bonecp/add.html", - sync: true, - load: function(data) { - node.innerHTML = data; - parser.parse(node); - - }}); - } - }; - }); diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html index 5b053849a3..c9405991a6 100644 --- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html +++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html @@ -19,22 +19,37 @@ <tr> <td class="tableContainer-labelCell" style="width: 300px;"><strong>Partition Count: </strong></td> <td class="tableContainer-valueCell"> - <input data-dojo-type="dijit/form/NumberSpinner" id="formAddVirtualHost.specific.store.pool.parititions" - name="partitionCount" value="4" smallDelta="1" constraints="{min:1,max:1000,places:0}"/> + <input data-dojo-type="dijit/form/NumberSpinner" + id="formAddVirtualHost.qpid.jdbcstore.bonecp.partitionCount" + name="qpid.jdbcstore.bonecp.partitionCount" + value="4" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> </td> </tr> <tr> - <td class="tableContainer-labelCell" style="width: 300px;"><strong>Min Conn per Partition: </strong></td> + <td class="tableContainer-labelCell" style="width: 300px;"><strong>Minimum connections per Partition:</strong></td> <td class="tableContainer-valueCell"> - <input dojoType="dijit/form/NumberSpinner" id="formAddVirtualHost.specific.store.pool.minConn" - name="minConnectionsPerPartition" value="5" smallDelta="1" constraints="{min:1,max:1000,places:0}"/> + <input dojoType="dijit/form/NumberSpinner" + id="formAddVirtualHost.qpid.jdbcstore.bonecp.minConnectionsPerPartition" + name="qpid.jdbcstore.bonecp.minConnectionsPerPartition" + value="5" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> </td> </tr> <tr> - <td class="tableContainer-labelCell" style="width: 300px;"><strong>Max Conn per Partition: </strong></td> + <td class="tableContainer-labelCell" style="width: 300px;"><strong>Maximum connections per Partition: </strong></td> <td class="tableContainer-valueCell"> - <input dojoType="dijit/form/NumberSpinner" id="formAddVirtualHost.specific.store.pool.maxCon" - name="maxConnectionsPerPartition" value="10" smallDelta="1" constraints="{min:1,max:1000,places:0}"/> + <input dojoType="dijit/form/NumberSpinner" + id="formAddVirtualHost.qpid.jdbcstore.bonecp.maxConnectionsPerPartition" + name="qpid.jdbcstore.bonecp.maxConnectionsPerPartition" + value="10" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> </td> </tr> diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html new file mode 100644 index 0000000000..5958af5e6c --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html @@ -0,0 +1,56 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one or more + ~ contributor license agreements. See the NOTICE file distributed with + ~ this work for additional information regarding copyright ownership. + ~ The ASF licenses this file to You under the Apache License, Version 2.0 + ~ (the "License"); you may not use this file except in compliance with + ~ the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> +<table class="tableContainer-table tableContainer-table-horiz"> + + <tr> + <td class="tableContainer-labelCell" style="width: 300px;"><strong>Partition Count: </strong></td> + <td class="tableContainer-valueCell"> + <input data-dojo-type="dijit/form/NumberSpinner" + id="formAddVirtualHostNode.qpid.jdbcstore.bonecp.partitionCount" + name="qpid.jdbcstore.bonecp.partitionCount" + value="4" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> + </td> + </tr> + <tr> + <td class="tableContainer-labelCell" style="width: 300px;"><strong>Minimum connections per Partition:</strong></td> + <td class="tableContainer-valueCell"> + <input dojoType="dijit/form/NumberSpinner" + id="formAddVirtualHostNode.qpid.jdbcstore.bonecp.minConnectionsPerPartition" + name="qpid.jdbcstore.bonecp.minConnectionsPerPartition" + value="5" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> + </td> + </tr> + <tr> + <td class="tableContainer-labelCell" style="width: 300px;"><strong>Maximum connections per Partition: </strong></td> + <td class="tableContainer-valueCell"> + <input dojoType="dijit/form/NumberSpinner" + id="formAddVirtualHostNode.qpid.jdbcstore.bonecp.maxConnectionsPerPartition" + name="qpid.jdbcstore.bonecp.maxConnectionsPerPartition" + value="10" + smallDelta="1" + constraints="{min:1,max:1000,places:0}" + contextvar="true"/> + </td> + </tr> + +</table> diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java index ed25d97af0..6764b7b715 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/GenericJDBCConfigurationStore.java @@ -110,7 +110,7 @@ public class GenericJDBCConfigurationStore extends AbstractJDBCConfigurationStor catch (SQLException e) { throw new StoreException("Failed to create connection provider for connectionUrl: " + _connectionURL + - " and username: " + settings.getUsername()); + " and username: " + settings.getUsername(), e); } _blobType = details.getBlobType(); _varBinaryType = details.getVarBinaryType(); diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/pool/none/add.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js index 7276737873..ccdcf643fb 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/pool/none/add.js +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js @@ -33,18 +33,18 @@ define(["dojo/_base/xhr", "dojo/domReady!"], function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { return { - show: function() { - var node = dom.byId("addVirtualHost.poolSpecificDiv"); + show: function(poolSpecificDivId, formFieldPrefix, htmlUrl) { + var node = dom.byId(poolSpecificDivId); var that = this; array.forEach(registry.toArray(), function(item) { - if(item.id.substr(0,39) == "formAddVirtualHost.specific.store.pool.") { + if(item.id.substr(0,formFieldPrefix.length) == formFieldPrefix) { item.destroyRecursive(); } }); - xhr.get({url: "virtualhost/store/pool/none/add.html", + xhr.get({url: htmlUrl, sync: true, load: function(data) { node.innerHTML = data; diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js new file mode 100644 index 0000000000..12279f2455 --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +define(["dojo/_base/xhr", + "dojo/_base/array", + "dojo/parser", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dojo/string", + "dojo/store/Memory", + "dijit/registry", + "dojo/text!virtualhost/jdbc/add.html", + "dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory", + "dijit/form/ValidationTextBox", + "dijit/form/CheckBox", + "dojo/domReady!"], + function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, poolTypeJsonString) + { + return { + show: function (data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + + var poolTypes = json.parse(poolTypeJsonString); + var poolTypesData = []; + for (var i =0 ; i < poolTypes.length; i++) + { + poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]}; + } + var poolTypesStore = new Memory({ data: poolTypesData }); + var poolTypeControl = registry.byId("addVirtualHost.connectionPoolType"); + poolTypeControl.set("store", poolTypesStore); + + var poolTypeFieldsDiv = dom.byId("addVirtualHost.poolSpecificDiv"); + poolTypeControl.on("change", + function(type) + { + if(type && string.trim(type) != "") + { + var widgets = registry.findWidgets(poolTypeFieldsDiv); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(poolTypeFieldsDiv); + require(["qpid/management/store/pool/"+type.toLowerCase()+"/add"], + function(poolType) + { + poolType.show("addVirtualHost.poolSpecificDiv", "formAddVirtualHost.qpid.jdbcstore.bonecp", "virtualhost/store/pool/"+type.toLowerCase()+"/add.html"); + }); + } + } + ); + } + }; + } +); diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js deleted file mode 100644 index 21c0c17de9..0000000000 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js +++ /dev/null @@ -1,93 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -define(["dojo/_base/xhr", - "dojo/dom", - "dojo/dom-construct", - "dojo/_base/window", - "dijit/registry", - "dojo/parser", - "dojo/_base/array", - "dojo/_base/event", - "dojo/_base/json", - "dojo/string", - "dojo/store/Memory", - "dijit/form/FilteringSelect", - "dojo/domReady!"], - function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { - return { - show: function() { - var node = dom.byId("addVirtualHost.storeSpecificDiv"); - var that = this; - - array.forEach(registry.toArray(), - function(item) { - if(item.id.substr(0,34) == "formAddVirtualHost.specific.store.") { - item.destroyRecursive(); - } - }); - - xhr.get({url: "virtualhost/store/jdbc/add.html", - sync: true, - load: function(data) { - node.innerHTML = data; - parser.parse(node); - - if (that.hasOwnProperty("poolTypeChooser")) - { - that.poolTypeChooser.destroy(); - } - - var selectPoolType = function(type) { - if(type && string.trim(type) != "") { - require(["qpid/management/virtualhost/store/pool/"+type.toLowerCase()+"/add"], - function(poolType) - { - poolType.show(); - }); - } - } - - xhr.get({ - sync: true, - url: "service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory", - handleAs: "json" - }).then( - function(data) { - var poolTypes = data; - var poolTypesData = []; - for (var i =0 ; i < poolTypes.length; i++) - { - poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]}; - } - var poolTypesStore = new Memory({ data: poolTypesData }); - var poolTypesDiv = dom.byId("addVirtualHost.specific.selectPoolType"); - var input = construct.create("input", {id: "addPoolType", required: false}, poolTypesDiv); - that.poolTypeChooser = new FilteringSelect({ id: "addVirtualHost.specific.store.poolType", - name: "connectionPoolType", - store: poolTypesStore, - searchAttr: "name", required: false, - onChange: selectPoolType }, input); - }); - - }}); - } - }; - }); diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js index 1f8b8d39d3..96e96eb454 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js @@ -47,10 +47,10 @@ define(["dojo/_base/xhr", poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]}; } var poolTypesStore = new Memory({ data: poolTypesData }); - var poolTypeControl = registry.byId("addVirtualHostNode.jdbcConnectionPoolType"); + var poolTypeControl = registry.byId("addVirtualHostNode.connectionPoolType"); poolTypeControl.set("store", poolTypesStore); - var poolTypeFieldsDiv = dom.byId("addVirtualHost.poolSpecificDiv"); + var poolTypeFieldsDiv = dom.byId("addVirtualHostNode.poolSpecificDiv"); poolTypeControl.on("change", function(type) { @@ -59,10 +59,10 @@ define(["dojo/_base/xhr", var widgets = registry.findWidgets(poolTypeFieldsDiv); array.forEach(widgets, function(item) { item.destroyRecursive();}); domConstruct.empty(poolTypeFieldsDiv); - require(["qpid/management/virtualhost/store/pool/"+type.toLowerCase()+"/add"], + require(["qpid/management/store/pool/"+type.toLowerCase()+"/add"], function(poolType) { - poolType.show(); + poolType.show("addVirtualHostNode.poolSpecificDiv", "formAddVirtualHostNode.qpid.jdbcstore.bonecp", "virtualhostnode/store/pool/" + type.toLowerCase() + "/add.html"); }); } } diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/add.html new file mode 100644 index 0000000000..6555faf2f9 --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/add.html @@ -0,0 +1,76 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> +<div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">JDBC Url*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.connectionUrl" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'connectionUrl', + placeHolder: 'jdbc:provider:info', + required: true, + missingMessage: 'JDBC URL must be supplied', + title: 'Enter JDBC URL', + pattern: '^jdbc:.*:.*$'"/> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Username*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.username" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'username', + placeHolder: 'username', + required: true, + missingMessage: 'Username must be supplied', + title: 'Enter username'" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Password*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="password" id="addVirtualHost.password" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'password', + placeHolder: 'password', + required: true, + missingMessage: 'Password must be supplied', + title: 'Enter password'" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Connection Pool*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.connectionPoolType" + data-dojo-type="dijit/form/FilteringSelect" + data-dojo-props=" + name: 'connectionPoolType', + required: true, + missingMessage: 'Connection Pool type must be supplied', + title: 'Select Connection Pool', + placeHolder: 'Select pool type'" /> + </div> + </div> + + <div style="clear:both"></div> + <div id="addVirtualHost.poolSpecificDiv"></div> +</div> diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html index e08e709253..b2b8de862e 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html @@ -20,36 +20,63 @@ --> <div> <div style="clear:both"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Name*:</div> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Name*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.jdbcNodeName" + <input type="text" id="addVirtualHostNode.name" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'name', - placeHolder: 'node name', + placeHolder: 'virtual host node name', required: true, - missingMessage: 'A node name must be supplied', - title: 'Enter node name', + missingMessage: 'A virtual host node name must be supplied', + title: 'Enter virtual host node name', pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" /> </div> </div> <div style="clear:both"> <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">JDBC Url*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.jdbcConnectionUrl" + <input type="text" id="addVirtualHostNode.connectionUrl" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'connectionUrl', placeHolder: 'jdbc:provider:info', required: true, missingMessage: 'JDBC URL must be supplied', - title: 'Enter JDBC URL'" /> + title: 'Enter JDBC URL', + pattern: '^jdbc:.*:.*$'"/> </div> </div> <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Username*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHostNode.username" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'username', + placeHolder: 'username', + required: true, + missingMessage: 'Username must be supplied', + title: 'Enter username'" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Password*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="password" id="addVirtualHostNode.password" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'password', + placeHolder: 'password', + required: true, + missingMessage: 'Password must be supplied', + title: 'Enter password'" /> + </div> + </div> + <div style="clear:both"> <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Connection Pool*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.jdbcConnectionPoolType" + <input type="text" id="addVirtualHostNode.connectionPoolType" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props=" name: 'connectionPoolType', @@ -59,17 +86,7 @@ placeHolder: 'Select pool type'" /> </div> </div> - <div style="clear:both;display:none"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Combined store:</div> - <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyMessageStoreProvider" - data-dojo-type="dijit/form/CheckBox" - data-dojo-props=" - name: 'messageStoreProvider', - required: true, - checked: true" /> - </div> - </div> + <div style="clear:both"></div> - <div id="addVirtualHost.poolSpecificDiv"></div> + <div id="addVirtualHostNode.poolSpecificDiv"></div> </div> diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/memory/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html index 2666129a1f..2666129a1f 100644 --- a/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/store/memory/add.html +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNode.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNode.html deleted file mode 100644 index d5e8d44e98..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNode.html +++ /dev/null @@ -1,48 +0,0 @@ -<!-- - - - - Licensed to the Apache Software Foundation (ASF) under one - - or more contributor license agreements. See the NOTICE file - - distributed with this work for additional information - - regarding copyright ownership. The ASF licenses this file - - to you under the Apache License, Version 2.0 (the - - "License"); you may not use this file except in compliance - - with the License. You may obtain a copy of the License at - - - - http://www.apache.org/licenses/LICENSE-2.0 - - - - Unless required by applicable law or agreed to in writing, - - software distributed under the License is distributed on an - - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - - KIND, either express or implied. See the License for the - - specific language governing permissions and limitations - - under the License. - - - --> -<div class="dijitHidden"> - <div data-dojo-type="dijit.Dialog" style="width:600px;" data-dojo-props="title:'Add Virtual Host Node And Virtual Host'" id="addVirtualHostNode"> - <form id="addVirtualHostNode.form" method="post" data-dojo-type="dijit/form/Form"> - <div> - <div style="clear:both"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Type*:</div> - <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell"> - <select id="addVirtualHostNode.type" data-dojo-type="dijit/form/FilteringSelect" - data-dojo-props=" - name: 'type', - required: true, - disabled: true, - placeHolder: 'select node type', - title: 'Select virtual host node type', - searchAttr: 'name'"> - </select> - </div> - </div> - <div style="clear:both"></div> - <div id="addVirtualHostNode.typeFields"></div> - </div> - <div class="dijitDialogPaneActionBar"> - <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.saveButton" data-dojo-props="label: 'Save'" type="submit">Save</button> - <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.cancelButton" data-dojo-props="label: 'Cancel'" ></button> - </div> - </form> - </div> -</div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNodeAndVirtualHost.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNodeAndVirtualHost.html new file mode 100644 index 0000000000..3e65076a4e --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNodeAndVirtualHost.html @@ -0,0 +1,82 @@ +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<div class="dijitHidden"> + <div data-dojo-type="dijit.Dialog" style="width:600px;" data-dojo-props="title:'Add'" id="addVirtualHostNodeAndVirtualHost"> + + + <!-- VHN Form --> + <form id="addVirtualHostNode.form" method="post" data-dojo-type="dijit/form/Form"> + <div class="formBox"> + <fieldset> + <legend>Virtual Host Node</legend> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Type*:</div> + <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell"> + <select id="addVirtualHostNode.type" data-dojo-type="dijit/form/FilteringSelect" + data-dojo-props=" + name: 'type', + required: true, + disabled: true, + placeHolder: 'select virtual host node type', + title: 'Select virtual host node type', + searchAttr: 'name'"> + </select> + </div> + </div> + <div style="clear:both"></div> + + <div id="addVirtualHostNode.typeFields"></div> + </fieldset> + </div> + </form> + + <!-- VH Form --> + <form id="addVirtualHost.form" method="post" data-dojo-type="dijit/form/Form"> + <div class="formBox"> + <fieldset> + <legend>Virtual Host</legend> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Type*:</div> + <div style="float:left;" class="tableContainer-valueCell formLabel-controlCell"> + <select id="addVirtualHost.type" data-dojo-type="dijit/form/FilteringSelect" + data-dojo-props=" + name: 'type', + required: true, + disabled: true, + placeHolder: 'select virtual host type', + title: 'Select virtual host type', + searchAttr: 'name'"> + </select> + </div> + </div> + <div style="clear:both"></div> + + <div id="addVirtualHost.typeFields"></div> + </fieldset> + </div> + </form> + + <div class="dijitDialogPaneActionBar"> + <button data-dojo-type="dijit/form/Button" id="addVirtualHostNodeAndVirtualHost.addButton" data-dojo-props="label: 'Add'" type="submit"></button> + <button data-dojo-type="dijit/form/Button" id="addVirtualHostNodeAndVirtualHost.cancelButton" data-dojo-props="label: 'Cancel'" ></button> + </div> + </div> +</div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css index 899d1b3630..eafa5f0619 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css @@ -90,10 +90,32 @@ div .messages { height: 350px; } +.formBox { + border: .1em solid lightgrey; + margin: 10px 0px 20px 0px; + border-radius: 5px; +} + +.formBox legend { + font-weight: bold; + margin-top: -10px; + margin-left: 5px; + background-color: white; +} + +.formBox fieldset { + padding: 10px 0px 10px 0px; +} + +.formBox .formLabel-labelCell { + margin-left: 5px; +} + .formLabel-labelCell { font-weight: bold; } + .formLabel-controlCell { padding: 1px; } diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js index 46afe7d8cb..ccedcdd108 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js @@ -31,7 +31,7 @@ define(["dojo/_base/xhr", "dijit/registry", "dojox/html/entities", "qpid/management/addAuthenticationProvider", - "qpid/management/addVirtualHostNode", + "qpid/management/addVirtualHostNodeAndVirtualHost", "qpid/management/addPort", "qpid/management/addKeystore", "qpid/management/addGroupProvider", @@ -49,7 +49,7 @@ define(["dojo/_base/xhr", "dijit/Menu", "dijit/MenuItem", "dojo/domReady!"], - function (xhr, parser, query, json, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, entities, addAuthenticationProvider, addVirtualHostNode, addPort, addKeystore, addGroupProvider, addAccessControlProvider) { + function (xhr, parser, query, json, connect, properties, updater, util, UpdatableStore, EnhancedGrid, registry, entities, addAuthenticationProvider, addVirtualHostNodeAndVirtualHost, addPort, addKeystore, addGroupProvider, addAccessControlProvider) { function Broker(name, parent, controller) { this.name = name; @@ -198,8 +198,8 @@ define(["dojo/_base/xhr", } ); - var addHostButton = query(".addVirtualHost", contentPane.containerNode)[0]; - connect.connect(registry.byNode(addHostButton), "onClick", function(evt){ addVirtualHostNode.show(); }); + var addVHNAndVHButton = query(".addVirtualHostNodeAndVirtualHostButton", contentPane.containerNode)[0]; + connect.connect(registry.byNode(addVHNAndVHButton), "onClick", function(evt){ addVirtualHostNodeAndVirtualHost.show(); }); var addPortButton = query(".addPort", contentPane.containerNode)[0]; connect.connect(registry.byNode(addPortButton), "onClick", function(evt){ diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNode.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNode.js deleted file mode 100644 index d1889b8f17..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNode.js +++ /dev/null @@ -1,211 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -define(["dojo/_base/xhr", - "dojo/_base/event", - "dojo/_base/lang", - "dojo/_base/array", - "dojo/dom", - "dojo/dom-construct", - "dojo/json", - "dojo/parser", - "dojo/store/Memory", - "dijit/registry", - "dijit/Dialog", - "dijit/form/Button", - "dijit/form/FilteringSelect", - "qpid/common/properties", - "dojo/text!addVirtualHostNode.html", - "dijit/form/Form", - "dijit/form/CheckBox", - "dijit/form/RadioButton", - "dojox/validate/us", - "dojox/validate/web", - "dojo/domReady!"], - function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, registry, Dialog, Button, FilteringSelect, properties, template) - { - - var addVirtualHostNode = - { - init: function() - { - var that=this; - this.containerNode = domConstruct.create("div", {innerHTML: template}); - parser.parse(this.containerNode); - this.typeFieldsContainer = dom.byId("addVirtualHostNode.typeFields"); - this.dialog = registry.byId("addVirtualHostNode"); - this.saveButton = registry.byId("addVirtualHostNode.saveButton"); - this.cancelButton = registry.byId("addVirtualHostNode.cancelButton"); - this.cancelButton.on("click", function(e){that._cancel(e);}); - this.saveButton.on("click", function(e){that._save(e);}); - this.form = registry.byId("addVirtualHostNode.form"); - this.type = registry.byId("addVirtualHostNode.type"); - this.type.set("disabled", true); - xhr.get({sync: properties.useSyncGet, handleAs: "json", url: "api/latest/broker?depth=0", load: function(data){that._onBrokerData(data[0]) }}); - this.form.on("submit", function(e){that._submit();} ); - }, - _onBrokerData: function(brokerData) - { - var that=this; - this.supportedVirtualHostNodeTypes = brokerData.supportedVirtualHostNodeTypes; - this.supportedVirtualHostStoreTypes = brokerData.supportedVirtualHostStoreTypes; - var typesData = []; - for (var i =0 ; i < this.supportedVirtualHostNodeTypes.length; i++) - { - var type = this.supportedVirtualHostNodeTypes[i]; - typesData.push( {id: type, name: type} ); - } - var typesStore = new Memory({ data: typesData }); - this.type.set("store", typesStore); - this.type.set("disabled", false); - this.type.on("change", function(type){that._typeChanged(type);}); - }, - show: function() - { - this.form.reset(); - this.type.set("value", null); - this.dialog.show(); - }, - destroy: function() - { - if (this.dialog) - { - this.dialog.destroyRecursive(); - this.dialog = null; - } - - if (this.containerNode) - { - domConstruct.destroy(this.containerNode); - this.containerNode = null; - } - }, - _typeChanged: function(type) - { - var widgets = registry.findWidgets(this.typeFieldsContainer); - array.forEach(widgets, function(item) { item.destroyRecursive();}); - domConstruct.empty(this.typeFieldsContainer); - - if (type) - { - var that = this; - require(["qpid/management/virtualhostnode/" + type.toLowerCase() + "/add"], - function(TypeUI) - { - try - { - TypeUI.show({containerNode:that.typeFieldsContainer, parent: that}); - } - catch(e) - { - console.warn(e); - } - } - ); - } - }, - _cancel: function(e) - { - this.dialog.hide(); - }, - _save: function(e) - { - event.stop(e); - this._submit(); - }, - _submit: function() - { - if(this.form.validate()) - { - var success = false,failureReason=null; - var data = this._getValues(); - xhr.put({ - url: "api/latest/virtualhostnode/" + encodeURIComponent(data.name), - sync: true, - handleAs: "json", - headers: { "Content-Type": "application/json"}, - putData: json.stringify(data), - load: function(x) {success = true; }, - error: function(error) {success = false; failureReason = error;} - }); - - if(success === true) - { - this.dialog.hide(); - } - else - { - alert("Error:" + failureReason); - } - } - else - { - alert('Form contains invalid data. Please correct first'); - } - }, - _getValues: function() - { - var values = {}; - var formWidgets = this.form.getChildren(); - for(var i in formWidgets) - { - var widget = formWidgets[i]; - var value = widget.value; - var propName = widget.name; - if (propName) - { - if (widget instanceof dijit.form.CheckBox) - { - values[ propName ] = widget.checked; - } - else if (widget instanceof dijit.form.RadioButton && value) - { - var currentValue = values[propName]; - if (currentValue) - { - if (lang.isArray(currentValue)) - { - currentValue.push(value) - } - else - { - values[ propName ] = [currentValue, value]; - } - } - else - { - values[ propName ] = value; - } - } - else - { - values[ propName ] = value ? value: null; - } - } - } - return values; - } - }; - - addVirtualHostNode.init(); - - return addVirtualHostNode; - } -); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js new file mode 100644 index 0000000000..e335f51d33 --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js @@ -0,0 +1,285 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +define(["dojo/_base/xhr", + "dojo/_base/event", + "dojo/_base/lang", + "dojo/_base/array", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dojo/parser", + "dojo/store/Memory", + "dijit/registry", + "dijit/Dialog", + "dijit/form/Button", + "dijit/form/FilteringSelect", + "qpid/common/properties", + "dojo/text!addVirtualHostNodeAndVirtualHost.html", + "dijit/form/Form", + "dijit/form/CheckBox", + "dijit/form/RadioButton", + "dojox/validate/us", + "dojox/validate/web", + "dojo/domReady!"], + function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, registry, Dialog, Button, FilteringSelect, properties, template) + { + + var addVirtualHostNodeAndVirtualHost = + { + init: function() + { + var that=this; + this.containerNode = domConstruct.create("div", {innerHTML: template}); + parser.parse(this.containerNode); + + this.dialog = registry.byId("addVirtualHostNodeAndVirtualHost"); + this.addButton = registry.byId("addVirtualHostNodeAndVirtualHost.addButton"); + this.cancelButton = registry.byId("addVirtualHostNodeAndVirtualHost.cancelButton"); + this.cancelButton.on("click", function(e){that._cancel(e);}); + this.addButton.on("click", function(e){that._add(e);}); + + this.virtualHostNodeTypeFieldsContainer = dom.byId("addVirtualHostNode.typeFields"); + this.virtualHostNodeForm = registry.byId("addVirtualHostNode.form"); + this.virtualHostNodeType = registry.byId("addVirtualHostNode.type"); + this.virtualHostNodeType.set("disabled", true); + + this.virtualHostTypeFieldsContainer = dom.byId("addVirtualHost.typeFields"); + this.virtualHostForm = registry.byId("addVirtualHost.form"); + this.virtualHostType = registry.byId("addVirtualHost.type"); + this.virtualHostType.set("disabled", true); + + xhr.get({sync: properties.useSyncGet, handleAs: "json", url: "api/latest/broker?depth=0", load: function(data){that._onBrokerData(data[0]) }}); + }, + _makeTypeStore: function (types) { + var typeData = []; + for (var i = 0; i < types.length; i++) { + var type = types[i]; + typeData.push({id: type, name: type}); + } + return new Memory({ data: typeData }); + }, + _onBrokerData: function(brokerData) + { + var that=this; + this.supportedVirtualHostNodeTypes = brokerData.supportedVirtualHostNodeTypes; + this.supportedVirtualHostNodeTypes.sort(); + this.supportedVirtualHostTypes = brokerData.supportedVirtualHostTypes; + this.supportedVirtualHostTypes.sort(); + + //VH Type BDB_HA_REPLICA is not user creatable. This is only needed until we have model meta data available. + this.supportedVirtualHostTypes = array.filter(this.supportedVirtualHostTypes, function(item){ + return item != "BDB_HA_REPLICA"; + }); + + var virtualHostNodeTypeStore = this._makeTypeStore(this.supportedVirtualHostNodeTypes); + this.virtualHostNodeType.set("store", virtualHostNodeTypeStore); + this.virtualHostNodeType.set("disabled", false); + this.virtualHostNodeType.on("change", function(type){that._typeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");}); + + var virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes); + this.virtualHostType.set("store", virtualHostTypeStore); + this.virtualHostType.set("disabled", false); + this.virtualHostType.on("change", function(type){that._typeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");}); + }, + show: function() + { + this.virtualHostNodeForm.reset(); + this.virtualHostNodeType.set("value", null); + + this.virtualHostForm.reset(); + this.virtualHostType.set("value", null); + this.dialog.show(); + }, + destroy: function() + { + if (this.dialog) + { + this.dialog.destroyRecursive(); + this.dialog = null; + } + + if (this.containerNode) + { + domConstruct.destroy(this.containerNode); + this.containerNode = null; + } + }, + _typeChanged: function (type, typeFieldsContainer, urlStem) + { + var widgets = registry.findWidgets(typeFieldsContainer); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(typeFieldsContainer); + + if (type) + { + var that = this; + require([urlStem + type.toLowerCase() + "/add"], + function(TypeUI) + { + try + { + TypeUI.show({containerNode:typeFieldsContainer, parent: that}); + } + catch(e) + { + console.warn(e); + } + } + ); + } + }, + _cancel: function(e) + { + this.dialog.hide(); + }, + _add: function(e) + { + event.stop(e); + this._submit(); + }, + _submit: function() + { + if(this.virtualHostNodeForm.validate() && this.virtualHostForm.validate()) + { + var success = false,failureReason=null; + + var virtualHostNodeData = this._getValues(this.virtualHostNodeForm); + var virtualHostData = this._getValues(this.virtualHostForm); + + if (virtualHostNodeData["type"] == "JSON" && virtualHostData["type"] == "ProvidedStore") + { + alert('Cannot use a JSON Virtual Host Node with a ProvidedStore Virtual Host'); + return; + } + + //Default the VH name to be the same as the VHN name. + virtualHostData["name"] = virtualHostNodeData["name"]; + + var encodedVirtualHostNodeName = encodeURIComponent(virtualHostNodeData.name); + xhr.put({ + url: "api/latest/virtualhostnode/" + encodedVirtualHostNodeName, + sync: true, + handleAs: "json", + headers: { "Content-Type": "application/json"}, + putData: json.stringify(virtualHostNodeData), + load: function(x) {success = true; }, + error: function(error) {success = false; failureReason = error;} + }); + + if(success === true) + { + var encodedVirtualHostName = encodeURIComponent(virtualHostData.name); + xhr.put({ + url: "api/latest/virtualhost/" + encodedVirtualHostNodeName + "/" + encodedVirtualHostName, + sync: true, + handleAs: "json", + headers: { "Content-Type": "application/json"}, + putData: json.stringify(virtualHostData), + load: function (x) { + success = true; + }, + error: function (error) { + success = false; + failureReason = error; + } + }); + } + + if (success == true) + { + this.dialog.hide(); + } + else + { + // What if VHN creation was successful but VH was not + alert("Error:" + failureReason); + } + } + else + { + alert('Form contains invalid data. Please correct first'); + } + }, + _getValues: function (form) + { + var values = {}; + var contextMap = {}; + + var formWidgets = form.getChildren(); + for(var i in formWidgets) + { + var widget = formWidgets[i]; + var value = widget.value; + var propName = widget.name; + if (propName && (widget.required || value )) + { + if (widget.contextvar) + { + contextMap [propName] = String(value); // Broker requires that context values are Strings + } + else + { + if (widget instanceof dijit.form.CheckBox) + { + values[ propName ] = widget.checked; + } + else if (widget instanceof dijit.form.RadioButton && value) + { + var currentValue = values[propName]; + if (currentValue) + { + if (lang.isArray(currentValue)) + { + currentValue.push(value) + } + else + { + values[ propName ] = [currentValue, value]; + } + } + else + { + values[ propName ] = value; + } + } + else + { + values[ propName ] = value ? value: null; + } + + } + } + } + + // One or more context variables were defined on form + if (Object.keys(contextMap).length > 0) + { + values ["context"] = contextMap; + } + return values; + } + }; + + addVirtualHostNodeAndVirtualHost.init(); + + return addVirtualHostNodeAndVirtualHost; + } +); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js new file mode 100644 index 0000000000..21d377445d --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +define(["dojo/_base/xhr", + "dojo/parser", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dijit/registry", + "dojo/text!virtualhost/sizemonitoring/add.html", + "dijit/form/ValidationTextBox", + "dijit/form/NumberTextBox", + "dojo/domReady!"], + function (xhr, parser, dom, domConstruct, json, registry, template) + { + return { + show: function (data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + } + }; + } +); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js new file mode 100644 index 0000000000..512b8de875 --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js @@ -0,0 +1,39 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +define(["dojo/_base/xhr", + "dojo/parser", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dijit/registry", + "dojo/text!virtualhost/providedstore/add.html", + "dijit/form/ValidationTextBox", + "dojo/domReady!"], + function (xhr, parser, dom, domConstruct, json, registry, template) + { + return { + show: function (data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + } + }; + } +); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js deleted file mode 100644 index af77026c87..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -define(["dojo/_base/xhr", - "dojo/dom", - "dojo/dom-construct", - "dojo/_base/window", - "dijit/registry", - "dojo/parser", - "dojo/_base/array", - "dojo/_base/event", - "dojo/_base/json", - "dojo/string", - "dojo/store/Memory", - "dijit/form/FilteringSelect", - "dojo/domReady!"], - function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { - return { - show: function() { - var node = dom.byId("addVirtualHost.typeSpecificDiv"); - var that = this; - - array.forEach(registry.toArray(), - function(item) { - if(item.id.substr(0,27) == "formAddVirtualHost.specific") { - item.destroyRecursive(); - } - }); - - - var selectStoreType = function(type) { - if(type && string.trim(type) != "") { - require(["qpid/management/virtualhost/store/"+type.toLowerCase()+"/add"], - function(storeType) - { - storeType.show(); - }); - } - } - - xhr.get({url: "virtualhost/standard/add.html", - sync: true, - load: function(data) { - node.innerHTML = data; - parser.parse(node); - if (that.hasOwnProperty("storeTypeChooser")) - { - that.storeTypeChooser.destroy(); - } - xhr.get({ - sync: true, - url: "service/helper?action=ListVirtualHostTypes", - handleAs: "json" - }).then( - function(data) { - var storeTypes = data; - var storeTypesData = []; - for (var i =0 ; i < storeTypes.length; i++) - { - storeTypesData[i]= {id: storeTypes[i], name: storeTypes[i]}; - } - var storeTypesStore = new Memory({ data: storeTypesData }); - var storeTypesDiv = dom.byId("addVirtualHost.specific.selectStoreType"); - var input = construct.create("input", {id: "addStoreType", required: false}, storeTypesDiv); - that.storeTypeChooser = new FilteringSelect({ id: "addVirtualHost.specific.storeType", - name: "storeType", - store: storeTypesStore, - searchAttr: "name", required: false, - onChange: selectStoreType }, input); - }); - - }}); - } - }; - }); diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html index 7572856e35..92661ea288 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showBroker.html @@ -73,7 +73,7 @@ <br/> <div data-dojo-type="dijit.TitlePane" data-dojo-props="title: 'Virtual Hosts'"> <div class="broker-virtualhosts"></div> - <button data-dojo-type="dijit.form.Button" class="addVirtualHost">Add Virtual Host</button> + <button data-dojo-type="dijit.form.Button" class="addVirtualHostNodeAndVirtualHostButton">Add</button> <div data-dojo-type="dijit.form.DropDownButton" class="virtualHostNodeMenuButton" data-dojo-props="iconClass: 'dijitIconConnector',disabled:true"> <span>Virtual Host Node</span> <div data-dojo-type="dijit.Menu"> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html new file mode 100644 index 0000000000..0d38617074 --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html @@ -0,0 +1,46 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store overfull size:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.storeOverfullSize" + data-dojo-type="dijit/form/NumberTextBox" + data-dojo-props=" + name: 'storeOverfullSize', + required: false, + title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages', + constraints:{min:0,places:0}" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store underfull size:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.storeUnderfullSize" + data-dojo-type="dijit/form/NumberTextBox" + data-dojo-props=" + name: 'storeUnderfullSize', + required: false, + title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages', + constraints:{min:0,places:0}" /> + </div> + </div> + <div style="clear:both"></div> +</div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html new file mode 100644 index 0000000000..1405f2444a --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html @@ -0,0 +1,59 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> + +<div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Message store path*:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.storePath" + data-dojo-type="dijit/form/ValidationTextBox" + data-dojo-props=" + name: 'storePath', + placeHolder: 'path/to/store', + required: true, + missingMessage: 'Store path must be supplied', + title: 'Enter message store path'" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store overfull size:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.storeOverfullSize" + data-dojo-type="dijit/form/NumberTextBox" + data-dojo-props=" + name: 'storeOverfullSize', + required: false, + title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages', + constraints:{min:0,places:0}" /> + </div> + </div> + <div style="clear:both"> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store underfull size:</div> + <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> + <input type="text" id="addVirtualHost.storeUnderfullSize" + data-dojo-type="dijit/form/NumberTextBox" + data-dojo-props=" + name: 'storeUnderfullSize', + required: false, + title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages', + constraints:{min:0,places:0}" /> + </div> + </div> + <div style="clear:both"></div> +</div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/standard/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/standard/add.html deleted file mode 100644 index 050ea9533e..0000000000 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/standard/add.html +++ /dev/null @@ -1,24 +0,0 @@ -<!-- - ~ Licensed to the Apache Software Foundation (ASF) under one or more - ~ contributor license agreements. See the NOTICE file distributed with - ~ this work for additional information regarding copyright ownership. - ~ The ASF licenses this file to You under the Apache License, Version 2.0 - ~ (the "License"); you may not use this file except in compliance with - ~ the License. You may obtain a copy of the License at - ~ - ~ http://www.apache.org/licenses/LICENSE-2.0 - ~ - ~ Unless required by applicable law or agreed to in writing, software - ~ distributed under the License is distributed on an "AS IS" BASIS, - ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ~ See the License for the specific language governing permissions and - ~ limitations under the License. - --> -<table class="tableContainer-table tableContainer-table-horiz"> - <tr> - <td class="tableContainer-labelCell" style="width: 300px;"><strong>Store Type*: </strong></td> - <td class="tableContainer-valueCell" ><div id="addVirtualHost.specific.selectStoreType"></div></td> - </tr> -</table> -<div id="addVirtualHost.storeSpecificDiv"> -</div> diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/add.html index 338a46700d..ebdb3b9c0b 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/add.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/add.html @@ -20,7 +20,7 @@ --> <div> <div style="clear:both"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Name*:</div> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Name*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> <input type="text" id="addVirtualHostNode.jsonNodeName" data-dojo-type="dijit/form/ValidationTextBox" diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/add.js b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/add.js new file mode 100644 index 0000000000..aa7bd8c582 --- /dev/null +++ b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/add.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +define(["dojo/_base/xhr", + "dojo/parser", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dijit/registry", + "dojo/text!virtualhost/memory/add.html", + "dijit/form/ValidationTextBox", + "dojo/domReady!"], + function (xhr, parser, dom, domConstruct, json, registry, template) + { + return { + show: function (data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + } + }; + } +); diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/memory/add.html b/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/memory/add.html new file mode 100644 index 0000000000..bfb5037b09 --- /dev/null +++ b/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhost/memory/add.html @@ -0,0 +1,21 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, + ~ software distributed under the License is distributed on an + ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + ~ KIND, either express or implied. See the License for the + ~ specific language governing permissions and limitations + ~ under the License. + --> +<div> + <div style="clear:both"></div> +</div> diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhostnode/memory/add.html b/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhostnode/memory/add.html index ebcf53e0b2..bd1d320902 100644 --- a/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhostnode/memory/add.html +++ b/qpid/java/broker-plugins/memory-store/src/main/java/resources/virtualhostnode/memory/add.html @@ -20,29 +20,18 @@ --> <div> <div style="clear:both"> - <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Name*:</div> + <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Name*:</div> <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyNodeName" + <input type="text" id="addVirtualHostNode.name" data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'name', - placeHolder: 'node name', + placeHolder: 'virtual host node name', required: true, - missingMessage: 'A node name must be supplied', - title: 'Enter node name', + missingMessage: 'A virtual host node name must be supplied', + title: 'Enter virtual host node name', pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" /> </div> </div> - <div style="clear:both;display:none"> - <div class="formLabel-labelCell" style="float:left; width: 300px;">Combined store:</div> - <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;"> - <input type="text" id="addVirtualHostNode.derbyMessageStoreProvider" - data-dojo-type="dijit/form/CheckBox" - data-dojo-props=" - name: 'messageStoreProvider', - required: true, - checked: true" /> - </div> - </div> <div style="clear:both"></div> </div> |
