summaryrefslogtreecommitdiff
path: root/qpid/java/bdbstore/src
diff options
context:
space:
mode:
authorAlex Rudyy <orudyy@apache.org>2014-05-13 13:03:28 +0000
committerAlex Rudyy <orudyy@apache.org>2014-05-13 13:03:28 +0000
commitffce902c8ed77fb770c1c3b77064504f4faf7452 (patch)
tree2f6f19ed41e7c739db0aba9189870141be350bd4 /qpid/java/bdbstore/src
parentc6774b45a316b499e0593b54a1c088ceca65265a (diff)
downloadqpid-python-ffce902c8ed77fb770c1c3b77064504f4faf7452.tar.gz
QPID-5413: Add UI for creation of virtual host nodes
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1594221 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore/src')
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/add.js41
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js73
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html61
-rw-r--r--qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html103
4 files changed, 278 insertions, 0 deletions
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/add.js
new file mode 100644
index 0000000000..4053a1bb41
--- /dev/null
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb/add.js
@@ -0,0 +1,41 @@
+/*
+ *
+ * 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!virtualhostnode/bdb/add.html",
+ "dijit/form/ValidationTextBox",
+ "dijit/form/CheckBox",
+ "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/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js
new file mode 100644
index 0000000000..83ae7e21cd
--- /dev/null
+++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js
@@ -0,0 +1,73 @@
+/*
+ *
+ * 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!virtualhostnode/bdb_ha/add.html",
+ "dijit/form/ValidationTextBox",
+ "dijit/form/RadioButton",
+ "dojo/domReady!"],
+ function (xhr, parser, dom, domConstruct, json, registry, template)
+ {
+
+ var nodeFields = ["address", "helperAddress", "joinGroup", "newGroup"];
+
+ return {
+ show: function(data)
+ {
+ var that = this;
+ this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+ parser.parse(this.containerNode);
+ for(var i=0; i<nodeFields.length;i++)
+ {
+ var fieldName = nodeFields[i];
+ this[fieldName]= registry.byId("addVirtualHostNode." + fieldName);
+ }
+
+ this.helperAddressContainer = dom.byId("addVirtualHostNode.helperAddressContainer");
+ this.joinGroup.on("change",
+ function(value)
+ {
+ that.helperAddressContainer.style.display = (this.checked ? "block" : "none");
+ }
+ );
+ this.newGroup.on("change",
+ function(value)
+ {
+ that.helperAddressContainer.style.display = (this.checked ? "none" : "block");
+ }
+ );
+ this.address.on("change",
+ function(value)
+ {
+ if (that.newGroup.checked)
+ {
+ that.helperAddress.set("value", value );
+ }
+ }
+ );
+ }
+ };
+ }
+);
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html
new file mode 100644
index 0000000000..b10e070630
--- /dev/null
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html
@@ -0,0 +1,61 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Node Name*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.bdbNodeName"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'name',
+ placeHolder: 'node name',
+ required: true,
+ missingMessage: 'A node name must be supplied',
+ title: 'Enter node name',
+ pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store path*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.bdbStorePath"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'storePath',
+ placeHolder: 'path/to/store',
+ required: true,
+ missingMessage: 'Store path must be supplied',
+ title: 'Enter store path'" />
+ </div>
+ </div>
+ <div style="clear:both;display:none">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Combined store:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.bdbMessageStoreProvider"
+ data-dojo-type="dijit/form/CheckBox"
+ data-dojo-props="
+ name: 'messageStoreProvider',
+ required: true,
+ checked: true" />
+ </div>
+ </div>
+ <div style="clear:both"></div>
+</div>
diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
new file mode 100644
index 0000000000..e8dff430f6
--- /dev/null
+++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
@@ -0,0 +1,103 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Node Group*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <div>
+ <input type="radio" data-dojo-type="dijit/form/RadioButton" name="group" id="addVirtualHostNode.newGroup" value="new" checked="checked" />
+ <label for="addVirtualHostNode.newGroup">New Group</label>
+ <input type="radio" data-dojo-type="dijit/form/RadioButton" name="group" id="addVirtualHostNode.joinGroup" value="join" />
+ <label for="addVirtualHostNode.joinGroup">Join Group</label>
+ </div>
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Name*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.groupName"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'groupName',
+ placeHolder: 'virtual host name',
+ required: true,
+ missingMessage: 'A virtual host name must be supplied',
+ title: 'Enter virtual host name',
+ pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Node Name*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.nodeName"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'name',
+ placeHolder: 'node name',
+ required: true,
+ missingMessage: 'A node name must be supplied',
+ title: 'Enter node name',
+ pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Address*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.address"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'address',
+ placeHolder: 'host:port',
+ required: true,
+ missingMessage: 'Node host and port must be supplied',
+ title: 'Enter address',
+ pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ </div>
+ </div>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Store path*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.bdbHAstorePath"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'storePath',
+ placeHolder: 'path/to/store',
+ required: true,
+ missingMessage: 'Store path must be supplied',
+ title: 'Enter store path'" />
+ </div>
+ </div>
+ <div style="clear:both;display:none" id="addVirtualHostNode.helperAddressContainer">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Existing node address from the group*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.helperAddress"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'helperAddress',
+ placeHolder: 'host:port',
+ required: true,
+ missingMessage: 'Node host and port must be supplied',
+ title: 'Enter address',
+ pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ </div>
+ </div>
+ <div style="clear:both"></div>
+</div>