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/11/08 13:41:37 UTC
svn commit: r1637550 - in /qpid/trunk/qpid/java:
bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/
bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/
bdbstore/src/main/java/resources/virtualhost/bdb_ha/ bdbstore/...
Author: kwall
Date: Sat Nov 8 12:41:36 2014
New Revision: 1637550
URL: http://svn.apache.org/r1637550
Log:
QPID-6220: [Java Broker] BDB HA VH edit dialogue - ensure master/replica synch policy displayed reflects that that is in force
* Add missing tooltips too
Modified:
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js
qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb/edit.js Sat Nov 8 12:41:36 2014
@@ -19,11 +19,10 @@
define(["dijit/registry", "qpid/common/util", "dojo/domReady!"],
function (registry, util)
{
- var fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"];
return {
show: function(data)
{
- util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+ util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", null, null);
registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js Sat Nov 8 12:41:36 2014
@@ -19,12 +19,10 @@
define(["qpid/common/util", "qpid/common/metadata", "dijit/registry", "dojo/domReady!"],
function (util, metadata, registry, win)
{
- var fieldNames = ["storeUnderfullSize", "storeOverfullSize",
- "localTransactionSynchronizationPolicy", "remoteTransactionSynchronizationPolicy"];
return {
show: function(data)
{
- util.buildEditUI(data.containerNode, "virtualhost/bdb_ha/edit.html", "editVirtualHost.", fieldNames, data.data);
+ util.buildEditUI(data.containerNode, "virtualhost/bdb_ha/edit.html", "editVirtualHost.", null, null);
registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html Sat Nov 8 12:41:36 2014
@@ -54,25 +54,39 @@
<div>
<div class="haOptionLabel">Master transaction sync policy</div>
- <select id="editVirtualHost.localTransactionSynchronizationPolicy"
- name="localTransactionSynchronizationPolicy"
- data-dojo-type="dojox/form/CheckedMultiSelect">
- <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
- <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
- <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
- </select>
+ <span id="editVirtualHost.localTransactionSynchronizationPolicy.span">
+ <select id="editVirtualHost.localTransactionSynchronizationPolicy"
+ name="localTransactionSynchronizationPolicy"
+ data-dojo-type="dojox/form/CheckedMultiSelect">
+ <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
+ <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
+ <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
+ </select>
+ </span>
+ <div id="editVirtualHost.localTransactionSynchronizationPolicy.tooltip"
+ data-dojo-type="dijit/Tooltip"
+ data-dojo-props="connectId: ['editVirtualHost.localTransactionSynchronizationPolicy', 'editVirtualHost.localTransactionSynchronizationPolicy.span'],
+ label: 'Synchronization policy applied at a node that is currently a master'">
+ </div>
</div>
<br/>
<div>
<div class="haOptionLabel">Replica transaction sync policy</div>
- <select id="editVirtualHost.remoteTransactionSynchronizationPolicy"
- name="remoteTransactionSynchronizationPolicy"
- data-dojo-type="dojox/form/CheckedMultiSelect">
- <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
- <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
- <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
- </select>
+ <span id="editVirtualHost.remoteTransactionSynchronizationPolicy.span">
+ <select id="editVirtualHost.remoteTransactionSynchronizationPolicy"
+ name="remoteTransactionSynchronizationPolicy"
+ data-dojo-type="dojox/form/CheckedMultiSelect">
+ <option value="SYNC">SYNC (the transaction will be written and synchronized to the disk; highest durability)</option>
+ <option value="WRITE_NO_SYNC">WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</option>
+ <option value="NO_SYNC">NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</option>
+ </select>
+ </span>
+ <div id="editVirtualHost.remoteTransactionSynchronizationPolicy.tooltip"
+ data-dojo-type="dijit/Tooltip"
+ data-dojo-props="connectId: ['editVirtualHost.remoteTransactionSynchronizationPolicy', 'editVirtualHost.remoteTransactionSynchronizationPolicy.span'],
+ label: 'Synchronization policy applied at a node that is currently a replica'">
+ </div>
</div>
</fieldset>
</div>
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html Sat Nov 8 12:41:36 2014
@@ -70,6 +70,11 @@
title: 'Enter list of the other node address that will form the group'">
</select> <!-- must use closing tag rather than shorthand - dojo bug? -->
</div>
+ <div id="addVirtualHostNode.permittedNodesList.tooltip"
+ data-dojo-type="dijit/Tooltip"
+ data-dojo-props="connectId: 'addVirtualHostNode.permittedNodesList',
+ label: 'Only node addresses appearing in the list will be permitted to join the group.'">
+ </div>
<button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
</div>
Modified: qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html (original)
+++ qpid/trunk/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html Sat Nov 8 12:41:36 2014
@@ -73,6 +73,11 @@
data-dojo-type="dijit/form/ValidationTextBox"
name="permittedNodes"/>
</div>
+ <div id="editVirtualHostNode.permittedNodesList.tooltip"
+ data-dojo-type="dijit/Tooltip"
+ data-dojo-props="connectId: 'editVirtualHostNode.permittedNodesList',
+ label: 'Only node addresses appearing in the list will be permitted to join the group.'">
+ </div>
<button data-dojo-type="dijit/form/Button" id="editVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button>
</div>
Modified: qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js Sat Nov 8 12:41:36 2014
@@ -19,11 +19,10 @@
define(["qpid/common/util", "dijit/registry", "dojo/domReady!"],
function (util, registry)
{
- var fieldNames = ["storeUnderfullSize", "storeOverfullSize", "storePath"];
return {
show: function(data)
{
- util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", fieldNames, data.data);
+ util.buildEditUI(data.containerNode, "virtualhost/sizemonitoring/edit.html", "editVirtualHost.", null, null);
registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/util.js Sat Nov 8 12:41:36 2014
@@ -572,11 +572,16 @@ define(["dojo/_base/xhr",
util.applyMetadataToWidgets = function(domRoot, category, type)
{
+ this.applyToWidgets(domRoot, category, type, null);
+ }
+
+ util.applyToWidgets = function(domRoot, category, type, data)
+ {
var widgets = util.findAllWidgets(domRoot);
array.forEach(widgets,
function (widget)
{
- widgetconfigurer.config(widget, category, type);
+ widgetconfigurer.config(widget, category, type, data);
});
}
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/common/widgetconfigurer.js Sat Nov 8 12:41:36 2014
@@ -95,26 +95,49 @@ define(["dojo/_base/xhr",
}
}
},
- _processWidgetValue: function (widget, category, type)
+ _processWidgetValue: function (widget, category, type, data)
{
var widgetName = widget.name;
- if (widgetName && (widget instanceof dijit.form.FilteringSelect || widget instanceof dojox.form.CheckedMultiSelect))
+ if (widgetName)
{
- if (!widget.get("value"))
+ var defaultValue = metadata.getDefaultValueForAttribute(category, type, widgetName);
+ var dataValue = data && widgetName in data ? data[widgetName] : null;
+
+ // Stash the default value and initial value so we can later differentiate
+ // when sending updates to the server
+
+ if (defaultValue)
+ {
+ widget.defaultValue = defaultValue;
+ }
+
+ if (dataValue)
+ {
+ widget.initialValue = dataValue;
+ }
+
+ if (widget instanceof dijit.form.FilteringSelect || widget instanceof dojox.form.CheckedMultiSelect)
+ {
+ var widgetValue = dataValue ? dataValue : defaultValue;
+ if (widgetValue)
{
- var defaultValue = metadata.getDefaultValueForAttribute(category, type, widgetName);
- if (defaultValue)
- {
- widget.set("value", defaultValue);
- }
+ widget.set("value", widgetValue);
}
+ }
+ else
+ {
+ if (dataValue)
+ {
+ widget.set("value", dataValue);
+ }
+ }
}
},
- config: function (widget, category, type)
+ config: function (widget, category, type, data)
{
this._processWidgetPrompt(widget, category, type);
- this._processWidgetValue(widget, category, type);
+ this._processWidgetValue(widget, category, type, data);
}
};
Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js?rev=1637550&r1=1637549&r2=1637550&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/editVirtualHost.js Sat Nov 8 12:41:36 2014
@@ -191,7 +191,7 @@ define(["dojo/_base/xhr",
TypeUI.show({containerNode:that.typeFieldsContainer, parent: that, data: actualData});
that.form.connectChildren();
- util.applyMetadataToWidgets(that.allFieldsContainer, "VirtualHost", actualData.type);
+ util.applyToWidgets(that.allFieldsContainer, "VirtualHost", actualData.type, actualData);
}
catch(e)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org