summaryrefslogtreecommitdiff
path: root/qpid/java/broker-plugins
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2013-07-05 20:59:00 +0000
committerRobert Godfrey <rgodfrey@apache.org>2013-07-05 20:59:00 +0000
commit79e8440bdaac4a4dd764ace6b81cd300717c7d67 (patch)
tree72be60d2fdd1e78dd4b7d707ac78befddf5efec0 /qpid/java/broker-plugins
parent88c521cc70189673c259cbccd2f7ea7732a8588a (diff)
downloadqpid-python-79e8440bdaac4a4dd764ace6b81cd300717c7d67.tar.gz
QPID-4980 : [Java Broker] In HTTP Management make (standard) virtual host store attributes depended upon store type
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1500134 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/standard/addVirtualHost.js19
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js56
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js56
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js56
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/standard/add.html9
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/derby/add.html9
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/jdbc/add.html9
-rw-r--r--qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/memory/add.html0
8 files changed, 204 insertions, 10 deletions
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
index cd56ca9cba..164e118e09 100644
--- 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
@@ -26,11 +26,12 @@ define(["dojo/_base/xhr",
"dojo/parser",
"dojo/_base/array",
"dojo/_base/event",
- 'dojo/_base/json',
+ "dojo/_base/json",
+ "dojo/string",
"dojo/store/Memory",
"dijit/form/FilteringSelect",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser, array, event, json, Memory, FilteringSelect) {
+ function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) {
return {
show: function() {
var node = dom.byId("addVirtualHost.typeSpecificDiv");
@@ -43,6 +44,17 @@ define(["dojo/_base/xhr",
}
});
+
+ 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) {
@@ -70,7 +82,8 @@ define(["dojo/_base/xhr",
that.storeTypeChooser = new FilteringSelect({ id: "addVirtualHost.specific.storeType",
name: "storeType",
store: storeTypesStore,
- searchAttr: "name", required: false}, input);
+ searchAttr: "name", required: false,
+ onChange: selectStoreType }, input);
});
}});
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js
new file mode 100644
index 0000000000..a17561d7ed
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js
@@ -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.
+ *
+ */
+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,27) == "formAddVirtualHost.specific") {
+ item.destroyRecursive();
+ }
+ });
+
+ xhr.get({url: "virtualhost/store/derby/add.html",
+ sync: true,
+ load: function(data) {
+ node.innerHTML = data;
+ parser.parse(node);
+
+ }});
+ }
+ };
+ });
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js
new file mode 100644
index 0000000000..2b5f1f2053
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/jdbc/add.js
@@ -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.
+ *
+ */
+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,27) == "formAddVirtualHost.specific") {
+ item.destroyRecursive();
+ }
+ });
+
+ xhr.get({url: "virtualhost/store/jdbc/add.html",
+ sync: true,
+ load: function(data) {
+ node.innerHTML = data;
+ parser.parse(node);
+
+ }});
+ }
+ };
+ });
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js
new file mode 100644
index 0000000000..010242cb9b
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/store/memory/add.js
@@ -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.
+ *
+ */
+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,27) == "formAddVirtualHost.specific") {
+ item.destroyRecursive();
+ }
+ });
+
+ xhr.get({url: "virtualhost/store/memory/add.html",
+ sync: true,
+ load: function(data) {
+ node.innerHTML = data;
+ parser.parse(node);
+
+ }});
+ }
+ };
+ });
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
index 9596ef4175..3519d0dbd6 100644
--- 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
@@ -3,11 +3,6 @@
<td class="tableContainer-labelCell" style="width: 300px;"><strong>Store Type*: </strong></td>
<td class="tableContainer-valueCell" ><div id="addVirtualHost.specific.selectStoreType"></div></td>
</tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Path to store location*: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" required="true" id="formAddVirtualHost.specific.storePath"
- name="storePath" placeholder="/path/to/message/store" />
- </td>
- </tr>
</table>
+<div id="addVirtualHost.storeSpecificDiv">
+</div>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/derby/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/derby/add.html
new file mode 100644
index 0000000000..9424612e3c
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/derby/add.html
@@ -0,0 +1,9 @@
+<table class="tableContainer-table tableContainer-table-horiz">
+ <tr>
+ <td class="tableContainer-labelCell" style="width: 300px;"><strong>Path to store location*: </strong></td>
+ <td class="tableContainer-valueCell">
+ <input dojoType="dijit/form/ValidationTextBox" required="true" id="formAddVirtualHost.specific.storePath"
+ name="storePath" placeholder="/path/to/message/store" />
+ </td>
+ </tr>
+</table>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/jdbc/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/jdbc/add.html
new file mode 100644
index 0000000000..f0a091ea4e
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/jdbc/add.html
@@ -0,0 +1,9 @@
+<table class="tableContainer-table tableContainer-table-horiz">
+ <tr>
+ <td class="tableContainer-labelCell" style="width: 300px;"><strong>JDBC Url*: </strong></td>
+ <td class="tableContainer-valueCell">
+ <input dojoType="dijit/form/ValidationTextBox" required="true" id="formAddVirtualHost.specific.connectionURL"
+ name="connectionURL" placeholder="jdbc:provider:info" />
+ </td>
+ </tr>
+</table>
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/memory/add.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/memory/add.html
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/store/memory/add.html