From 810c0fd315d05472926efcddbeaf29aef443997c Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Fri, 1 Aug 2014 18:08:31 +0000 Subject: QPID-5928: [Java Broker] Add UI into web management console for editing of virtual host nodes and virtual hosts The work is done by Andrew MacBean and Alex Rudyy. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1615187 13f79535-47bb-0310-9956-ffa450edef68 --- .../js/qpid/management/virtualhost/bdb/edit.js | 30 +++ .../js/qpid/management/virtualhost/bdb_ha/edit.js | 155 +++++++++++++++ .../js/qpid/management/virtualhostnode/bdb/edit.js | 30 +++ .../js/qpid/management/virtualhostnode/bdb/show.js | 2 + .../qpid/management/virtualhostnode/bdb_ha/edit.js | 184 ++++-------------- .../qpid/management/virtualhostnode/bdb_ha/show.js | 12 +- .../java/resources/virtualhost/bdb_ha/edit.html | 131 +++++++++++++ .../java/resources/virtualhost/bdb_ha/show.html | 10 +- .../java/resources/virtualhostnode/bdb/show.html | 2 +- .../virtualhostnode/bdb_ha/add/newgroup/add.html | 8 +- .../resources/virtualhostnode/bdb_ha/edit.html | 208 +++++++++------------ .../resources/virtualhostnode/bdb_ha/show.html | 4 +- .../js/qpid/management/virtualhost/derby/edit.js | 30 +++ .../qpid/management/virtualhostnode/derby/edit.js | 30 +++ .../qpid/management/virtualhostnode/derby/show.js | 2 + .../java/resources/virtualhostnode/derby/show.html | 2 +- .../js/qpid/management/store/pool/bonecp/edit.js | 55 ++++++ .../virtualhost/store/pool/bonecp/add.html | 5 + .../virtualhostnode/store/pool/bonecp/add.html | 5 + .../js/qpid/management/store/pool/none/edit.js | 26 +++ .../js/qpid/management/virtualhost/jdbc/edit.js | 76 ++++++++ .../js/qpid/management/virtualhost/jdbc/show.js | 11 +- .../qpid/management/virtualhostnode/jdbc/edit.js | 89 +++++++++ .../qpid/management/virtualhostnode/jdbc/show.js | 15 +- .../main/java/resources/virtualhost/jdbc/edit.html | 79 ++++++++ .../java/resources/virtualhostnode/jdbc/edit.html | 78 ++++++++ .../src/main/java/resources/css/common.css | 17 +- .../src/main/java/resources/editVirtualHost.html | 176 +++++++++-------- .../main/java/resources/editVirtualHostNode.html | 48 +++++ .../src/main/java/resources/js/qpid/common/util.js | 108 ++++++++--- .../resources/js/qpid/management/VirtualHost.js | 2 +- .../js/qpid/management/VirtualHostNode.js | 17 +- .../js/qpid/management/editVirtualHost.js | 90 +++++---- .../js/qpid/management/editVirtualHostNode.js | 170 +++++++++++++++++ .../qpid/management/virtualhostnode/json/edit.js | 30 +++ .../resources/virtualhost/providedstore/show.html | 8 +- .../resources/virtualhost/sizemonitoring/edit.html | 68 +++++++ .../resources/virtualhost/sizemonitoring/show.html | 10 +- .../resources/virtualhostnode/filebased/edit.html | 38 ++++ .../java/resources/virtualhostnode/json/show.html | 2 +- .../js/qpid/management/virtualhost/memory/edit.js | 28 +++ .../qpid/management/virtualhostnode/memory/show.js | 5 + 42 files changed, 1638 insertions(+), 458 deletions(-) create mode 100644 java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js create mode 100644 java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js create mode 100644 java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js create mode 100644 java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html create mode 100644 java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js create mode 100644 java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js create mode 100644 java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js create mode 100644 java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js create mode 100644 java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js create mode 100644 java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js create mode 100644 java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html create mode 100644 java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html create mode 100644 java/broker-plugins/management-http/src/main/java/resources/editVirtualHostNode.html create mode 100644 java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHostNode.js create mode 100644 java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js create mode 100644 java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html create mode 100644 java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/edit.html create mode 100644 java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/edit.js (limited to 'java') diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js new file mode 100644 index 0000000000..5438eda926 --- /dev/null +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js @@ -0,0 +1,30 @@ +/* + * 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 fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"]; + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data); + } + }; + } +); diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js new file mode 100644 index 0000000000..bc62654c56 --- /dev/null +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js @@ -0,0 +1,155 @@ +/* + * 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", "dijit/registry", "dojo/_base/window", "dojo/domReady!"], + function (util, registry, win) + { + var fieldNames = ["storeUnderfullSize", "storeOverfullSize"]; + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhost/bdb_ha/edit.html", "editVirtualHost.", fieldNames, data.data); + + var widget = registry.byId("editVirtualHost.localTransactionSynchronizationPolicy-" + data.data["localTransactionSynchronizationPolicy"]); + if (widget) + { + widget.set("checked", true); + } + widget = registry.byId("editVirtualHost.remoteTransactionSynchronizationPolicy-" + data.data["remoteTransactionSynchronizationPolicy"]); + if (widget) + { + widget.set("checked", true); + } + + var that = this; + this.permittedNodes = registry.byId("editVirtualHost.permittedNodes"); + this.permittedNodesList = registry.byId("editVirtualHost.permittedNodesList"); + this.permittedNodesList.on("change", function(value){that._changePermittedNodeList(value);}); + + // permitted node text field + this.permittedNode = registry.byId("editVirtualHost.permittedNode"); + this.permittedNode.on("change", function(value){that._changePermittedNode(value);}); + + // add and remove buttons & click handlers + this.permittedNodeAddButton = registry.byId("editVirtualHost.permittedNodeAdd"); + this.permittedNodeAddButton.set("disabled", true); + this.permittedNodeRemoveButton = registry.byId("editVirtualHost.permittedNodeRemove"); + this.permittedNodeRemoveButton.set("disabled", true); + this.permittedNodeAddButton.on("click", function(e){that._clickAddPermittedNodeButton(e);}); + this.permittedNodeRemoveButton.on("click", function(e){that._clickRemovePermittedNodeButton(e);}); + + var permittedNodes = data.data.permittedNodes; + for(var i=0; i 0; + this.permittedNodeRemoveButton.set("disabled", !hasSelection); + }, + _changePermittedNode: function(value) + { + var fieldIsEmpty = (this.permittedNode.get("value") == ""); + this.permittedNodeAddButton.set("disabled", fieldIsEmpty); + return true; + }, + _updatePermittedNodes: function() + { + var values = []; + var children = this.permittedNodesList.containerNode.children; + for (var i = 0; i < children.length; i++) + { + var child = children.item(i); + values.push(children.item(i).value); + } + this.permittedNodes.set("value", values); + } + }; + } +); diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js new file mode 100644 index 0000000000..35ecbec315 --- /dev/null +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/edit.js @@ -0,0 +1,30 @@ +/* + * 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", "dijit/registry", "dojo/domReady!"], + function (util, registry) + { + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhostnode/filebased/edit.html", "editVirtualHostNode.", ["storePath"], data.data); + registry.byId("editVirtualHostNode.storePath").set("disabled", !(data.data.state == "STOPPED" || data.data.state == "ERRORED")); + } + }; + } +); diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js index b7f29f9469..bef6a4214d 100644 --- a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/show.js @@ -25,11 +25,13 @@ define(["qpid/common/util", "dojo/domReady!"], function BdbNode(data) { + this.parent = data.parent; util.buildUI(data.containerNode, data.parent, "virtualhostnode/bdb/show.html", fieldNames, this); } BdbNode.prototype.update=function(data) { + this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED")); util.updateUI(data, fieldNames, this); }; diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js index 02996046e3..f2f256cd89 100644 --- a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/edit.js @@ -18,163 +18,47 @@ * under the License. * */ -define(["dojo/_base/xhr", - "dojo/_base/array", - "dojo/_base/event", - "dojo/_base/lang", - "dojo/_base/window", - "dojo/dom", - "dojo/dom-construct", +define(["qpid/common/util", "dijit/registry", - "dojo/parser", - 'dojo/json', - "dojo/query", "dojo/store/Memory", "dojo/data/ObjectStore", - "dojo/text!virtualhostnode/bdb_ha/edit.html", - "dijit/Dialog", - "dijit/form/CheckBox", - "dijit/form/FilteringSelect", - "dijit/form/ValidationTextBox", - "dijit/form/Button", - "dijit/form/Form", - "dojox/validate/us", - "dojox/validate/web", "dojo/domReady!"], - function (xhr, array, event, lang, win, dom, domConstruct, registry, parser, json, query, Memory, ObjectStore, template) - { - var fields = [ "storePath", "name", "groupName", "address", - "designatedPrimary", "priority", "quorumOverride"]; + function (util, registry, Memory, ObjectStore) + { + var fields = [ "storePath", "name", "groupName", "address", + "designatedPrimary", "priority", "quorumOverride"]; - var bdbHaNodeEditor = - { - init: function() - { - var that=this; - this.containerNode = domConstruct.create("div", {innerHTML: template}); - parser.parse(this.containerNode); - this.dialog = registry.byId("editBDBHANodeDialog") - this.saveButton = registry.byId("editBDBHANode.saveButton"); - this.cancelButton = registry.byId("editBDBHANode.cancelButton"); - this.cancelButton.on("click", function(e){that._cancel(e);}); - this.saveButton.on("click", function(e){that._save(e);}); - for(var i = 0; i < fields.length; i++) - { - var fieldName = fields[i]; - this[fieldName] = registry.byId("editBDBHANode." + fieldName); - } - this.form = registry.byId("editBDBHANodeForm"); - }, - show: function(nodeName) - { - var that=this; - this.nodeName = nodeName; - this.query = "api/latest/virtualhostnode/" + encodeURIComponent(nodeName); - xhr.get( - { - url: this.query, - sync: true, - handleAs: "json", - load: function(data) + return { + show: function(data) + { + var node = data.data; + util.buildEditUI(data.containerNode, "virtualhostnode/bdb_ha/edit.html", "editVirtualHostNode.", fields, node); + if ( !(data.data.state == "ERRORED" || data.data.state == "STOPPED")) { - that._show(data[0]); + registry.byId("editVirtualHostNode.storePath").set("disabled", true); } - } - ); - }, - destroy: function() - { - if (this.dialog) - { - this.dialog.destroyRecursive(); - this.dialog = null; - } - if (this.containerNode) - { - domConstruct.destroy(this.containerNode); - this.containerNode = null; - } - }, - _cancel: function(e) - { - this.dialog.hide(); - }, - _save: function(e) - { - event.stop(e); - if(this.form.validate()) - { - var data = {}; - for(var i = 0; i < fields.length; i++) - { - var fieldName = fields[i]; - var widget = this[fieldName]; - if (!widget.get("disabled")) + var overrideData = [{id: '0', name: 'Majority', selected: '1'}]; + if (node.remotereplicationnodes && node.remotereplicationnodes.length>1) { - data[fieldName] = widget.hasOwnProperty("checked")? widget.get("checked"):widget.get("value"); + registry.byId("editVirtualHostNode.designatedPrimary").set("disabled", true); + registry.byId("editVirtualHostNode.priority").set("disabled", false); + registry.byId("editVirtualHostNode.quorumOverride").set("disabled", false); + var overrideLimit = Math.floor((node.remotereplicationnodes.length + 1)/2); + for(var i = 1; i <= overrideLimit; i++) + { + overrideData.push({id: i, name: i + ""}); + } } - } - var success = false,failureReason=null; - xhr.put({ - url: this.query, - sync: true, - handleAs: "json", - headers: { "Content-Type": "application/json"}, - putData: json.stringify(data), - load: function(x) {success = true; }, - error: function(error) {success = false; failureReason = error;} - }); - - if(success === true) - { - this.dialog.hide(); - } - else - { - alert("Error:" + failureReason); - } - } - else - { - alert('Form contains invalid data. Please correct first'); - } - }, - _show:function(node) - { - for(var i = 0; i < fields.length; i++) - { - var fieldName = fields[i]; - this[fieldName].set("value", node[fieldName]); - } - - var overrideData = [{id: '0', name: 'Majority', selected: '1'}]; - - if (node.remotereplicationnodes && node.remotereplicationnodes.length>1) - { - this["designatedPrimary"].set("disabled", true); - this["priority"].set("disabled", false); - this["quorumOverride"].set("disabled", false); - var overrideLimit = Math.floor((node.remotereplicationnodes.length + 1)/2); - for(var i = 1; i <= overrideLimit; i++) - { - overrideData.push({id: i, name: i + ""}); - } - } - else - { - this["designatedPrimary"].set("disabled", false); - this["priority"].set("disabled", true); - this["quorumOverride"].set("disabled", true); - } - var store = new Memory({data :overrideData, idProperty: "id" }); - this["quorumOverride"].set("store", new ObjectStore({objectStore: store})); - this.dialog.show(); - } - }; - - bdbHaNodeEditor.init(); - - return bdbHaNodeEditor; - } -); \ No newline at end of file + else + { + registry.byId("editVirtualHostNode.designatedPrimary").set("disabled", false); + registry.byId("editVirtualHostNode.priority").set("disabled", true); + registry.byId("editVirtualHostNode.quorumOverride").set("disabled", true); + } + var store = new Memory({data :overrideData, idProperty: "id" }); + registry.byId("editVirtualHostNode.quorumOverride").set("store", new ObjectStore({objectStore: store})); + } + }; + } +); diff --git a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js index 43cb2a1992..f927b81c9d 100644 --- a/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js +++ b/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js @@ -27,10 +27,9 @@ define(["dojo/_base/xhr", "dojox/grid/EnhancedGrid", "qpid/common/UpdatableStore", "qpid/management/UserPreferences", - "qpid/management/virtualhostnode/bdb_ha/edit", "qpid/common/util", "dojo/domReady!"], - function (xhr, connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, edit, util) + function (xhr, connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, UserPreferences, util) { var priorityNames = {'_0': 'Never', '_1': 'Default', '_2': 'Normal', '_3': 'High'}; var nodeFields = ["storePath", "groupName", "role", "address", "designatedPrimary", "priority", "quorumOverride"]; @@ -154,18 +153,11 @@ define(["dojo/_base/xhr", } } ); - this.parent.editNodeButton.set("disabled", false); - this.parent.editNodeButton.domNode.style.display = "inline"; - this.parent.editNodeButton.on("click", - function(e) - { - edit.show(that.data.name); - } - ); } BDBHA.prototype.update=function(data) { + this.parent.editNodeButton.set("disabled", false); this.data = data; for(var i = 0; i < nodeFields.length; i++) { diff --git a/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html b/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html new file mode 100644 index 0000000000..2df0ebb0fd --- /dev/null +++ b/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html @@ -0,0 +1,131 @@ + +
+ +
+
Store overfull size (bytes):
+
+ +
+
+
+
Store underfull size (bytes):
+
+ +
+
+ +
+
+ Permitted group nodes +
+
Permitted addresses*:
+
+ + +
+ +
+ +
+
+
Address:
+
+ +
+ +
+
+
+ +
+ +
+
+ High availability durability +
+
Master transaction sync policy
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+
Replica transaction sync policy
+
+ + +
+ +
+ + +
+ +
+ + +
+
+
+
+ +
diff --git a/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html b/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html index a5a4147c9c..35ab0a0bcf 100644 --- a/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html +++ b/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/show.html @@ -19,15 +19,15 @@
-
Store Overfull Limit:
+
Store overfull size:
bytes
-
Store Underfull Limit:
+
Store underfull size:
bytes
-
Permitted Nodes:
+
Permitted nodes:
@@ -35,7 +35,7 @@
-
Local Transaction Sync Policy:
+
Master transaction sync policy:
SYNC (the transaction will be written and synchronized to the disk; highest durability) WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later) @@ -43,7 +43,7 @@
-
Remote Transaction Sync Policy:
+
Replica transaction sync policy:
SYNC (the transaction will be written and synchronized to the disk; highest durability) WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later) diff --git a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html index 29efa712e7..a93a11086c 100644 --- a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html +++ b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/show.html @@ -16,7 +16,7 @@ -->
-
Store Path:
+
Configuration store path:
diff --git a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html index 02542a28ce..642482bd4f 100644 --- a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html +++ b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html @@ -73,9 +73,7 @@ title: 'Enter permitted nodes'">
-
- -
+
@@ -91,9 +89,7 @@ intermediateChanges: true, pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
-
- -
+
diff --git a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html index 94b9451057..026de1aa14 100644 --- a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html +++ b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html @@ -14,120 +14,96 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Path to store location*: - -
Node Name*: - -
Replication Group*: - -
Address*: - -
Allow this node to operate solo: - +
Replication Group*:
+
+ +
+ +
+
Address*:
+
+ +
+
+
+
Configuration store path*:
+
+ +
+
+
+
Allow this node to operate solo:
+
+ +
+
+
+
Election priority of this node:
+
+
+ -
Election priority of this node: -
- -
Required minimum number of nodes: -
- -
-
- - -
-
-
-
+ title: 'Select node priority for election as a Master', + store: nodePriorityStore, + searchAttr: 'name'" /> + + +
+
Required minimum number of nodes:
+
+
+ +
+
+ +
+ \ No newline at end of file diff --git a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html index cfd5804c01..7583eee9d4 100644 --- a/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html +++ b/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/show.html @@ -20,11 +20,11 @@ -->
-
Group Name:
+
Group name:
-
Store Path:
+
Configuration store path:
diff --git a/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js new file mode 100644 index 0000000000..5438eda926 --- /dev/null +++ b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js @@ -0,0 +1,30 @@ +/* + * 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 fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"]; + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data); + } + }; + } +); diff --git a/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js new file mode 100644 index 0000000000..5fa0443185 --- /dev/null +++ b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js @@ -0,0 +1,30 @@ +/* + * 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", "dijit/registry", "dojo/domReady!"], + function (util, registry) + { + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhostnode/filebased/edit.html", "editVirtualHostNode.", ["storePath"], data.data); + registry.byId("editVirtualHostNode.storePath").set("disabled", data.data.state != "STOPPED"); + } + }; + } +); diff --git a/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js index cc84f9edc1..22f6e4fa37 100644 --- a/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js +++ b/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/show.js @@ -25,11 +25,13 @@ define(["qpid/common/util", "dojo/domReady!"], function DerbyNode(data) { + this.parent = data.parent; util.buildUI(data.containerNode, data.parent, "virtualhostnode/derby/show.html", fields, this); } DerbyNode.prototype.update=function(data) { + this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED")); util.updateUI(data, fields, this); }; diff --git a/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html b/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html index a90ae74aaa..56c09a8ad7 100644 --- a/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html +++ b/java/broker-plugins/derby-store/src/main/java/resources/virtualhostnode/derby/show.html @@ -16,6 +16,6 @@ -->
-
Store Path:
+
Configuration store path:
diff --git a/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js new file mode 100644 index 0000000000..46345bca58 --- /dev/null +++ b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js @@ -0,0 +1,55 @@ +/* + * + * 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/domReady!"], + function (xhr, dom, construct, win, registry, parser) { + var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"]; + return { + show: function(data) { + var that = this; + xhr.get({url: "virtualhost/store/pool/bonecp/add.html", + sync: true, + load: function(template) { + for ( var i = 0 ; i < fieldNames.length; i++ ) + { + var widgetName = fieldNames[i]; + var widget = registry.byId("formAddVirtualHost.qpid.jdbcstore.bonecp." + widgetName); + if (widget) + { + widget.destroyRecursive(); + } + } + data.containerNode.innerHTML = template; + parser.parse(data.containerNode); + 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]); + } + }}); + } + }; + }); diff --git a/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html index 39fc3f617f..df35a3cce0 100644 --- a/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html +++ b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhost/store/pool/bonecp/add.html @@ -14,6 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> +
+
+BoneCP Settings @@ -54,3 +57,5 @@
+
+
\ No newline at end of file diff --git a/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html index dbaf8ea4ee..e4334e395f 100644 --- a/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html +++ b/java/broker-plugins/jdbc-provider-bone/src/main/java/resources/virtualhostnode/store/pool/bonecp/add.html @@ -14,6 +14,9 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> +
+
+BoneCP Settings @@ -54,3 +57,5 @@
+
+
\ No newline at end of file diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js new file mode 100644 index 0000000000..675a919b3d --- /dev/null +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/edit.js @@ -0,0 +1,26 @@ +/* + * + * 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 () + { + return {show: function(data) {}}; + } +); diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js new file mode 100644 index 0000000000..a4cd23392c --- /dev/null +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js @@ -0,0 +1,76 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +define(["qpid/common/util", + "dojo/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory", + "dojo/_base/array", + "dojo/json", + "dojo/string", + "dojo/store/Memory", + "dojo/dom", + "dojo/dom-construct", + "dijit/registry", + "dojo/domReady!"], + function (util, poolTypeJsonString, array, json, string, Memory, dom, domConstruct, registry) + { + + var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; + return { + show: function(data) + { + util.buildEditUI(data.containerNode, "virtualhost/jdbc/edit.html", "editVirtualHost.", fieldNames, data.data); + + var poolTypes = json.parse(poolTypeJsonString); + var poolTypesData = []; + for (var i =0 ; i < poolTypes.length; i++) + { + poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]}; + } + var poolTypesStore = new Memory({ data: poolTypesData }); + var poolTypeControl = registry.byId("editVirtualHost.connectionPoolType"); + poolTypeControl.set("store", poolTypesStore); + poolTypeControl.set("value", data.data.connectionPoolType); + + var passwordControl = registry.byId("editVirtualHost.password"); + if (data.data.password) + { + passwordControl.set("placeHolder", "*******"); + } + + var poolTypeFieldsDiv = dom.byId("editVirtualHost.poolSpecificDiv"); + poolTypeControl.on("change", + function(type) + { + if(type && string.trim(type) != "") + { + var widgets = registry.findWidgets(poolTypeFieldsDiv); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(poolTypeFieldsDiv); + + require(["qpid/management/store/pool/"+type.toLowerCase()+"/edit"], + function(poolType) + { + poolType.show({containerNode:poolTypeFieldsDiv, data: data.data}) + }); + } + } + ); + } + }; + } +); diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js index 5e3a5a087c..edca323926 100644 --- a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js @@ -18,8 +18,8 @@ * under the License. * */ -define(["qpid/common/util", "dojo/query", "dojo/domReady!"], - function (util, query) +define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"], + function (util, query, array, domConstruct, registry) { var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; @@ -32,14 +32,19 @@ define(["qpid/common/util", "dojo/query", "dojo/domReady!"], JDBC.prototype.update = function(data) { + var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null; util.updateUI(data, fieldNames, this); this.usernameAttributeContainer.style.display = data.username ? "block" : "none"; - if (!this.poolDetails) + if (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType) { var that = this; require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"], function(PoolDetails) { + var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(that.connectionPoolTypeAttributeContainer); + that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that}); that.poolDetails.update(data); } diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js new file mode 100644 index 0000000000..0e062b8f08 --- /dev/null +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js @@ -0,0 +1,89 @@ +/* + * 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/text!service/helper?action=pluginList&plugin=JDBCConnectionProviderFactory", + "dojo/_base/array", + "dojo/json", + "dojo/string", + "dojo/store/Memory", + "dojo/dom", + "dojo/dom-construct", + "dijit/registry", + "dojo/domReady!"], + function (util, poolTypeJsonString, array, json, string, Memory, dom, domConstruct, registry) + { + var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; + return { + 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); + } + + var poolTypes = json.parse(poolTypeJsonString); + var poolTypesData = []; + for (var i =0 ; i < poolTypes.length; i++) + { + poolTypesData[i]= {id: poolTypes[i], name: poolTypes[i]}; + } + var poolTypesStore = new Memory({ data: poolTypesData }); + var poolTypeControl = registry.byId("editVirtualHostNode.connectionPoolType"); + poolTypeControl.set("store", poolTypesStore); + poolTypeControl.set("value", data.data.connectionPoolType); + + var passwordControl = registry.byId("editVirtualHostNode.password"); + if (data.data.password) + { + passwordControl.set("placeHolder", "*******"); + } + + var poolTypeFieldsDiv = dom.byId("editVirtualHostNode.poolSpecificDiv"); + poolTypeControl.on("change", + function(type) + { + if(type && string.trim(type) != "") + { + var widgets = registry.findWidgets(poolTypeFieldsDiv); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(poolTypeFieldsDiv); + + require(["qpid/management/store/pool/"+type.toLowerCase()+"/edit"], + function(poolType) + { + poolType.show({containerNode:poolTypeFieldsDiv, data: data.data}) + + if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED")) + { + var widgets = registry.findWidgets(poolTypeFieldsDiv); + array.forEach(widgets, function(item) { item.set("disabled", true);}); + } + }); + } + } + ); + } + }; + } +); diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js index ced243241b..b41fe32010 100644 --- a/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js @@ -19,15 +19,14 @@ * */ -define(["qpid/common/util", - "dojo/query", - "dojo/domReady!"], - function (util, query) +define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"], + function (util, query, array, domConstruct, registry) { var fieldNames = ["connectionUrl", "username", "connectionPoolType"]; function Jdbc(data) { + this.parent = data.parent; util.buildUI(data.containerNode, data.parent, "virtualhostnode/jdbc/show.html", fieldNames, this); this.usernameAttributeContainer=query(".usernameAttributeContainer", data.containerNode)[0]; @@ -36,15 +35,21 @@ define(["qpid/common/util", Jdbc.prototype.update=function(data) { + var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null; + this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED")); util.updateUI(data, fieldNames, this); this.usernameAttributeContainer.style.display = data.username ? "block" : "none"; - if (!this.poolDetails) + if (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType) { var that = this; require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"], function(PoolDetails) { + var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer); + array.forEach(widgets, function(item) { item.destroyRecursive();}); + domConstruct.empty(that.connectionPoolTypeAttributeContainer); + that.poolDetails = new PoolDetails({containerNode:that.connectionPoolTypeAttributeContainer, parent: that}); that.poolDetails.update(data); } diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html b/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html new file mode 100644 index 0000000000..199d80f546 --- /dev/null +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhost/jdbc/edit.html @@ -0,0 +1,79 @@ + + +
+
+
JDBC Url*:
+
+ +
+
+
+
Username*:
+
+ +
+
+
+
Password*:
+
+ +
+
+
+
Connection Pool*:
+
+ +
+
+ +
+
+ +
diff --git a/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html b/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html new file mode 100644 index 0000000000..6f2ddfff73 --- /dev/null +++ b/java/broker-plugins/jdbc-store/src/main/java/resources/virtualhostnode/jdbc/edit.html @@ -0,0 +1,78 @@ + +
+
+
JDBC Url*:
+
+ +
+
+
+
Username*:
+
+ +
+
+
+
Password*:
+
+ +
+
+
+
Connection Pool*:
+
+ +
+
+ +
+
+
diff --git a/java/broker-plugins/management-http/src/main/java/resources/css/common.css b/java/broker-plugins/management-http/src/main/java/resources/css/common.css index d8ef0b30b6..2e1033c15e 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/css/common.css +++ b/java/broker-plugins/management-http/src/main/java/resources/css/common.css @@ -128,10 +128,6 @@ div .messages { width: 100%; } -.formBoxButtons { - float : right; -} - .formLabel-controlCell { padding: 1px; float: left; @@ -213,11 +209,6 @@ div .messages { font-style: italic; } -.dijitDialogPaneActionBar .editNodeButton -{ - display: none -} - .alignLeft { float: left; } @@ -227,3 +218,11 @@ div .messages { .multiLineValue { display: inline-block; } +.haOptionLabel { + font-weight: bold; + margin-left: 5px; +} +.editNoteBanner { + font-style: italic; + margin: 0px 0px 10px 5px; +} \ No newline at end of file diff --git a/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html b/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html index eac16d0acf..1be5c5d29c 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html +++ b/java/broker-plugins/management-http/src/main/java/resources/editVirtualHost.html @@ -19,94 +19,118 @@
- -
- +
NOTE: All changes will only take effect after Virtual Host restart.
-
Dead letter queue enabled:
-
- - +
Name*:
+
+
-
-
Store Transaction Idle Timeout Warn:
-
- -
-
-
-
Store Transaction Idle Timeout Close:
-
- -
-
-
-
Store Transaction Open Timeout Warn:
-
- -
-
-
-
Store Transaction Open Timeout Close:
-
- -
+
+ +
+
+ Store transaction settings +
+
Idle Timeout Warn:
+
+ +
+
+
+
Idle Timeout Close:
+
+ +
+
+
+
Open Timeout Warn:
+
+ +
+
+
+
Open Timeout Close:
+
+ +
+
+
-
-
House keeping check period (ms):
-
- -
+
+
+ House keeping settings +
+
Check period (ms):
+
+ +
+
+
+
Thread count:
+
+ +
+
+
+
-
House keeping thread count:
+
Dead letter queue enabled:
- + +
-
diff --git a/java/broker-plugins/management-http/src/main/java/resources/editVirtualHostNode.html b/java/broker-plugins/management-http/src/main/java/resources/editVirtualHostNode.html new file mode 100644 index 0000000000..49f069c06d --- /dev/null +++ b/java/broker-plugins/management-http/src/main/java/resources/editVirtualHostNode.html @@ -0,0 +1,48 @@ + +
+
+ +
NOTE: All changes will only take effect after Virtual Host Node restart.
+
+
Name*:
+
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
diff --git a/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js b/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js index 60c05a5df6..5ba7cc7b2c 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js +++ b/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js @@ -18,7 +18,6 @@ * under the License. * */ - define(["dojo/_base/xhr", "dojo/_base/event", "dojo/json", @@ -29,6 +28,7 @@ define(["dojo/_base/xhr", "dojo/query", "dojo/parser", "dojox/html/entities", + "dijit/registry", "dijit/TitlePane", "dijit/Dialog", "dijit/form/Form", @@ -41,7 +41,7 @@ define(["dojo/_base/xhr", "dojox/validate/web", "dojo/domReady!" ], - function (xhr, event, json, lang, dom, geometry, win, query, parser, entities) { + function (xhr, event, json, lang, dom, geometry, win, query, parser, entities, registry) { var util = {}; if (Array.isArray) { util.isArray = function (object) { @@ -494,21 +494,42 @@ define(["dojo/_base/xhr", return object1 === object2; } - util.buildUI = function(containerNode, parent, htmlTemplateLocation, fieldNames, obj) + util.parseHtmlIntoDiv = function(containerNode, htmlTemplateLocation) { xhr.get({url: htmlTemplateLocation, - sync: true, - load: function(template) { - containerNode.innerHTML = template; - parser.parse(containerNode); - }}); - for(var i=0; i
-
Store Overfull Limit:
-
bytes
+
Store overfull size:
+
bytes
-
Store Underfull Limit:
-
bytes
+
Store underfull size:
+
bytes
diff --git a/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html b/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html new file mode 100644 index 0000000000..088057533b --- /dev/null +++ b/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/edit.html @@ -0,0 +1,68 @@ + + +
+ +
+
Message store path*:
+
+ +
+
+ +
+
Store overfull size (bytes):
+
+ +
+
+
+
Store underfull size (bytes):
+
+ +
+
+ +
+ +
diff --git a/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html b/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html index 245635b333..350a9777cb 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html +++ b/java/broker-plugins/management-http/src/main/java/resources/virtualhost/sizemonitoring/show.html @@ -19,16 +19,16 @@
-
Store Path:
+
Message store path:
-
Store Overfull Limit:
-
bytes
+
Store overfull size:
+
bytes
-
Store Underfull Limit:
-
bytes
+
Store underfull size:
+
bytes
diff --git a/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/edit.html b/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/edit.html new file mode 100644 index 0000000000..7c5c07e4a8 --- /dev/null +++ b/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/filebased/edit.html @@ -0,0 +1,38 @@ + + +
+ +
+
Configuration store path*:
+
+ +
+
+ +
+ +
diff --git a/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/show.html b/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/show.html index 05a85daf6e..b8c6adeed3 100644 --- a/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/show.html +++ b/java/broker-plugins/management-http/src/main/java/resources/virtualhostnode/json/show.html @@ -16,6 +16,6 @@ -->
-
Store Path:
+
Configuration store path:
diff --git a/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/edit.js b/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/edit.js new file mode 100644 index 0000000000..cfe7ebee8c --- /dev/null +++ b/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhost/memory/edit.js @@ -0,0 +1,28 @@ +/* + * 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/domReady!"], + function () + { + return { + show: function(data) + { + } + }; + } +); diff --git a/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js b/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js index a431b63b86..4c858c612a 100644 --- a/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js +++ b/java/broker-plugins/memory-store/src/main/java/resources/js/qpid/management/virtualhostnode/memory/show.js @@ -22,10 +22,15 @@ define([], { function Memory(data) { + this.parent = data.parent; + this.parent.editNodeButton.set("disabled",true); + this.parent.editNodeButton.domNode.style.display = "none"; } Memory.prototype.update = function(data) { + this.parent.editNodeButton.set("disabled", true); + this.parent.editNodeButton.domNode.style.display = "none"; } return Memory; -- cgit v1.2.1