From 151622bd91d7eb031498ff598a31a295af27799b Mon Sep 17 00:00:00 2001 From: Andrew MacBean Date: Fri, 25 Jul 2014 16:16:12 +0000 Subject: QPID-5928: [Java Broker] Implement or update virtualhostnode & virtualhost Work completed by Alex Rudyy and me. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1613461 13f79535-47bb-0310-9956-ffa450edef68 --- .../js/qpid/management/virtualhost/bdb/show.js | 38 +++++ .../js/qpid/management/virtualhost/bdb_ha/show.js | 69 +++++++++ .../js/qpid/management/virtualhostnode/bdb/show.js | 58 +------- .../qpid/management/virtualhostnode/bdb_ha/show.js | 54 +------ .../java/resources/virtualhost/bdb_ha/show.html | 75 ++++++++++ .../java/resources/virtualhostnode/bdb/show.html | 5 +- .../resources/virtualhostnode/bdb_ha/show.html | 14 -- .../store/BrokerStoreUpgraderAndRecoverer.java | 14 +- .../store/BrokerStoreUpgraderAndRecovererTest.java | 47 +++++- .../js/qpid/management/virtualhost/derby/add.js | 40 +++++ .../js/qpid/management/virtualhost/derby/show.js | 38 +++++ .../qpid/management/virtualhost/store/derby/add.js | 56 ------- .../qpid/management/virtualhostnode/derby/show.js | 27 +--- .../resources/virtualhost/store/derby/add.html | 25 ---- .../java/resources/virtualhostnode/derby/show.html | 6 +- .../js/qpid/management/store/pool/bonecp/show.js | 63 ++++++++ .../java/resources/store/pool/bonecp/show.html | 37 +++++ .../jdbc/DefaultConnectionProviderFactory.java | 2 +- .../js/qpid/management/store/pool/none/show.js | 33 +++++ .../js/qpid/management/virtualhost/jdbc/show.js | 56 +++++++ .../qpid/management/virtualhostnode/jdbc/show.js | 57 ++++---- .../java/resources/virtualhost/store/jdbc/add.html | 31 ---- .../resources/virtualhostnode/jdbc/none/add.html | 17 --- .../java/resources/virtualhostnode/jdbc/show.html | 20 +-- .../virtualhostnode/store/pool/none/add.html | 17 +++ .../preferences/filesystempreferences/show.html | 2 +- .../src/main/java/resources/css/common.css | 5 + .../src/main/java/resources/editVirtualHost.html | 118 +++++++++++++++ .../src/main/java/resources/js/qpid/common/util.js | 73 +++++++++- .../resources/js/qpid/management/VirtualHost.js | 134 +++++++++++++---- .../js/qpid/management/VirtualHostNode.js | 4 +- .../js/qpid/management/editVirtualHost.js | 161 +++++++++++++++++++++ .../js/qpid/management/virtualhost/derby/add.js | 40 ----- .../management/virtualhost/providedstore/show.js | 37 +++++ .../qpid/management/virtualhostnode/json/show.js | 47 +++--- .../src/main/java/resources/showVirtualHost.html | 78 ++++++++-- .../main/java/resources/showVirtualHostNode.html | 9 +- .../resources/virtualhost/providedstore/show.html | 30 ++++ .../resources/virtualhost/sizemonitoring/show.html | 34 +++++ .../js/qpid/management/virtualhost/memory/show.js | 33 +++++ .../qpid/management/virtualhostnode/memory/show.js | 33 +++++ 41 files changed, 1294 insertions(+), 443 deletions(-) create mode 100644 qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js create mode 100644 qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js create mode 100644 qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html create mode 100644 qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js create mode 100644 qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js delete mode 100644 qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js delete mode 100644 qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/store/derby/add.html create mode 100644 qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js create mode 100644 qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/store/pool/bonecp/show.html create mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js create mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js delete mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/store/jdbc/add.html delete mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html create mode 100644 qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html create mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html create mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js delete mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js create mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js create mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/show.html create mode 100644 qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html create mode 100644 qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/show.js create mode 100644 qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js (limited to 'qpid/java') diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js new file mode 100644 index 0000000000..d7e84aa6a4 --- /dev/null +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/show.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +define(["qpid/common/util", + "dojo/domReady!"], + function (util) + { + var fields = ["storePath", "storeUnderfullSize", "storeOverfullSize"]; + + function BDB(data) + { + util.buildUI(data.containerNode, data.parent, "virtualhost/sizemonitoring/show.html", fields, this); + } + + BDB.prototype.update = function(data) + { + util.updateUI(data, fields, this); + } + + return BDB; + } +); diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js new file mode 100644 index 0000000000..d95d223e2d --- /dev/null +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js @@ -0,0 +1,69 @@ +/* + * 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(["qpid/common/util", "dojo/query", "dojo/domReady!"], + function (util, query) + { + var fields = [ "storeUnderfullSize", "storeOverfullSize", "permittedNodes"]; + var syncPolicies = ["sync", "no_sync", "write_no_sync"]; + var localTransactionSynchronizationPolicy = "localTransactionSynchronizationPolicy"; + var remoteTransactionSynchronizationPolicy = "remoteTransactionSynchronizationPolicy"; + + function BDB(data) + { + util.buildUI(data.containerNode, data.parent, "virtualhost/bdb_ha/show.html", fields, this); + for(var i=0; i + +
+
+
Store Overfull Limit:
+
bytes
+
+
+
Store Underfull Limit:
+
bytes
+
+
+
Permitted Nodes:
+
+
+
+
+ +
+
Before each transaction commit returns to the caller the following will be true:
+
+
At the master node, the node will have received the required minimum number of acknowledgements from the replica nodes and the transaction will have been:
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
At the required minimum number od replica nodes, the transaction will have been:
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ + +
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html index cdf96c3fb8..b1e4a34d96 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html @@ -20,7 +20,4 @@
-
-
-
- \ No newline at end of file + diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html index c37fa87922..46894bdfd3 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html @@ -35,10 +35,6 @@
Address:
N/A
-
-
Durability:
-
N/A
-
Allow this node to operate solo:
N/A
@@ -54,16 +50,6 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java index 6cc56d0e4d..6f53c1601d 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecoverer.java @@ -242,7 +242,19 @@ public class BrokerStoreUpgraderAndRecoverer addAttributeTransformer("createdBy", copyAttribute()). addAttributeTransformer("storePath", mutateAttributeName("connectionURL")). addAttributeTransformer("connectionURL", mutateAttributeName("connectionUrl")). - addAttributeTransformer("connectionPool", mutateAttributeName("connectionPoolType")). + addAttributeTransformer("connectionPool", new AttributeTransformer() + { + @Override + public MutableEntry transform(MutableEntry entry) + { + Object value = entry.getValue(); + if ("DEFAULT".equals(value)) + { + value = "NONE"; + } + return new MutableEntry("connectionPoolType", value); + } + }). addAttributeTransformer("jdbcBigIntType", addContextVar("qpid.jdbcstore.bigIntType")). addAttributeTransformer("jdbcBytesForBlob", addContextVar("qpid.jdbcstore.useBytesForBlob")). addAttributeTransformer("jdbcBlobType", addContextVar("qpid.jdbcstore.blobType")). diff --git a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java index 7eb5e3b63c..479c117e19 100644 --- a/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java +++ b/qpid/java/broker-core/src/test/java/org/apache/qpid/server/store/BrokerStoreUpgraderAndRecovererTest.java @@ -63,7 +63,7 @@ public class BrokerStoreUpgraderAndRecovererTest extends QpidTestCase mock(BrokerOptions.class)); } - public void testUpgradeVirtualHostWithJDBCStore() + public void testUpgradeVirtualHostWithJDBCStoreAndBoneCPPool() { Map hostAttributes = new HashMap<>(); hostAttributes.put("name", "test"); @@ -114,6 +114,51 @@ public class BrokerStoreUpgraderAndRecovererTest extends QpidTestCase assertEquals("Unexpected attributes", expectedAttributes, upgradedVirtualHostNodeRecord.getAttributes()); } + public void testUpgradeVirtualHostWithJDBCStoreAndDefaultPool() + { + Map hostAttributes = new HashMap<>(); + hostAttributes.put("name", "test"); + hostAttributes.put("modelVersion", "0.4"); + hostAttributes.put("connectionPool", "DEFAULT"); + hostAttributes.put("connectionURL", "jdbc:derby://localhost:1527/tmp/vh/test;create=true"); + hostAttributes.put("createdBy", "webadmin"); + hostAttributes.put("createdTime", 1401385905260l); + hostAttributes.put("storeType", "jdbc"); + hostAttributes.put("type", "STANDARD"); + hostAttributes.put("jdbcBigIntType", "mybigint"); + hostAttributes.put("jdbcBlobType", "myblob"); + hostAttributes.put("jdbcVarbinaryType", "myvarbinary"); + hostAttributes.put("jdbcBytesForBlob", true); + + + ConfiguredObjectRecord virtualHostRecord = new ConfiguredObjectRecordImpl(UUID.randomUUID(), "VirtualHost", + hostAttributes, Collections.singletonMap("Broker", _brokerRecord)); + DurableConfigurationStore dcs = new DurableConfigurationStoreStub(_brokerRecord, virtualHostRecord); + + BrokerStoreUpgraderAndRecoverer recoverer = new BrokerStoreUpgraderAndRecoverer(_systemContext); + List records = recoverer.upgrade(dcs); + + ConfiguredObjectRecord upgradedVirtualHostNodeRecord = findRecordById(virtualHostRecord.getId(), records); + assertEquals("Unexpected type", "VirtualHostNode", upgradedVirtualHostNodeRecord.getType()); + Map expectedAttributes = new HashMap<>(); + expectedAttributes.put("connectionPoolType", "NONE"); + expectedAttributes.put("connectionUrl", "jdbc:derby://localhost:1527/tmp/vh/test;create=true"); + expectedAttributes.put("createdBy", "webadmin"); + expectedAttributes.put("createdTime", 1401385905260l); + expectedAttributes.put("name", "test"); + expectedAttributes.put("type", "JDBC"); + + final Map context = new HashMap<>(); + context.put("qpid.jdbcstore.bigIntType", "mybigint"); + context.put("qpid.jdbcstore.varBinaryType", "myvarbinary"); + context.put("qpid.jdbcstore.blobType", "myblob"); + context.put("qpid.jdbcstore.useBytesForBlob", true); + + expectedAttributes.put("context", context); + + assertEquals("Unexpected attributes", expectedAttributes, upgradedVirtualHostNodeRecord.getAttributes()); + } + public void testUpgradeVirtualHostWithDerbyStore() { Map hostAttributes = new HashMap<>(); 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 new file mode 100644 index 0000000000..21d377445d --- /dev/null +++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js @@ -0,0 +1,40 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +define(["dojo/_base/xhr", + "dojo/parser", + "dojo/dom", + "dojo/dom-construct", + "dojo/json", + "dijit/registry", + "dojo/text!virtualhost/sizemonitoring/add.html", + "dijit/form/ValidationTextBox", + "dijit/form/NumberTextBox", + "dojo/domReady!"], + function (xhr, parser, dom, domConstruct, json, registry, template) + { + return { + show: function (data) + { + this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode); + parser.parse(this.containerNode); + } + }; + } +); diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js new file mode 100644 index 0000000000..e53ad75fe4 --- /dev/null +++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/show.js @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +define(["qpid/common/util", + "dojo/domReady!"], + function (util) + { + var fields = ["storePath", "storeUnderfullSize", "storeOverfullSize"]; + + function Derby(data) + { + util.buildUI(data.containerNode, data.parent, "virtualhost/sizemonitoring/show.html", fields, this); + } + + Derby.prototype.update = function(data) + { + util.updateUI(data, fields, this); + } + + return Derby; + } +); diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js b/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js deleted file mode 100644 index 04016b5fae..0000000000 --- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/store/derby/add.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -define(["dojo/_base/xhr", - "dojo/dom", - "dojo/dom-construct", - "dojo/_base/window", - "dijit/registry", - "dojo/parser", - "dojo/_base/array", - "dojo/_base/event", - "dojo/_base/json", - "dojo/string", - "dojo/store/Memory", - "dijit/form/FilteringSelect", - "dojo/domReady!"], - function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect) { - return { - show: function() { - var node = dom.byId("addVirtualHost.storeSpecificDiv"); - var that = this; - - array.forEach(registry.toArray(), - function(item) { - if(item.id.substr(0,34) == "formAddVirtualHost.specific.store.") { - item.destroyRecursive(); - } - }); - - xhr.get({url: "virtualhost/store/derby/add.html", - sync: true, - load: function(data) { - node.innerHTML = data; - parser.parse(node); - - }}); - } - }; - }); 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 5272e76e4c..cc84f9edc1 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 @@ -18,34 +18,19 @@ * under the License. * */ -define(["dojo/_base/xhr", - "dojo/_base/lang", - "dojo/_base/connect", - "dojo/parser", - "dojo/string", - "dojox/html/entities", - "dojo/query", - "dojo/json", - "dojo/domReady!"], - function (xhr, lang, connect, parser, json, entities, query, json) +define(["qpid/common/util", "dojo/domReady!"], + function (util) { + var fields = ["storePath"]; + function DerbyNode(data) { - var containerNode = data.containerNode; - this.parent = data.parent; - var that = this; - xhr.get({url: "virtualhostnode/derby/show.html", - sync: true, - load: function(template) { - containerNode.innerHTML = template; - parser.parse(containerNode); - }}); - this.storePath = query(".storePath", containerNode)[0]; + util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this); } DerbyNode.prototype.update=function(data) { - this.storePath.innerHTML = entities.encode(String(data.storePath)); + util.updateUI(data, fields, this); }; return DerbyNode; diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/store/derby/add.html b/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/store/derby/add.html deleted file mode 100644 index ead232d0b1..0000000000 --- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhost/store/derby/add.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - -
Path to store location*: - -
diff --git a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html b/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html index 9cf5dadae8..2bdbc761e6 100644 --- a/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html +++ b/qpid/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html @@ -16,6 +16,6 @@ -->
-
Store Path:
-
-
\ No newline at end of file +
Store Path:
+
+
diff --git a/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js new file mode 100644 index 0000000000..c0556c28fd --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js @@ -0,0 +1,63 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ +define(["dojo/_base/xhr", + "dojo/_base/lang", + "dojo/_base/connect", + "dojo/parser", + "dojo/string", + "dojox/html/entities", + "dojo/query", + "dojo/json", + "dojo/domReady!"], + function (xhr, lang, connect, parser, json, entities, query, json) + { + var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"]; + + function BoneCP(data) + { + var containerNode = data.containerNode; + this.parent = data.parent; + var that = this; + xhr.get({url: "store/pool/bonecp/show.html", + sync: true, + load: function(template) { + containerNode.innerHTML = template; + parser.parse(containerNode); + }}); + for(var i=0; i +
+
+
+
+
Partition Count:
+
+
+
+
Minimum connections per Partition:
+
+
+
+
Maximum connections per Partition:
+
+
+
+
+
+ diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java index 9e10c54f7e..0a829696f0 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/org/apache/qpid/server/store/jdbc/DefaultConnectionProviderFactory.java @@ -30,7 +30,7 @@ import java.util.Set; @PluggableService public class DefaultConnectionProviderFactory implements JDBCConnectionProviderFactory { - public static final String TYPE = "DEFAULT"; + public static final String TYPE = "NONE"; @Override public String getType() diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js new file mode 100644 index 0000000000..39cb2bf507 --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/show.js @@ -0,0 +1,33 @@ +/* + * + * 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([], + function () + { + function NonePool(data) + { + } + + NonePool.prototype.update=function(data) + { + }; + + return NonePool; +}); diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js new file mode 100644 index 0000000000..5e3a5a087c --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.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(["qpid/common/util", "dojo/query", "dojo/domReady!"], + function (util, query) + { + var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; + + function JDBC(data) + { + util.buildUI(data.containerNode, data.parent, "virtualhostnode/jdbc/show.html", fieldNames, this); + this.usernameAttributeContainer=query(".usernameAttributeContainer", data.containerNode)[0]; + this.connectionPoolTypeAttributeContainer=query(".connectionPoolTypeAttributeContainer", data.containerNode)[0]; + } + + JDBC.prototype.update = function(data) + { + util.updateUI(data, fieldNames, this); + this.usernameAttributeContainer.style.display = data.username ? "block" : "none"; + if (!this.poolDetails) + { + var that = this; + require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"], + function(PoolDetails) + { + that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that}); + that.poolDetails.update(data); + } + ); + } + else + { + this.poolDetails.update(data); + } + } + + return JDBC; + } +); diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js index eb58b3e7c7..ced243241b 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js @@ -18,46 +18,43 @@ * under the License. * */ -define(["dojo/_base/xhr", - "dojo/_base/lang", - "dojo/_base/connect", - "dojo/parser", - "dojo/string", - "dojox/html/entities", + +define(["qpid/common/util", "dojo/query", - "dojo/json", "dojo/domReady!"], - function (xhr, lang, connect, parser, json, entities, query, json) + function (util, query) { - var fieldNames = ["connectionUrl", "bigIntType", "varBinaryType", "blobType", "bytesForBlob", "connectionPoolType"]; + var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; - function JdbcNode(data) + function Jdbc(data) { - var containerNode = data.containerNode; - this.parent = data.parent; - var that = this; - xhr.get({url: "virtualhostnode/jdbc/show.html", - sync: true, - load: function(template) { - containerNode.innerHTML = template; - parser.parse(containerNode); - }}); - for(var i=0; i - - - - - - - - - -
JDBC Url*: - -
Connection Pool:
-
-
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html deleted file mode 100644 index 2666129a1f..0000000000 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/none/add.html +++ /dev/null @@ -1,17 +0,0 @@ - - diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html index 63fec28012..7ba60f2f6b 100644 --- a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/show.html @@ -19,26 +19,16 @@
Connection URL:
-
-
Big Integer Type:
-
-
-
-
Var Binary Type:
-
-
-
-
Blob Type:
-
-
-
-
Bytes For Blob:
-
+
+
Username:
+
Connection Pool Type:
+
+
diff --git a/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html new file mode 100644 index 0000000000..2666129a1f --- /dev/null +++ b/qpid/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/store/pool/none/add.html @@ -0,0 +1,17 @@ + + diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html index bc302d1e65..aca9f5d309 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/authenticationprovider/preferences/filesystempreferences/show.html @@ -18,4 +18,4 @@
Path:
-
\ No newline at end of file +
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css index 8a0ea792f5..8be41ce793 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css @@ -205,4 +205,9 @@ div .messages { font-style: italic; } +.dijitDialogPaneActionBar .editNodeButton +{ + display: none +} + 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 new file mode 100644 index 0000000000..04d6a803a2 --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html @@ -0,0 +1,118 @@ + +
+
+
+ +
+ +
+
Dead letter queue enabled:
+
+ + +
+
+ +
+
Store Transaction Idle Timeout Warn:
+
+ +
+
+
+
Store Transaction Idle Timeout Close:
+
+ +
+
+
+
Store Transaction Open Timeout Warn:
+
+ +
+
+
+
Store Transaction Open Timeout Close:
+
+ +
+
+ +
+
House keeping check period (ms):
+
+ +
+
+ +
+
House keeping thread count:
+
+ +
+
+ +
+ +
+ + +
+
+
+
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 1391d7d5ff..60c05a5df6 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 @@ -26,6 +26,9 @@ define(["dojo/_base/xhr", "dojo/dom-construct", "dojo/dom-geometry", "dojo/window", + "dojo/query", + "dojo/parser", + "dojox/html/entities", "dijit/TitlePane", "dijit/Dialog", "dijit/form/Form", @@ -38,7 +41,7 @@ define(["dojo/_base/xhr", "dojox/validate/web", "dojo/domReady!" ], - function (xhr, event, json, lang, dom, geometry, win) { + function (xhr, event, json, lang, dom, geometry, win, query, parser, entities) { var util = {}; if (Array.isArray) { util.isArray = function (object) { @@ -491,5 +494,73 @@ define(["dojo/_base/xhr", return object1 === object2; } + util.buildUI = function(containerNode, parent, htmlTemplateLocation, fieldNames, obj) + { + xhr.get({url: htmlTemplateLocation, + sync: true, + load: function(template) { + containerNode.innerHTML = template; + parser.parse(containerNode); + }}); + for(var i=0; iName:
+
+
Type:
+
+
State:
@@ -38,6 +42,65 @@
Lifespan:
+
+
Dead letter queue enabled:
+
+
+
+
+ +
+ +
+
+
Idle timeout before a warning (ms) :
+
+
The time a transaction can be idle for after which a warning alert will be issued
+
+
+
Idle timeout before closing (ms) :
+
+
The time a transaction can be idle for before the connection it is on is closed
+
+
+
Open timeout before warning (ms) :
+
+
The time a transaction can be open for after which a warning alert will be issued
+
+
+
Open timeout before closing (ms) :
+
+
The time a transaction can be open for before the connection it is on is closed
+
+
+
+ +
+ +
+
+
House keeping check period (ms):
+
+
+
+
House keeping thread count:
+
+
+
+
+ + + +
+ + + + +
+ +
+ +
Inbound:
@@ -56,20 +119,9 @@
-
-
Store Type:
-
-
-
-
Store Path:
-
-
-
-
Config Path:
-
-
-
+ +
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHostNode.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHostNode.html index f5643eebfd..d6c0bcb549 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHostNode.html +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/showVirtualHostNode.html @@ -26,18 +26,13 @@
Name:
-
-
State:
-
-
Type:
-
Message Store Provider:
- - +
State:
+
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/show.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/show.html new file mode 100644 index 0000000000..a81511495b --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/providedstore/show.html @@ -0,0 +1,30 @@ + + +
+
+
Store Overfull Limit:
+
bytes
+
+
+
Store Underfull Limit:
+
bytes
+
+
+
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html new file mode 100644 index 0000000000..23f9069ce2 --- /dev/null +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html @@ -0,0 +1,34 @@ + + +
+
+
Store Path:
+
+
+
+
Store Overfull Limit:
+
bytes
+
+
+
Store Underfull Limit:
+
bytes
+
+
+
diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/show.js b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/show.js new file mode 100644 index 0000000000..a431b63b86 --- /dev/null +++ b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/show.js @@ -0,0 +1,33 @@ +/* + * 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([], + function () + { + function Memory(data) + { + } + + Memory.prototype.update = function(data) + { + } + + return Memory; + } +); diff --git a/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js new file mode 100644 index 0000000000..a431b63b86 --- /dev/null +++ b/qpid/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js @@ -0,0 +1,33 @@ +/* + * 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([], + function () + { + function Memory(data) + { + } + + Memory.prototype.update = function(data) + { + } + + return Memory; + } +); -- cgit v1.2.1