summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2014-08-07 17:05:30 +0000
committerKeith Wall <kwall@apache.org>2014-08-07 17:05:30 +0000
commitfb4ab9f09df8290c00a33c509cb26fac098ac8e6 (patch)
tree23463ee07521d55b88b73930e11716de475d1e36
parent86ff0eaad72c8ec9aecf85a98e382e848c0efccf (diff)
downloadqpid-python-fb4ab9f09df8290c00a33c509cb26fac098ac8e6.tar.gz
QPID-5972: [Java Broker] Web UI to edit actual attribute values rather than effective values
Work completed by Andrew MacBean <macbean@apache.org> and me. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1616543 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/add.js6
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js7
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js3
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js1
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js8
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js20
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html13
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html12
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html9
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html6
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js6
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js3
-rw-r--r--qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js1
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js13
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js7
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html12
-rw-r--r--qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html12
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js6
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js3
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js6
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js11
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/add.html3
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html3
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/add.html3
-rw-r--r--qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html3
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html4
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html9
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/addVirtualHostNodeAndVirtualHost.html3
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html24
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js22
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js31
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js6
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProviderFields.js5
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js8
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js5
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js10
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js19
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js6
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js20
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js2
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js6
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js34
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProviderFields.html2
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/add.html10
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html51
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/add.html10
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html10
47 files changed, 316 insertions, 158 deletions
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/add.js
index 21d377445d..7b12d10343 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/add.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/add.js
@@ -24,16 +24,20 @@ define(["dojo/_base/xhr",
"dojo/json",
"dijit/registry",
"dojo/text!virtualhost/sizemonitoring/add.html",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/NumberTextBox",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (xhr, parser, dom, domConstruct, json, registry, template, util)
{
return {
show: function (data)
{
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+
+ registry.byId("addVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("addVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
}
};
}
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
index 5438eda926..1167d6b60e 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
@@ -16,14 +16,17 @@
* specific language governing permissions and limitations
* under the License.
*/
-define(["qpid/common/util", "dojo/domReady!"],
- function (util)
+define(["dijit/registry", "qpid/common/util", "dojo/domReady!"],
+ function (registry, util)
{
var fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"];
return {
show: function(data)
{
util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+
+ registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
}
};
}
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
index bc62654c56..087caf34c6 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
@@ -25,6 +25,9 @@ define(["qpid/common/util", "dijit/registry", "dojo/_base/window", "dojo/domRead
{
util.buildEditUI(data.containerNode, "virtualhost/bdb_ha/edit.html", "editVirtualHost.", fieldNames, data.data);
+ registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+
var widget = registry.byId("editVirtualHost.localTransactionSynchronizationPolicy-" + data.data["localTransactionSynchronizationPolicy"]);
if (widget)
{
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js
index bef6a4214d..6f4e167e72 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js
@@ -31,7 +31,6 @@ define(["qpid/common/util", "dojo/domReady!"],
BdbNode.prototype.update=function(data)
{
- this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
util.updateUI(data, fieldNames, this);
};
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js
index c3a7824fa4..ee467e69e4 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js
@@ -23,16 +23,22 @@ define(["dojo/_base/xhr",
"dojo/json",
"dijit/registry",
"dojo/text!virtualhostnode/bdb_ha/add/existinggroup/add.html",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/CheckBox",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (xhr, parser, dom, domConstruct, json, registry, template, util)
{
return {
show: function(data)
{
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+
+ registry.byId("addVirtualHostNode.groupName").set("regExpGen", util.nameOrContextVarRegexp);
+ registry.byId("addVirtualHostNode.helperNodeName").set("regExpGen", util.nameOrContextVarRegexp);
+ registry.byId("addVirtualHostNode.helperAddress").set("regExpGen", util.nodeAddressOrContextVarRegexp);
+ registry.byId("addVirtualHostNode.address").set("regExpGen", util.nodeAddressOrContextVarRegexp);
}
};
}
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js
index 48a0677eb2..30f47417aa 100644
--- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js
@@ -24,11 +24,12 @@ define(["dojo/_base/xhr",
"dojo/json",
"dijit/registry",
"dojo/text!virtualhostnode/bdb_ha/add/newgroup/add.html",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/MultiSelect",
"dijit/form/Button",
"dojo/domReady!"],
- function (xhr, win, parser, dom, domConstruct, json, registry, template)
+ function (xhr, win, parser, dom, domConstruct, json, registry, template, util)
{
return {
show: function(data)
@@ -38,12 +39,14 @@ define(["dojo/_base/xhr",
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
- // lookup field
- var virtualHostNodeAddress = registry.byId("addVirtualHostNode.address");
- this.virtualHostNodeHelperAddress = registry.byId("addVirtualHostNode.helperAddress");
+ this.addVirtualHostNodeAddress = registry.byId("addVirtualHostNode.address");
+ this.addVirtualHostNodeAddress.set("regExpGen", util.nodeAddressOrContextVarRegexp);
+
+ this.addVirtualHostNodeAddress.on("change", function(address){that._changeAddress(address, that.virtualHostNodeHelperAddress);});
+ this.addVirtualHostNodeAddress.on("click", function(e){that._updatePermittedNodesJson();});
- // add callback
- virtualHostNodeAddress.on("change", function(address){that._changeAddress(address, that.virtualHostNodeHelperAddress);});
+ this.virtualHostNodeHelperAddress = registry.byId("addVirtualHostNode.helperAddress");
+ this.virtualHostNodeHelperAddress.set("regExpGen", util.nodeAddressOrContextVarRegexp);
// list objects html node and dojo object
this.addVirtualHostNodePermittedNodesList = dom.byId("addVirtualHostNode.permittedNodesList");
@@ -52,6 +55,7 @@ define(["dojo/_base/xhr",
// permitted node text field
this.addVirtualHostNodePermittedNode = registry.byId("addVirtualHostNode.permittedNode");
+ this.addVirtualHostNodePermittedNode.set("regExpGen", util.nodeAddressOrContextVarRegexp);
this.addVirtualHostNodePermittedNode.on("change", function(value){that._changePermittedNode(value);});
// add and remove buttons & click handlers
@@ -64,8 +68,8 @@ define(["dojo/_base/xhr",
// This will contain the serialised form that will go to the server
this.addVirtualHostNodeVirtualhostBlueprint = registry.byId("addVirtualHostNode.virtualhostBlueprint");
- this.addVirtualHostNodeAddress = registry.byId("addVirtualHostNode.address");
- this.addVirtualHostNodeAddress.on("click", function(e){that._updatePermittedNodesJson();});
+
+ registry.byId("addVirtualHostNode.groupName").set("regExpGen", util.nameOrContextVarRegexp);
},
_updatePermittedNodesJson: function ()
{
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html b/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
index 37a4c51854..cad6b9301e 100644
--- a/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
@@ -21,27 +21,25 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store overfull size (bytes):</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeOverfullSize"
data-dojo-props="
name: 'storeOverfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
- constraints:{min:0,places:0}"/>
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"/>
</div>
</div>
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store underfull size (bytes):</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeUnderfullSize"
data-dojo-props="
name: 'storeUnderfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
- constraints:{min:0,places:0}"/>
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"/>
</div>
</div>
@@ -77,8 +75,7 @@
name: 'permittedNode',
placeHolder: 'host:port',
title: 'Enter address',
- intermediateChanges: true,
- pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ intermediateChanges: true" />
</div>
<button data-dojo-type="dijit/form/Button" id="editVirtualHost.permittedNodeAdd" data-dojo-props="label: '+'"></button>
</div>
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
index eb21d9faa9..b08c734e35 100644
--- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
@@ -31,8 +31,7 @@
placeHolder: 'group name',
required: true,
missingMessage: 'The group name must be supplied',
- title: 'Enter the group name',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ title: 'Enter the group name'" />
</div>
</div>
<div class="clear">
@@ -45,8 +44,7 @@
placeHolder: 'node name from group',
required: true,
missingMessage: 'A node name must be supplied',
- title: 'Enter a node name',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ title: 'Enter a node name'" />
</div>
</div>
<div class="clear">
@@ -59,8 +57,7 @@
placeHolder: 'node address from group',
required: true,
missingMessage: 'Node host and port must be supplied',
- title: 'Enter address',
- pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ title: 'Enter address'" />
</div>
</div>
</fieldset>
@@ -80,8 +77,7 @@
placeHolder: 'host:port',
required: true,
missingMessage: 'Node host and port must be supplied',
- title: 'Enter address',
- pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ title: 'Enter address'" />
</div>
</div>
<div class="clear">
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
index 0fedc22107..3d06d15d5c 100644
--- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
@@ -28,8 +28,7 @@
placeHolder: 'group name',
required: true,
missingMessage: 'A group name must be supplied',
- title: 'Enter a group name',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ title: 'Enter a group name'" />
</div>
</div>
<div class="clear">
@@ -42,8 +41,7 @@
placeHolder: 'host:port',
required: true,
missingMessage: 'Node host and port must be supplied',
- title: 'Enter address',
- pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ title: 'Enter address'" />
</div>
</div>
<div class="clear">
@@ -86,8 +84,7 @@
name: 'permittedNode',
placeHolder: 'host:port',
title: 'Enter address',
- intermediateChanges: true,
- pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ intermediateChanges: true" />
</div>
<button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button>
</div>
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
index 44b2a52536..c18ca34fdb 100644
--- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
@@ -26,8 +26,7 @@
required: true,
disabled: true,
missingMessage: 'A group name must be supplied',
- title: 'Enter group name',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ title: 'Enter group name'" />
</div>
</div>
<div class="clear">
@@ -42,8 +41,7 @@
disabled: true,
missingMessage: 'A Host and Port must be supplied',
invalidMessage: 'Must be of the form host:port',
- title: 'Enter Host and Port name',
- pattern: '^([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}$'" />
+ title: 'Enter Host and Port name'" />
</div>
</div>
<div class="clear">
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
index 21d377445d..7b12d10343 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
@@ -24,16 +24,20 @@ define(["dojo/_base/xhr",
"dojo/json",
"dijit/registry",
"dojo/text!virtualhost/sizemonitoring/add.html",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/NumberTextBox",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (xhr, parser, dom, domConstruct, json, registry, template, util)
{
return {
show: function (data)
{
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+
+ registry.byId("addVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("addVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
}
};
}
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
index 5438eda926..c71c2c28de 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
@@ -24,6 +24,9 @@ define(["qpid/common/util", "dojo/domReady!"],
show: function(data)
{
util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+
+ registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
}
};
}
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
index 22f6e4fa37..ffbe4bfacd 100644
--- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
+++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js
@@ -31,7 +31,6 @@ define(["qpid/common/util", "dojo/domReady!"],
DerbyNode.prototype.update=function(data)
{
- this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
util.updateUI(data, fields, this);
};
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js
index ccdcf643fb..db3bf8f57b 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js
@@ -32,6 +32,7 @@ define(["dojo/_base/xhr",
"dijit/form/FilteringSelect",
"dojo/domReady!"],
function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) {
+ var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
return {
show: function(poolSpecificDivId, formFieldPrefix, htmlUrl) {
var node = dom.byId(poolSpecificDivId);
@@ -47,8 +48,16 @@ define(["dojo/_base/xhr",
xhr.get({url: htmlUrl,
sync: true,
load: function(data) {
- node.innerHTML = data;
- parser.parse(node);
+
+ node.innerHTML = data;
+ parser.parse(node);
+
+ for ( var i = 0 ; i < fieldNames.length; i++ )
+ {
+ var widgetName = fieldNames[i];
+ var widget = registry.byId(formFieldPrefix + widgetName);
+ widget.set("regExpGen", util.numericOrContextVarRegexp);
+ }
}});
}
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
index 46345bca58..0179f38d07 100644
--- a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
+++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
@@ -24,8 +24,9 @@ define(["dojo/_base/xhr",
"dojo/_base/window",
"dijit/registry",
"dojo/parser",
+ "qpid/common/util",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser) {
+ function (xhr, dom, construct, win, registry, parser, util) {
var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
return {
show: function(data) {
@@ -47,7 +48,9 @@ define(["dojo/_base/xhr",
for ( var i = 0 ; i < fieldNames.length; i++ )
{
var widgetName = fieldNames[i];
- registry.byId("formAddVirtualHost.qpid.jdbcstore.bonecp." + widgetName).set("value", data.data.context["qpid.jdbcstore.bonecp." + widgetName]);
+ var widget = registry.byId("formAddVirtualHost.qpid.jdbcstore.bonecp." + widgetName);
+ widget.set("value", data.data.context["qpid.jdbcstore.bonecp." + widgetName]);
+ widget.set("regExpGen", util.numericOrContextVarRegexp);
}
}});
}
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 3f5c60b110..dc2450a532 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
@@ -22,36 +22,30 @@
<tr>
<td class="tableContainer-labelCell"><strong>Partition Count: </strong></td>
<td class="tableContainer-valueCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
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"><strong>Minimum connections per Partition:</strong></td>
<td class="tableContainer-valueCell">
- <input dojoType="dijit/form/NumberSpinner"
+ <input dojoType="dijit/form/ValidationTextBox"
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"><strong>Maximum connections per Partition: </strong></td>
<td class="tableContainer-valueCell">
- <input dojoType="dijit/form/NumberSpinner"
+ <input dojoType="dijit/form/ValidationTextBox"
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
index b4c60b818e..810a232091 100644
--- 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
@@ -22,36 +22,30 @@
<tr>
<td class="tableContainer-labelCell"><strong>Partition Count: </strong></td>
<td class="tableContainer-valueCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
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"><strong>Minimum connections per Partition:</strong></td>
<td class="tableContainer-valueCell">
- <input dojoType="dijit/form/NumberSpinner"
+ <input dojoType="dijit/form/ValidationTextBox"
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"><strong>Maximum connections per Partition: </strong></td>
<td class="tableContainer-valueCell">
- <input dojoType="dijit/form/NumberSpinner"
+ <input dojoType="dijit/form/ValidationTextBox"
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>
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
index 1d9fff5571..88b338750d 100644
--- 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
@@ -27,10 +27,11 @@ define(["dojo/_base/xhr",
"dijit/registry",
"dojo/text!virtualhost/jdbc/add.html",
"dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/CheckBox",
"dojo/domReady!"],
- function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, poolTypeJsonString)
+ function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, poolTypeJsonString, util)
{
return {
show: function (data)
@@ -38,6 +39,9 @@ define(["dojo/_base/xhr",
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+ registry.byId("addVirtualHost.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+ registry.byId("addVirtualHost.username").set("regExpGen", util.nameOrContextVarRegexp);
+
var poolTypes = json.parse(poolTypeJsonString);
var poolTypesData = [];
for (var i =0 ; i < poolTypes.length; i++)
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
index a4cd23392c..665f560290 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
@@ -35,6 +35,9 @@ define(["qpid/common/util",
{
util.buildEditUI(data.containerNode, "virtualhost/jdbc/edit.html", "editVirtualHost.", fieldNames, data.data);
+ registry.byId("editVirtualHost.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+ registry.byId("editVirtualHost.username").set("regExpGen", util.nameOrContextVarRegexp);
+
var poolTypes = json.parse(poolTypeJsonString);
var poolTypesData = [];
for (var i =0 ; i < poolTypes.length; i++)
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 adf28f1f6e..a285733f0e 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
@@ -29,10 +29,11 @@ define(["dojo/_base/xhr",
"dijit/registry",
"dojo/text!virtualhostnode/jdbc/add.html",
"dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dijit/form/CheckBox",
"dojo/domReady!"],
- function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, poolTypeJsonString)
+ function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, poolTypeJsonString, util)
{
return {
show: function (data)
@@ -40,6 +41,9 @@ define(["dojo/_base/xhr",
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+ registry.byId("addVirtualHostNode.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+ registry.byId("addVirtualHostNode.username").set("regExpGen", util.nameOrContextVarRegexp);
+
var poolTypes = json.parse(poolTypeJsonString);
var poolTypesData = [];
for (var i =0 ; i < poolTypes.length; i++)
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
index 0e062b8f08..69fa01871b 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
@@ -33,14 +33,9 @@ define(["qpid/common/util",
show: function(data)
{
util.buildEditUI(data.containerNode, "virtualhostnode/jdbc/edit.html", "editVirtualHostNode.", fieldNames, data.data);
- if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED"))
- {
- for( var i = 0 ; i < fieldNames.length ; i++ )
- {
- registry.byId("editVirtualHostNode." + fieldNames[i]).set("disabled", true);
- }
- registry.byId("editVirtualHostNode.password").set("disabled", true);
- }
+
+ registry.byId("editVirtualHostNode.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+ registry.byId("editVirtualHostNode.username").set("regExpGen", util.nameOrContextVarRegexp);
var poolTypes = json.parse(poolTypeJsonString);
var poolTypesData = [];
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
index 7f1b97462e..7fc7f17565 100644
--- 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
@@ -27,8 +27,7 @@
placeHolder: 'jdbc:provider:info',
required: true,
missingMessage: 'JDBC URL must be supplied',
- title: 'Enter JDBC URL',
- pattern: '^jdbc:.*:.*$'"/>
+ title: 'Enter JDBC URL'"/>
</div>
</div>
<div class="clear">
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html
index fb1b4493f1..10212079eb 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html
@@ -28,8 +28,7 @@
placeHolder: 'jdbc:provider:info',
required: true,
missingMessage: 'JDBC URL must be supplied',
- title: 'Enter JDBC URL',
- pattern: '^jdbc:.*:.*$'"/>
+ title: 'Enter JDBC URL'"/>
</div>
</div>
<div class="clear">
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 fc2768bd43..f60f54e7d8 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
@@ -29,8 +29,7 @@
placeHolder: 'jdbc:provider:info',
required: true,
missingMessage: 'JDBC URL must be supplied',
- title: 'Enter JDBC URL',
- pattern: '^jdbc:.*:.*$'"/>
+ title: 'Enter JDBC URL'"/>
</div>
</div>
<div class="clear">
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html
index 2c6eaf2926..c8cc56d1cb 100644
--- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html
+++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html
@@ -29,8 +29,7 @@
placeHolder: 'jdbc:provider:info',
required: true,
missingMessage: 'JDBC URL must be supplied',
- title: 'Enter JDBC URL',
- pattern: '^jdbc:.*:.*$'"/>
+ title: 'Enter JDBC URL'"/>
</div>
</div>
<div class="clear">
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html
index 13960715a6..e90262f17b 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/addAuthenticationProvider.html
@@ -26,8 +26,8 @@
<tr>
<td class="tableContainer-labelCell">Name*:</td>
<td class="tableContainer-valueCell"><input type="text" required="true" name="name"
- id="formAddAuthenticationProvider.name" placeholder="Name" regexp="^[\x20-\x2e\x30-\x7F]{1,255}$"
- dojoType="dijit.form.ValidationTextBox" missingMessage="A name must be supplied" /></div></td>
+ id="formAddAuthenticationProvider.name" placeholder="Name"
+ dojoType="dijit.form.ValidationTextBox" missingMessage="A name must be supplied" /></td>
</tr>
</table>
<input type="hidden" id="formAddAuthenticationProvider.id" name="id"/>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
index dab8541b65..69d49248b8 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/addPort.html
@@ -26,10 +26,11 @@
<div id="formAddPort:fields">
<input type="text" required="true" name="name" id="formAddPort.name" placeholder="Name"
data-dojo-props="label: 'Name*:'" dojoType="dijit.form.ValidationTextBox"
- missingMessage="A name must be supplied" regexp="^[\x20-\x2e\x30-\x7F]{1,255}$"/>
- <input data-dojo-type="dijit.form.NumberSpinner" id="formAddPort.port" required="true" data-dojo-props="label: 'Port Number*:', placeHolder: 'Enter port number'"
- name="port" smallDelta="1" constraints="{min:1,max:65535,places:0, pattern: '#####'}"
- missingMessage="A port number must be supplied" />
+ missingMessage="A name must be supplied"/>
+
+ <input type="text" required="true" id="formAddPort.port"
+ data-dojo-props="label: 'Port Number*:', placeHolder: 'Enter port number'" dojoType="dijit.form.ValidationTextBox"
+ name="port" missingMessage="A port number must be supplied"/>
<select id="formAddPort.type" data-dojo-type="dijit.form.FilteringSelect"
data-dojo-props="name: 'type', value: '',placeHolder: 'Select Port Type', label: 'Port Type*:'">
<option value="AMQP" selected="selected">AMQP</option>
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
index 11173571ab..d751a6c1cd 100644
--- 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
@@ -37,8 +37,7 @@
placeHolder: 'unique node name per broker',
required: true,
missingMessage: 'A node name must be supplied',
- title: 'Enter a unique node name per broker',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ title: 'Enter a unique node name per broker'" />
</div>
</div>
<div class="clear">
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
index 2ec1743d80..6f4db66c7d 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html
@@ -43,11 +43,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Warn:</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeTransactionIdleTimeoutWarn"
name="storeTransactionIdleTimeoutWarn"
- smallDelta="1000"
- constraints="{min: 0, places: 0, pattern: '#'}"
placeHolder="idle timeout warn time in ms"
missingMessage="An idle timeout warn time in ms must be supplied"/>
</div>
@@ -55,11 +53,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Idle Timeout Close:</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeTransactionIdleTimeoutClose"
name="storeTransactionIdleTimeoutClose"
- smallDelta="1000"
- constraints="{min: 0, places: 0, pattern: '#'}"
placeHolder="idle timeout close time in ms"
missingMessage="An idle timeout close time in ms must be supplied"/>
</div>
@@ -67,11 +63,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Warn:</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeTransactionOpenTimeoutWarn"
name="storeTransactionOpenTimeoutWarn"
- smallDelta="1000"
- constraints="{min: 0, places: 0, pattern: '#'}"
placeHolder="open timeout warn time in ms"
missingMessage="An open timeout warn time in ms must be supplied"/>
</div>
@@ -79,11 +73,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Open Timeout Close:</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeTransactionOpenTimeoutClose"
name="storeTransactionOpenTimeoutClose"
- smallDelta="1000"
- constraints="{min: 0, places: 0, pattern: '#'}"
placeHolder="open timeout close time in ms"
missingMessage="An open timeout close time in ms must be supplied"/>
</div>
@@ -97,11 +89,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Check period (ms):</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.housekeepingCheckPeriod"
name="housekeepingCheckPeriod"
- smallDelta="1000"
- constraints="{min: 1, places: 0, pattern: '#'}"
placeHolder="house keeping check period in ms"
missingMessage="A house keeping check period must be supplied"/>
</div>
@@ -109,11 +99,9 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Thread count:</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.housekeepingThreadCount"
name="housekeepingThreadCount"
- smallDelta="1"
- constraints="{min: 1, places: 0, pattern: '#'}"
placeHolder="house keeping thread count"
missingMessage="A house keeping thread count must be supplied"/>
</div>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
index e4b3ed5dbc..1a89bfb374 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
@@ -636,5 +636,27 @@ define(["dojo/_base/xhr",
}
}
+ var singleContextVarRegexp = "(\\${[\\w\\.\\-]+})";
+
+ util.numericOrContextVarRegexp = function(constraints)
+ {
+ return "^(\\d+)|" + singleContextVarRegexp + "$";
+ }
+
+ util.nameOrContextVarRegexp = function(constraints)
+ {
+ return "^(\\w+)|" + singleContextVarRegexp + "$";
+ }
+
+ util.jdbcUrlOrContextVarRegexp = function(constraints)
+ {
+ return "^(jdbc:.*:.*)|" + singleContextVarRegexp + "$";
+ }
+
+ util.nodeAddressOrContextVarRegexp = function(constraints)
+ {
+ return "^(([0-9a-zA-Z.-_]|::)+:[0-9]{1,5})|" + singleContextVarRegexp + "$";
+ }
+
return util;
});
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 3ae4537807..11a79984b3 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
@@ -55,6 +55,7 @@ define(["dojo/_base/xhr",
this.name = name;
this.controller = controller;
this.modelObj = { type: "broker", name: name };
+
if(parent) {
this.modelObj.parent = {};
this.modelObj.parent[ parent.type] = parent;
@@ -64,6 +65,8 @@ define(["dojo/_base/xhr",
createWidget: function(brokerData) {
return new dijit.form.ValidationTextBox({
required: true,
+ trim: true,
+ regExpGen: util.nameOrContextVarRegexp,
value: brokerData.name,
label: "Name*:",
name: "name"})
@@ -93,7 +96,7 @@ define(["dojo/_base/xhr",
createWidget: function(brokerData) {
return new dijit.form.ValidationTextBox({
trim: "true",
- regexp: "[0-9]+",
+ regExpGen: util.numericOrContextVarRegexp,
invalidMessage: "Invalid value",
required: false,
value: brokerData.statisticsReportingPeriod,
@@ -117,12 +120,12 @@ define(["dojo/_base/xhr",
groupName: "Global Connection Defaults",
createWidget: function(brokerData)
{
- return new dijit.form.NumberSpinner({
+ return new dijit.form.ValidationTextBox({
+ trim: "true",
+ regExpGen: util.numericOrContextVarRegexp,
invalidMessage: "Invalid value",
required: false,
value: brokerData["connection.sessionCountLimit"],
- smallDelta: 1,
- constraints: {min:1,max:65535,places:0, pattern: "#####"},
label: "Maximum number of sessions:",
name: "connection.sessionCountLimit"
});
@@ -132,7 +135,7 @@ define(["dojo/_base/xhr",
createWidget: function(brokerData) {
return new dijit.form.ValidationTextBox({
trim: "true",
- regexp: "[0-9]+",
+ regExpGen: util.numericOrContextVarRegexp,
invalidMessage: "Invalid value",
required: false,
value: brokerData["connection.heartBeatDelay"],
@@ -221,11 +224,19 @@ define(["dojo/_base/xhr",
var editButton = query(".editBroker", contentPane.containerNode)[0];
connect.connect(registry.byNode(editButton), "onClick",
function(evt){
- util.showSetAttributesDialog(
- that.attributeWidgetFactories,
- that.brokerUpdater.brokerData,
- "api/latest/broker",
- "Set broker attributes");
+ var query = "api/latest/broker";
+
+ xhr.get({url: query, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true, depth: 2 }})
+ .then(function(data)
+ {
+ var brokerData = data[0];
+
+ util.showSetAttributesDialog(
+ that.attributeWidgetFactories,
+ brokerData,
+ query,
+ "Set broker attributes");
+ });
}
);
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js
index f73837ba7d..667c83c6ea 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/KeyStore.js
@@ -71,7 +71,11 @@ define(["dojo/dom",
var node = registry.byNode(editKeyStoreButton);
connect.connect(node, "onClick",
function(evt){
- that.dialog(that.keyStoreUpdater.keyStoreData)
+ xhr.get({url: that.url, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true }})
+ .then(function(data)
+ {
+ that.dialog(data[0], that.url);
+ });
});
}});
};
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProviderFields.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProviderFields.js
index 1adcbd1ff1..1fa1d603de 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProviderFields.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProviderFields.js
@@ -31,9 +31,10 @@ define(["dojo/_base/xhr",
"dojox/html/entities",
"dojo/text!../../showPreferencesProviderFields.html",
"dojo/text!service/helper?action=ListPreferencesProvidersTypes",
+ "qpid/common/util",
"dojox/validate/us",
"dojox/validate/web",
- "dojo/domReady!"], function (xhr, dom, query, parser, string, json, Memory, registry, FilteringSelect, ValidationTextBox, entities, template, preferencesProvidersTypes) {
+ "dojo/domReady!"], function (xhr, dom, query, parser, string, json, Memory, registry, FilteringSelect, ValidationTextBox, entities, template, preferencesProvidersTypes, util) {
var PreferencesProviderFields = {};
@@ -114,6 +115,7 @@ define(["dojo/_base/xhr",
this.fieldsContainer = query(".preferencesProviderFieldsContainer", node)[0];
this.type = registry.byNode(query(".preferencesProviderType", node)[0]);
this.name = registry.byNode(query(".preferencesProviderName", node)[0]);
+ this.name.set("regExpGen", util.nameOrContextVarRegexp);
this.id = query("input[name='preferencesProviderId']", node)[0];
this.id.value = null;
this.type.set("store", new Memory({ data: types, idProperty: "id"}));
@@ -132,6 +134,7 @@ define(["dojo/_base/xhr",
xhr.get({
url: "api/latest/preferencesprovider/" +encodeURIComponent(authenticationProviderName) + "/" + encodeURIComponent(provider),
sync: true,
+ content: { actuals: true },
handleAs: "json"
}).then(function(data){if (data && data[0]) { that.init(data[0]);}});
}
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js
index 14c51f3276..dfe276cae2 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/TrustStore.js
@@ -71,11 +71,17 @@ define(["dojo/dom",
var node = registry.byNode(editTrustStoreButton);
connect.connect(node, "onClick",
function(evt){
- that.dialog(that.keyStoreUpdater.keyStoreData)
+ xhr.get({url: that.url, sync: properties.useSyncGet, handleAs: "json", content: { actuals: true }})
+ .then(function(data)
+ {
+ that.dialog(data[0], that.url);
+ });
});
}});
};
+
+
TrustStore.prototype.close = function() {
updater.remove( this.keyStoreUpdater );
};
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js
index 969a8ffd90..30bd4c22d0 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addAuthenticationProvider.js
@@ -32,6 +32,7 @@ define(["dojo/_base/xhr",
"dojo/_base/connect",
"dojo/dom-style",
"qpid/management/PreferencesProviderFields",
+ "qpid/common/util",
/* dojox/ validate resources */
"dojox/validate/us", "dojox/validate/web",
/* basic dijit classes */
@@ -45,7 +46,7 @@ define(["dojo/_base/xhr",
"dojox/form/BusyButton", "dojox/form/CheckedMultiSelect",
"dojox/layout/TableContainer",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, FilteringSelect, connect, domStyle, PreferencesProviderFields) {
+ function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, FilteringSelect, connect, domStyle, PreferencesProviderFields, util) {
var addAuthenticationProvider = {};
@@ -126,6 +127,7 @@ define(["dojo/_base/xhr",
{
xhr.get({
url: "api/latest/authenticationprovider/" + encodeURIComponent(providerName),
+ content: { actuals: true },
handleAs: "json"
}).then(
function(data) {
@@ -134,6 +136,7 @@ define(["dojo/_base/xhr",
var nameField = dijit.byId("formAddAuthenticationProvider.name");
nameField.set("value", provider.name);
nameField.set("disabled", true);
+ nameField.set("regExpGen", util.nameOrContextVarRegexp);
dialog.providerChooser.set("value", providerType);
dialog.providerChooser.set("disabled", true);
dojo.byId("formAddAuthenticationProvider.id").value=provider.id;
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js
index 2d99f97837..0ec8fb6c6c 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addKeystore.js
@@ -56,7 +56,7 @@ define(["dojo/_base/lang",
value: keystore.name,
disabled: keystore.name ? true : false,
label: "Name:",
- regexp: "^[\x20-\x2e\x30-\x7F]{1,255}$",
+ regExpGen: util.nameOrContextVarRegexp,
name: "name"});
}
}, {
@@ -140,23 +140,23 @@ define(["dojo/_base/lang",
return fields;
}
- addKeystore.showKeystoreDialog = function(keystore) {
+ addKeystore.showKeystoreDialog = function(keystore, putURL) {
var keystoreAttributeWidgetFactories = addKeystore.createWidgetFactories(true);
util.showSetAttributesDialog(
keystoreAttributeWidgetFactories,
keystore ? keystore : {},
- "api/latest/keystore" + (keystore ? "/" + encodeURIComponent(keystore.name) : ""),
+ keystore ? putURL : "api/latest/keystore",
keystore ? "Edit keystore - " + keystore.name : "Add keystore",
keystore ? false : true);
};
- addKeystore.showTruststoreDialog = function(truststore) {
+ addKeystore.showTruststoreDialog = function(truststore, putURL) {
var truststoreAttributeWidgetFactories = addKeystore.createWidgetFactories(false);
util.showSetAttributesDialog(
truststoreAttributeWidgetFactories,
truststore ? truststore : {},
- "api/latest/truststore" + (truststore ? "/" + encodeURIComponent(truststore.name) : ""),
+ truststore ? putURL : "api/latest/truststore",
truststore ? "Edit truststore - " + truststore.name : "Add truststore",
truststore ? false : true);
};
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
index a3e1160dc1..34e2d58afb 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addPort.js
@@ -32,6 +32,7 @@ define(["dojo/_base/xhr",
"dijit/form/FilteringSelect",
"dojo/dom-style",
"dojo/_base/lang",
+ "qpid/common/util",
/* dojox/ validate resources */
"dojox/validate/us",
"dojox/validate/web",
@@ -54,7 +55,7 @@ define(["dojo/_base/xhr",
"dojox/grid/EnhancedGrid",
"dojox/grid/enhanced/plugins/IndirectSelection",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, ObjectStore, FilteringSelect, domStyle, lang) {
+ function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, ObjectStore, FilteringSelect, domStyle, lang, util) {
var addPort = {};
@@ -314,7 +315,7 @@ define(["dojo/_base/xhr",
var newPort = convertToPort(theForm.getValues());
if ((newPort.needClientAuth || newPort.wantClientAuth) && (!newPort.hasOwnProperty("trustStores") || newPort.trustStores.length==0))
{
- alert("A trustore must be selected when requesting client certificates.");
+ alert("A trust store must be selected when requesting client certificates.");
return false;
}
var that = this;
@@ -399,13 +400,15 @@ define(["dojo/_base/xhr",
xhr.get({
url: "api/latest/port/" + encodeURIComponent(portName),
+ content: { actuals: true },
handleAs: "json"
}).then(
function(data){
var port = data[0];
- var nameField = registry.byId("formAddPort.name");
- nameField.set("value", port.name);
- nameField.set("disabled", true);
+ var nameWidget = registry.byId("formAddPort.name");
+ nameWidget.set("value", port.name);
+ nameWidget.set("disabled", true);
+ nameWidget.set("regExpGen", util.nameOrContextVarRegexp);
dom.byId("formAddPort.id").value=port.id;
providerWidget.set("value", port.authenticationProvider ? port.authenticationProvider : "");
keystoreWidget.set("value", port.keyStore ? port.keyStore : "");
@@ -430,7 +433,11 @@ define(["dojo/_base/xhr",
var transportWidget = registry.byId("formAddPort.transports");
transportWidget.set("value", port.transports);
- registry.byId("formAddPort.port").set("value", port.port);
+
+ var portWidget = registry.byId("formAddPort.port");
+ portWidget.set("value", port.port);
+ portWidget.set("regExpGen", util.numericOrContextVarRegexp);
+
var protocols = port.protocols;
var typeWidget = registry.byId("formAddPort.type");
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
index 884290eed4..2eac2094e5 100644
--- 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
@@ -33,6 +33,7 @@ define(["dojo/_base/xhr",
"dijit/form/Button",
"dijit/form/FilteringSelect",
"qpid/common/properties",
+ "qpid/common/util",
"dojo/text!addVirtualHostNodeAndVirtualHost.html",
"dijit/form/Form",
"dijit/form/CheckBox",
@@ -40,7 +41,7 @@ define(["dojo/_base/xhr",
"dojox/validate/us",
"dojox/validate/web",
"dojo/domReady!"],
- function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, fobject, registry, Dialog, Button, FilteringSelect, properties, template)
+ function (xhr, event, lang, array, dom, domConstruct, json, parser, Memory, fobject, registry, Dialog, Button, FilteringSelect, properties, util, template)
{
var addVirtualHostNodeAndVirtualHost =
@@ -51,6 +52,9 @@ define(["dojo/_base/xhr",
this.containerNode = domConstruct.create("div", {innerHTML: template});
parser.parse(this.containerNode);
+ var virtualHostNodeName = registry.byId("addVirtualHostNode.nodeName");
+ virtualHostNodeName.set("regExpGen", util.nameOrContextVarRegexp);
+
this.dialog = registry.byId("addVirtualHostNodeAndVirtualHost");
this.addButton = registry.byId("addVirtualHostNodeAndVirtualHost.addButton");
this.cancelButton = registry.byId("addVirtualHostNodeAndVirtualHost.cancelButton");
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
index c2f35ac9ec..1a24e5e770 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
@@ -40,13 +40,14 @@ define(["dojo/_base/xhr",
"dijit/form/ValidationTextBox",
"dijit/form/Button",
"dijit/form/Form",
- "dijit/form/NumberSpinner",
"dojox/validate/us",
"dojox/validate/web",
"dojo/domReady!"],
function (xhr, entities, array, event, lang, win, dom, domConstruct, registry, parser, json, query, Memory, ObjectStore, util, template)
{
var fields = [ "name", "queue.deadLetterQueueEnabled", "storeTransactionIdleTimeoutWarn", "storeTransactionIdleTimeoutClose", "storeTransactionOpenTimeoutWarn", "storeTransactionOpenTimeoutClose", "housekeepingCheckPeriod", "housekeepingThreadCount"];
+ var numericFieldNames = ["storeTransactionIdleTimeoutWarn", "storeTransactionIdleTimeoutClose", "storeTransactionOpenTimeoutWarn", "storeTransactionOpenTimeoutClose", "housekeepingCheckPeriod", "housekeepingThreadCount"];
+
var virtualHostEditor =
{
@@ -77,6 +78,7 @@ define(["dojo/_base/xhr",
{
url: this.query,
sync: true,
+ content: { actuals: true },
handleAs: "json",
load: function(data)
{
@@ -137,20 +139,30 @@ define(["dojo/_base/xhr",
},
_show:function(virtualHostData)
{
+
this.initialData = virtualHostData;
for(var i = 0; i < fields.length; i++)
{
var fieldName = fields[i];
- if (this[fieldName] instanceof dijit.form.CheckBox)
+ var widget = this[fieldName];
+ widget.reset();
+
+ if (widget instanceof dijit.form.CheckBox)
{
- this[fieldName].set("checked", virtualHostData[fieldName]);
+ widget.set("checked", virtualHostData[fieldName]);
}
else
{
- this[fieldName].set("value", virtualHostData[fieldName]);
+ widget.set("value", virtualHostData[fieldName]);
}
}
+ // Add regexp to the numeric fields
+ for(var i = 0; i < numericFieldNames.length; i++)
+ {
+ this[numericFieldNames[i]].set("regExpGen", util.numericOrContextVarRegexp);
+ }
+
var that = this;
var widgets = registry.findWidgets(this.typeFieldsContainer);
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
index e56e34ef41..704063ae16 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js
@@ -40,7 +40,6 @@ define(["dojo/_base/xhr",
"dijit/form/ValidationTextBox",
"dijit/form/Button",
"dijit/form/Form",
- "dijit/form/NumberSpinner",
"dojox/validate/us",
"dojox/validate/web",
"dojo/domReady!"],
@@ -71,6 +70,7 @@ define(["dojo/_base/xhr",
{
url: this.query,
sync: true,
+ content: { actuals: true },
handleAs: "json",
load: function(data)
{
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
index e2f3fe35b7..7d14c6450f 100644
--- 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
@@ -24,9 +24,10 @@ define(["dojo/_base/xhr",
"dojo/json",
"dijit/registry",
"dojo/text!virtualhost/providedstore/add.html",
+ "qpid/common/util",
"dijit/form/ValidationTextBox",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (xhr, parser, dom, domConstruct, json, registry, template, util)
{
return {
show: function (data)
@@ -34,6 +35,9 @@ define(["dojo/_base/xhr",
this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
parser.parse(this.containerNode);
+ registry.byId("addVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("addVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+
if (data.parent.virtualHostNodeType.value == "JDBC")
{
dom.byId("addVirtualHost.diskFlowControls").style.display = "none";
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js
new file mode 100644
index 0000000000..6264d81335
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js
@@ -0,0 +1,34 @@
+/*
+ * 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(["dijit/registry", "qpid/common/util", "dojo/domReady!"],
+ function (registry, util)
+ {
+ var fieldNames = ["storeUnderfullSize", "storeOverfullSize"];
+ return {
+ show: function(data)
+ {
+ util.buildEditUI(data.containerNode, "virtualhost/providedstore/edit.html", "editVirtualHost.", fieldNames, data.data);
+
+ registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+ }
+ };
+ }
+);
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProviderFields.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProviderFields.html
index 5c5bdaefef..f15a3a71b8 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProviderFields.html
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showPreferencesProviderFields.html
@@ -33,7 +33,7 @@
<td class="tableContainer-labelCell"><strong>Name*:</strong></td>
<td class="tableContainer-valueCell"><input type="text" name="preferencesProviderName"
class="preferencesProviderName" data-dojo-type="dijit/form/ValidationTextBox"
- data-dojo-props="placeHolder: 'Name', required: true, missingMessage: 'A name must be supplied', title: 'Enter name', pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" /></td>
+ data-dojo-props="placeHolder: 'Name', required: true, missingMessage: 'A name must be supplied', title: 'Enter name'" /></td>
</tr>
</table>
<div class="preferencesProviderFieldsContainer"></div>
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
index de0c2aaa21..320f056cef 100644
--- 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
@@ -23,26 +23,24 @@
<div class="formLabel-labelCell tableContainer-labelCell">Store overfull size:</div>
<div class="formLabel-controlCell tableContainer-valueCell">
<input type="text" id="addVirtualHost.storeOverfullSize"
- data-dojo-type="dijit/form/NumberTextBox"
+ data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storeOverfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
- constraints:{min:0,places:0}" />
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
</div>
</div>
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store underfull size:</div>
<div class="formLabel-controlCell tableContainer-valueCell">
<input type="text" id="addVirtualHost.storeUnderfullSize"
- data-dojo-type="dijit/form/NumberTextBox"
+ data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storeUnderfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
- constraints:{min:0,places:0}" />
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'" />
</div>
</div>
</div>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html
new file mode 100644
index 0000000000..ec02c67ff4
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/edit.html
@@ -0,0 +1,51 @@
+<!--
+ ~ 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 class="clear">
+ <div class="formLabel-labelCell tableContainer-labelCell">Store overfull size (bytes):</div>
+ <div class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/ValidationTextBox"
+ id="editVirtualHost.storeOverfullSize"
+ data-dojo-props="
+ name: 'storeOverfullSize',
+ placeHolder: 'size in bytes',
+ required: false,
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
+ />
+ </div>
+ </div>
+ <div class="clear">
+ <div class="formLabel-labelCell tableContainer-labelCell">Store underfull size (bytes):</div>
+ <div class="tableContainer-valueCell formLabel-controlCell">
+ <input data-dojo-type="dijit/form/ValidationTextBox"
+ id="editVirtualHost.storeUnderfullSize"
+ data-dojo-props="
+ name: 'storeUnderfullSize',
+ placeHolder: 'size in bytes',
+ required: false,
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"
+ />
+ </div>
+ </div>
+
+ <div class="clear"></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
index 522d2b3abf..7cf789e520 100644
--- 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
@@ -35,26 +35,24 @@
<div class="formLabel-labelCell tableContainer-labelCell">Store overfull size:</div>
<div class="formLabel-controlCell tableContainer-valueCell">
<input type="text" id="addVirtualHost.storeOverfullSize"
- data-dojo-type="dijit/form/NumberTextBox"
+ data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storeOverfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
- constraints:{min:0,places:0}" />
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'" />
</div>
</div>
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store underfull size:</div>
<div class="formLabel-controlCell tableContainer-valueCell">
<input type="text" id="addVirtualHost.storeUnderfullSize"
- data-dojo-type="dijit/form/NumberTextBox"
+ data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storeUnderfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
- constraints:{min:0,places:0}" />
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'" />
</div>
</div>
<div class="clear"></div>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
index 937f036445..9e240a83c4 100644
--- a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html
@@ -37,28 +37,26 @@
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store overfull size (bytes):</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeOverfullSize"
data-dojo-props="
name: 'storeOverfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages',
- constraints:{min:0,places:0}"
+ title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"
/>
</div>
</div>
<div class="clear">
<div class="formLabel-labelCell tableContainer-labelCell">Store underfull size (bytes):</div>
<div class="tableContainer-valueCell formLabel-controlCell">
- <input data-dojo-type="dijit/form/NumberSpinner"
+ <input data-dojo-type="dijit/form/ValidationTextBox"
id="editVirtualHost.storeUnderfullSize"
data-dojo-props="
name: 'storeUnderfullSize',
placeHolder: 'size in bytes',
required: false,
- title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages',
- constraints:{min:0,places:0}"
+ title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"
/>
</div>
</div>