summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins/jdbc-store
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 /qpid/java/broker-plugins/jdbc-store
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
Diffstat (limited to 'qpid/java/broker-plugins/jdbc-store')
-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
8 files changed, 20 insertions, 18 deletions
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">