You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kw...@apache.org on 2014/07/17 12:24:52 UTC
svn commit: r1611314 - in /qpid/trunk/qpid/java:
bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/
bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/
bdbstore/src/main/java/resources/js/qpid/management/vir...
Author: kwall
Date: Thu Jul 17 10:24:52 2014
New Revision: 1611314
URL: http://svn.apache.org/r1611314
Log:
QPID-5413: [Java Broker] Add VHN/VH creation dialog for BDB HA.
Work completed by Andrew MacBean <ma...@apache.org> and me.
Added:
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js
- copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js
- copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
- copied, changed from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
Removed:
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js
Modified:
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js
Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js (from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js&r1=1611181&r2=1611314&rev=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/add.js Thu Jul 17 10:24:52 2014
@@ -1,5 +1,4 @@
/*
- *
* 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
@@ -16,36 +15,25 @@
* 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/_base/window",
+ "dojo/json",
"dijit/registry",
- "dojo/parser",
- "dojo/_base/array",
+ "dojo/text!virtualhost/bdb_ha/add.html",
+ "dijit/form/ValidationTextBox",
+ "dijit/form/CheckBox",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser, array) {
- return {
- show: function() {
-
- var node = dom.byId("addVirtualHost.typeSpecificDiv");
- var that = this;
-
- array.forEach(registry.toArray(),
- function(item) {
- if(item.id.substr(0,27) == "formAddVirtualHost.specific") {
- item.destroyRecursive();
- }
- });
-
- xhr.get({url: "virtualhost/bdb_ha/add.html",
- sync: true,
- load: function(data) {
- node.innerHTML = data;
- parser.parse(node);
- }});
- }
- };
- });
+ 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);
+ }
+ };
+ }
+);
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js?rev=1611314&r1=1611313&r2=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add.js Thu Jul 17 10:24:52 2014
@@ -20,6 +20,7 @@
*/
define(["dojo/_base/xhr",
"dojo/parser",
+ "dojo/_base/array",
"dojo/dom",
"dojo/dom-construct",
"dojo/json",
@@ -28,46 +29,48 @@ define(["dojo/_base/xhr",
"dijit/form/ValidationTextBox",
"dijit/form/RadioButton",
"dojo/domReady!"],
- function (xhr, parser, dom, domConstruct, json, registry, template)
+ function (xhr, parser, array, dom, domConstruct, json, registry, template)
{
+ return {
+ show: function(data)
+ {
+ var that=this;
- var nodeFields = ["address", "helperAddress", "joinGroup", "newGroup"];
+ this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+ parser.parse(this.containerNode);
- 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);
- }
+ // lookup field
+ this.groupChoice = registry.byId("addVirtualHostNode.group");
+ this.virtualHostNodeBdbhaTypeFieldsContainer = dom.byId("addVirtualHostNode.bdbha.typeFields");
- 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 );
- }
- }
- );
- }
- };
+ // add callback
+ this.groupChoice.on("change", function(type){that._groupChoiceChanged(type, that.virtualHostNodeBdbhaTypeFieldsContainer, "qpid/management/virtualhostnode/bdb_ha/add/");});
+
+ },
+ _groupChoiceChanged: function(type, typeFieldsContainer, urlStem)
+ {
+ var widgets = registry.findWidgets(typeFieldsContainer);
+ array.forEach(widgets, function(item) { item.destroyRecursive();});
+ domConstruct.empty(typeFieldsContainer);
+
+ if (type)
+ {
+ var that = this;
+ require([urlStem + type.toLowerCase() + "/add"],
+ function(TypeUI)
+ {
+ try
+ {
+ TypeUI.show({containerNode:typeFieldsContainer, parent: that});
+ }
+ catch(e)
+ {
+ console.warn(e);
+ }
+ }
+ );
+ }
+ }
+ };
}
);
Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js (from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js&r1=1611181&r2=1611314&rev=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/addVirtualHost.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/existinggroup/add.js Thu Jul 17 10:24:52 2014
@@ -1,5 +1,4 @@
/*
- *
* 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
@@ -16,36 +15,25 @@
* 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/_base/window",
+ "dojo/json",
"dijit/registry",
- "dojo/parser",
- "dojo/_base/array",
+ "dojo/text!virtualhostnode/bdb_ha/add/existinggroup/add.html",
+ "dijit/form/ValidationTextBox",
+ "dijit/form/CheckBox",
"dojo/domReady!"],
- function (xhr, dom, construct, win, registry, parser, array) {
- return {
- show: function() {
-
- var node = dom.byId("addVirtualHost.typeSpecificDiv");
- var that = this;
-
- array.forEach(registry.toArray(),
- function(item) {
- if(item.id.substr(0,27) == "formAddVirtualHost.specific") {
- item.destroyRecursive();
- }
- });
-
- xhr.get({url: "virtualhost/bdb_ha/add.html",
- sync: true,
- load: function(data) {
- node.innerHTML = data;
- parser.parse(node);
- }});
- }
- };
- });
+ 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);
+ }
+ };
+ }
+);
Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js?rev=1611314&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/add/newgroup/add.js Thu Jul 17 10:24:52 2014
@@ -0,0 +1,52 @@
+/*
+ * 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/newgroup/add.html",
+ "dijit/form/ValidationTextBox",
+ "dijit/form/CheckBox",
+ "dojo/domReady!"],
+ function (xhr, parser, dom, domConstruct, json, registry, template)
+ {
+ return {
+ show: function(data)
+ {
+ var that=this;
+
+ this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+ parser.parse(this.containerNode);
+
+ // lookup field
+ var virtualHostNodeAddress = registry.byId("addVirtualHostNode.address");
+ this.virtualHostNodeHelperAddress = registry.byId("addVirtualHostNode.helperAddress");
+
+ // add callback
+ virtualHostNodeAddress.on("change", function(address){that._addressChanged(address, that.virtualHostNodeHelperAddress);});
+ },
+ _addressChanged: function(address, virtualHostNodeHelperAddress)
+ {
+ virtualHostNodeHelperAddress.set("value", address);
+ }
+ };
+ }
+);
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html?rev=1611314&r1=1611313&r2=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/add.html Thu Jul 17 10:24:52 2014
@@ -14,77 +14,7 @@
~ 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" id="formAddVirtualHost.specific.storePath"
- required="true" name="storePath" placeholder="/path/to/message/store"/>
- </td>
- </tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Node Name*: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" id="formAddVirtualHost.specific.nodeName"
- required="true" name="name" placeholder="node name"/>
- </td>
- </tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Replication Group*: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" id="formAddVirtualHost.specific.groupName"
- required="true" name="groupName" placeholder="group name"/>
- </td>
- </tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Node Address*: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" id="formAddVirtualHost.specific.nodeAddress"
- required="true" name="address" data-dojo-props="regExp:'([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}', invalidMessage:'Must be of the form host:port'" placeholder="host:port"/>
- </td>
- </tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Helper Address*: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" id="formAddVirtualHost.specific.helperAddress"
- required="true" name="helperAddress" data-dojo-props="regExp:'([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}', invalidMessage:'Must be of the form host:port'" placeholder="host:port"/>
- </td>
- </tr>
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Durability: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/ValidationTextBox" id="formAddVirtualHost.specific.haDurability"
- name="haDurability" placeholder="NO_SYNC,NO_SYNC,SIMPLE_MAJORITY"/>
- </td>
- </tr>
-
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Coalesce local sync: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/CheckBox" id="formAddVirtualHost.specific.haCoalescingSync"
- checked="true" onchange="require(['dijit/registry', 'dojo/domReady!'],
- function(registry){
- var checkbox = registry.byId('formAddVirtualHost.specific.haCoalescingSync');
- var hidden = registry.byId('formAddVirtualHost.specific.haCoalescingSyncHidden');
- hidden.set('value', checkbox.get('checked'));
- })"/>
-
- <input dojoType="dijit/form/TextBox" id="formAddVirtualHost.specific.haCoalescingSyncHidden" type="hidden" name="coalescingSync" value="true"/>
- </td>
-
- </tr>
-
- <tr>
- <td class="tableContainer-labelCell" style="width: 300px;"><strong>Designated Primary: </strong></td>
- <td class="tableContainer-valueCell">
- <input dojoType="dijit/form/CheckBox" id="formAddVirtualHost.specific.haDesignatedPrimary"
- onchange="require(['dijit/registry', 'dojo/domReady!'],
- function(registry){
- var checkbox = registry.byId('formAddVirtualHost.specific.haDesignatedPrimary');
- var hidden = registry.byId('formAddVirtualHost.specific.haDesignatedPrimaryHidden');
- hidden.set('value', checkbox.get('checked'));
- })"/>
- <input dojoType="dijit/form/TextBox" id="formAddVirtualHost.specific.haDesignatedPrimaryHidden" type="hidden" name="designatedPrimary" value="false"/>
- </td>
- </tr>
-</table>
+<div>
+ <div style="clear:both"></div>
+ <div class="infoMessage">The virtualhost will have the same name as the group.</div>
+</div>
\ No newline at end of file
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html?rev=1611314&r1=1611313&r2=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html Thu Jul 17 10:24:52 2014
@@ -20,84 +20,23 @@
-->
<div>
<div style="clear:both">
- <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Node Group*:</div>
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Create new group or join existing 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 data-dojo-type="dojo/store/Memory"
+ data-dojo-id="groupStore"
+ data-dojo-props="data: [{id: 'newgroup', name: 'New Group'}, {id: 'existinggroup', name: 'Existing Group'}]"></div>
+ <input data-dojo-type="dijit/form/FilteringSelect"
+ data-dojo-props="store:groupStore,
+ searchAttr:'name',
+ required: true,
+ placeHolder: 'choose new or existing'"
+ name="group"
+ id="addVirtualHostNode.group" />
</div>
</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: 'unique node name per broker',
- required: true,
- missingMessage: 'A node name must be supplied',
- title: 'Enter a unique node name per broker',
- pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
- </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;">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 id="addVirtualHostNode.bdbha.typeFields"></div>
</div>
Added: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html?rev=1611314&view=auto
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html (added)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html Thu Jul 17 10:24:52 2014
@@ -0,0 +1,117 @@
+<!--
+ ~ 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 class="formBox">
+ <fieldset>
+ <legend>Existing details</legend>
+ <div style="clear:both">
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Group 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: 'group name',
+ required: true,
+ missingMessage: 'The group name must be supplied',
+ title: 'Enter the group 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 from group*:</div>
+ <div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
+ <input type="text" id="addVirtualHostNode.helperNodeName"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="
+ name: 'name',
+ placeHolder: 'existing node name from the group',
+ required: true,
+ missingMessage: 'A node name must be supplied',
+ title: 'Enter a 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;">Node address of same node*:</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: 'existing node address from the group',
+ required: true,
+ missingMessage: 'Node host and port must be supplied',
+ title: 'Enter address',
+ pattern: '([0-9a-zA-Z.-_]|::)+:[0-9]{1,5}'" />
+ </div>
+ </div>
+ </fieldset>
+ </div>
+
+
+ <div class="formBox">
+ <fieldset>
+ <legend>New node details</legend>
+ <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: 'unique node name per broker',
+ required: true,
+ missingMessage: 'A node name must be supplied',
+ title: 'Enter a unique node name per broker',
+ 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.storePath"
+ 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>
+ </fieldset>
+ </div>
+ <div style="clear:both"></div>
+</div>
Copied: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html (from r1611181, qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html)
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html?p2=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html&p1=qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html&r1=1611181&r2=1611314&rev=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html Thu Jul 17 10:24:52 2014
@@ -1,36 +1,23 @@
<!--
- -
- - 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.
- -
- -->
+ ~ 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;">Node Name*:</div>
<div class="formLabel-controlCell tableContainer-valueCell" style="float:left;">
<input type="text" id="addVirtualHostNode.nodeName"
@@ -45,16 +32,16 @@
</div>
</div>
<div style="clear:both">
- <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Virtual Host Name*:</div>
+ <div class="formLabel-labelCell tableContainer-labelCell" style="float:left; width: 300px;">Group 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',
+ placeHolder: 'group name',
required: true,
- missingMessage: 'A virtual host name must be supplied',
- title: 'Enter virtual host name',
+ missingMessage: 'A group name must be supplied',
+ title: 'Enter a group name',
pattern: '^[\x20-\x2e\x30-\x7F]{1,255}$'" />
</div>
</div>
@@ -75,7 +62,7 @@
<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"
+ <input type="text" id="addVirtualHostNode.storePath"
data-dojo-type="dijit/form/ValidationTextBox"
data-dojo-props="
name: 'storePath',
@@ -85,19 +72,10 @@
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>
+
+ <input type="hidden" id="addVirtualHostNode.helperAddress"
+ data-dojo-type="dijit/form/ValidationTextBox"
+ data-dojo-props="name: 'helperAddress'" />
+
<div style="clear:both"></div>
</div>
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css?rev=1611314&r1=1611313&r2=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/css/common.css Thu Jul 17 10:24:52 2014
@@ -92,7 +92,7 @@ div .messages {
.formBox {
border: .1em solid lightgrey;
- margin: 10px 0px 20px 0px;
+ margin: 10px 5px;
border-radius: 5px;
}
@@ -104,7 +104,7 @@ div .messages {
}
.formBox fieldset {
- padding: 10px 0px 10px 0px;
+ padding: 5px;
}
.formBox .formLabel-labelCell {
@@ -187,4 +187,10 @@ div .messages {
background: url("../images/help.png") no-repeat;
width: 16px;
height: 16px;
+}
+
+.infoMessage
+{
+ padding: 5px;
+ font-style: italic;
}
\ No newline at end of file
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js?rev=1611314&r1=1611313&r2=1611314&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/addVirtualHostNodeAndVirtualHost.js Thu Jul 17 10:24:52 2014
@@ -86,18 +86,18 @@ define(["dojo/_base/xhr",
//VH Type BDB_HA_REPLICA is not user creatable. This is only needed until we have model meta data available.
this.supportedVirtualHostTypes = array.filter(this.supportedVirtualHostTypes, function(item){
- return item != "BDB_HA_REPLICA";
+ return item != "BDB_HA_REPLICA" && item != "BDB_HA";
});
var virtualHostNodeTypeStore = this._makeTypeStore(this.supportedVirtualHostNodeTypes);
this.virtualHostNodeType.set("store", virtualHostNodeTypeStore);
this.virtualHostNodeType.set("disabled", false);
- this.virtualHostNodeType.on("change", function(type){that._typeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");});
+ this.virtualHostNodeType.on("change", function(type){that._vhnTypeChanged(type, that.virtualHostNodeTypeFieldsContainer, "qpid/management/virtualhostnode/");});
- var virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes);
- this.virtualHostType.set("store", virtualHostTypeStore);
+ this.virtualHostTypeStore = this._makeTypeStore(this.supportedVirtualHostTypes);
+ this.virtualHostType.set("store", this.virtualHostTypeStore);
this.virtualHostType.set("disabled", false);
- this.virtualHostType.on("change", function(type){that._typeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");});
+ this.virtualHostType.on("change", function(type){that._vhTypeChanged(type, that.virtualHostTypeFieldsContainer, "qpid/management/virtualhost/");});
},
show: function()
{
@@ -122,6 +122,16 @@ define(["dojo/_base/xhr",
this.containerNode = null;
}
},
+ _vhnTypeChanged: function (type, typeFieldsContainer, urlStem)
+ {
+ this._processDropDownsForBdbHa(type);
+ this._processDropDownsForJson(type);
+ this._typeChanged(type, typeFieldsContainer, urlStem);
+ },
+ _vhTypeChanged: function (type, typeFieldsContainer, urlStem)
+ {
+ this._typeChanged(type, typeFieldsContainer, urlStem);
+ },
_typeChanged: function (type, typeFieldsContainer, urlStem)
{
var widgets = registry.findWidgets(typeFieldsContainer);
@@ -146,6 +156,52 @@ define(["dojo/_base/xhr",
);
}
},
+ _processDropDownsForBdbHa: function (type)
+ {
+ if (type == "BDB_HA")
+ {
+ this.virtualHostType.set("disabled", true);
+ if (!this.virtualHostTypeStore.get("BDB_HA"))
+ {
+ this.virtualHostTypeStore.add({id: "BDB_HA", name: "BDB_HA"});
+ }
+ this.virtualHostType.set("value", "BDB_HA");
+ }
+ else
+ {
+ if (this.virtualHostType.value == "BDB_HA")
+ {
+ if (this.virtualHostTypeStore.get("BDB_HA"))
+ {
+ this.virtualHostTypeStore.remove("BDB_HA");
+ }
+ this.virtualHostType.set("value", "");
+ }
+ this.virtualHostType.set("disabled", false);
+ }
+ },
+ _processDropDownsForJson: function (type)
+ {
+ if (type == "JSON")
+ {
+ if (this.virtualHostType.value == "ProvidedStore")
+ {
+ this.virtualHostType.set("value", "");
+ }
+
+ if (this.virtualHostTypeStore.get("ProvidedStore"))
+ {
+ this.virtualHostTypeStore.remove("ProvidedStore");
+ }
+ }
+ else
+ {
+ if (!this.virtualHostTypeStore.get("ProvidedStore"))
+ {
+ this.virtualHostTypeStore.add({id: "ProvidedStore", name: "ProvidedStore"});
+ }
+ }
+ },
_cancel: function(e)
{
this.dialog.hide();
@@ -164,12 +220,6 @@ define(["dojo/_base/xhr",
var virtualHostNodeData = this._getValues(this.virtualHostNodeForm);
var virtualHostData = this._getValues(this.virtualHostForm);
- if (virtualHostNodeData["type"] == "JSON" && virtualHostData["type"] == "ProvidedStore")
- {
- alert('Cannot use a JSON Virtual Host Node with a ProvidedStore Virtual Host');
- return;
- }
-
//Default the VH name to be the same as the VHN name.
virtualHostData["name"] = virtualHostNodeData["name"];
@@ -184,7 +234,7 @@ define(["dojo/_base/xhr",
error: function(error) {success = false; failureReason = error;}
});
- if(success === true)
+ if(success === true && virtualHostNodeData["type"] != "BDB_HA")
{
var encodedVirtualHostName = encodeURIComponent(virtualHostData.name);
xhr.put({
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org