diff options
| author | Andrew MacBean <macbean@apache.org> | 2014-07-25 16:16:12 +0000 |
|---|---|---|
| committer | Andrew MacBean <macbean@apache.org> | 2014-07-25 16:16:12 +0000 |
| commit | 151622bd91d7eb031498ff598a31a295af27799b (patch) | |
| tree | 37c36b0b878866689603d6c85da3a217d6125d2d /qpid/java/broker-plugins/derby-store | |
| parent | 6b02c4c08fdc26de6e048357111d9e0b85ab4927 (diff) | |
| download | qpid-python-151622bd91d7eb031498ff598a31a295af27799b.tar.gz | |
QPID-5928: [Java Broker] Implement or update virtualhostnode & virtualhost
Work completed by Alex Rudyy <orudyy@apache.org> and me.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1613461 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins/derby-store')
6 files changed, 87 insertions, 105 deletions
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 @@ -<!-- - ~ 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. - --> -<table class="tableContainer-table tableContainer-table-horiz"> - <tr> - <td class="tableContainer-labelCell" style="width: 300px;"><strong>Path to store location*: </strong></td> - <td class="tableContainer-valueCell"> - <input dojoType="dijit/form/ValidationTextBox" required="true" id="formAddVirtualHost.specific.store.storePath" - name="storePath" placeholder="/path/to/message/store" /> - </td> - </tr> -</table> 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 @@ --> <div style="clear:both"> - <div class="formLabel-labelCell" style="float:left; width: 200px;">Store Path:</div> - <div class="storePath" style="float:left;"></div> -</div>
\ No newline at end of file + <div class="formLabel-labelCell" style="float:left; width: 200px;">Store Path:</div> + <div class="storePath" style="float:left;"></div> +</div> |
