diff options
| author | Keith Wall <kwall@apache.org> | 2014-08-16 15:03:21 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-08-16 15:03:21 +0000 |
| commit | a22fa634fe3a3f51d1a27078e17cba82e48fcf46 (patch) | |
| tree | d2a04b686bae034f2172b64a388726eb40c2538b /qpid/java/bdbstore/src/main | |
| parent | 1b0754c1ab44c56bc966b3e170d071a050f3cc2a (diff) | |
| download | qpid-python-a22fa634fe3a3f51d1a27078e17cba82e48fcf46.tar.gz | |
QPID-6006: [Java Broker] UI to expose attribute defaults during create and edit workflows
* Metadata service now used to discover the attributes for each category instance type.
* Create/edit dialogues now have promptMessages to provide a fuller description of the field's purpose
* If the attribute has a default, the default is interpolated into the promptMessage in a standard way.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1618373 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/bdbstore/src/main')
8 files changed, 67 insertions, 79 deletions
diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js index 087caf34c6..ed34bbbd7a 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/edit.js @@ -16,10 +16,11 @@ * specific language governing permissions and limitations * under the License. */ -define(["qpid/common/util", "dijit/registry", "dojo/_base/window", "dojo/domReady!"], - function (util, registry, win) +define(["qpid/common/util", "qpid/common/metadata", "dijit/registry", "dojo/_base/window", "dojo/domReady!"], + function (util, metadata, registry, win) { - var fieldNames = ["storeUnderfullSize", "storeOverfullSize"]; + var fieldNames = ["storeUnderfullSize", "storeOverfullSize", + "localTransactionSynchronizationPolicy", "remoteTransactionSynchronizationPolicy"]; return { show: function(data) { @@ -28,17 +29,6 @@ define(["qpid/common/util", "dijit/registry", "dojo/_base/window", "dojo/domRead registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp); registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp); - 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"); diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js index 9cf6bdea66..f211d19d16 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js @@ -47,8 +47,8 @@ define(["qpid/common/util", "dojo/query", "dojo/domReady!"], } this["permittedNodes"].innerHTML = permittedNodesMarkup ; - var localSyncPolicy = data[localTransactionSynchronizationPolicy].toLowerCase(); - var remoteSyncPolicy = data[remoteTransactionSynchronizationPolicy].toLowerCase(); + var localSyncPolicy = data[localTransactionSynchronizationPolicy] ? data[localTransactionSynchronizationPolicy].toLowerCase() : ""; + var remoteSyncPolicy = data[remoteTransactionSynchronizationPolicy] ? data[remoteTransactionSynchronizationPolicy].toLowerCase() : ""; for(var i=0; i<this[localTransactionSynchronizationPolicy].children.length;i++) { diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html b/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html index cad6b9301e..9d0b0ab860 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhost/bdb_ha/edit.html @@ -27,7 +27,8 @@ name: 'storeOverfullSize', placeHolder: 'size in bytes', required: false, - title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages'"/> + title: 'Enter ceiling (in bytes) at which store will begin to throttle sessions producing messages', + promptMessage: 'Ceiling (in bytes) at which store will begin to throttle sessions producing messages'"/> </div> </div> <div class="clear"> @@ -39,7 +40,8 @@ name: 'storeUnderfullSize', placeHolder: 'size in bytes', required: false, - title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages'"/> + title: 'Enter floor (in bytes) at which store will cease to throttle sessions producing messages', + promptMessage: 'Floor (in bytes) at which store will cease to throttle sessions producing messages'"/> </div> </div> @@ -74,8 +76,9 @@ data-dojo-props=" name: 'permittedNode', placeHolder: 'host:port', - title: 'Enter address', - intermediateChanges: true" /> + intermediateChanges: true, + title: 'Enter address of node to be permitted into the group', + promptMessage: 'Address of node to be permitted into the group'" /> </div> <button data-dojo-type="dijit/form/Button" id="editVirtualHost.permittedNodeAdd" data-dojo-props="label: '+'"></button> </div> @@ -86,42 +89,30 @@ <div class="formBox clear"> <fieldset> - <legend>High availability durability</legend> - <div> - <div class="haOptionLabel">Master transaction sync policy</div> + <legend>High availability durability</legend> <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-SYNC"/> - <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label> - </div> - - <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="WRITE_NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-WRITE_NO_SYNC"/> - <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label> - </div> + <div class="haOptionLabel">Master transaction sync policy</div> - <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="localTransactionSynchronizationPolicy" value="NO_SYNC" id="editVirtualHost.localTransactionSynchronizationPolicy-NO_SYNC"/> - <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label> - </div> - </div> - <br/> - <div> - <div class="haOptionLabel">Replica transaction sync policy</div> - <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-SYNC"/> - <label>SYNC (the transaction will be written and synchronized to the disk; highest durability)</label> + <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> </div> - + <br/> <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="WRITE_NO_SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-WRITE_NO_SYNC"/> - <label>WRITE_NO_SYNC (the transaction will be written only; the synchronization will be performed later)</label> - </div> + <div class="haOptionLabel">Replica transaction sync policy</div> - <div> - <input data-dojo-type="dijit/form/RadioButton" type="radio" name="remoteTransactionSynchronizationPolicy" value="NO_SYNC" id="editVirtualHost.remoteTransactionSynchronizationPolicy-NO_SYNC"/> - <label>NO_SYNC (write later; the transaction will be written and synchronized later; lowest durability)</label> + <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> </div> - </div> </fieldset> </div> 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 index 9ce23084c5..c16dd675d2 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb/add.html @@ -27,7 +27,8 @@ data-dojo-props=" name: 'storePath', placeHolder: 'path/to/store', - title: 'Enter store path'" /> + title: 'Enter store path', + promptMessage: 'File system location for the configuration store.'"/> </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 index c7e44a38b2..6973cf9002 100644 --- 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 @@ -31,7 +31,9 @@ data-dojo-props="store:groupStore, searchAttr:'name', required: true, - placeHolder: 'choose new or existing'" + placeHolder: 'choose new or existing', + promptMessage: 'Create a new group or join to an existing one', + title: 'Choose whether to create a new group or join to an existing one'" name="group" id="addVirtualHostNode.group" /> </div> diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html index 820a94e754..d8f1ae5c57 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/existinggroup/add.html @@ -30,8 +30,8 @@ name: 'groupName', placeHolder: 'group name', required: true, - missingMessage: 'The group name must be supplied', - title: 'Enter the group name'" /> + promptMessage: 'Name of the existing group', + title: 'Enter name of the existing group'," /> </div> </div> <div class="clear"> @@ -43,8 +43,8 @@ name: 'helperNodeName', placeHolder: 'node name from group', required: true, - missingMessage: 'A node name must be supplied', - title: 'Enter a node name'" /> + promptMessage: 'Node name of an existing group member.', + title: 'Enter node name of an existing member of the group'" /> </div> </div> <div class="clear"> @@ -56,8 +56,8 @@ name: 'helperAddress', placeHolder: 'node address from group', required: true, - missingMessage: 'Node host and port must be supplied', - title: 'Enter address'" /> + promptMessage: 'Node address of the existing group member.', + title: 'Enter node address of the existing group member'" /> </div> </div> </fieldset> @@ -76,8 +76,8 @@ name: 'address', placeHolder: 'host:port', required: true, - missingMessage: 'Node host and port must be supplied', - title: 'Enter address'" /> + promptMessage: 'Node hostname and port number that new node will use.<br/>Other nodes will use connect to this address to replicate messages', + title: 'Enter node hostname and port number that new node will use'" /> </div> </div> <div class="clear"> @@ -88,7 +88,8 @@ data-dojo-props=" name: 'storePath', placeHolder: 'path/to/store', - title: 'Enter store path'" /> + promptMessage: 'File system location for the store', + title: 'Enter file system location for the store'" /> </div> </div> </fieldset> diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html index 1d3b2a1906..c25bae3419 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/add/newgroup/add.html @@ -27,8 +27,8 @@ name: 'groupName', placeHolder: 'group name', required: true, - missingMessage: 'A group name must be supplied', - title: 'Enter a group name'" /> + title: 'Enter name to identify the new group', + promptMessage: 'Name to identify the new group.'"/> </div> </div> <div class="clear"> @@ -40,8 +40,8 @@ name: 'address', placeHolder: 'host:port', required: true, - missingMessage: 'Node host and port must be supplied', - title: 'Enter address'" /> + title: 'Enter node hostname and port number that new node will use', + promptMessage: 'Node hostname and port number that new node will use.<br/>Other nodes will use connect to this address to replicate messages'" /> </div> </div> <div class="clear"> @@ -52,7 +52,8 @@ data-dojo-props=" name: 'storePath', placeHolder: 'path/to/store', - title: 'Enter store path'" /> + title: 'Enter file system location for the store', + promptMessage: 'File system location for the store'" /> </div> </div> <div class="clear formBox"> @@ -66,7 +67,7 @@ data-dojo-props=" name: 'permittedNodesList', readOnly : 'true', - title: 'Enter permitted nodes'"> + title: 'Enter list of the other node address that will form the group'"> </select> <!-- must use closing tag rather than shorthand - dojo bug? --> </div> <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeRemove" data-dojo-props="label: '-'" ></button> @@ -81,8 +82,9 @@ data-dojo-props=" name: 'permittedNode', placeHolder: 'host:port', - title: 'Enter address', - intermediateChanges: true" /> + intermediateChanges: true, + title: 'Enter address of node to be permitted into the group', + promptMessage: 'Address of node to be permitted into the group'" /> </div> <button data-dojo-type="dijit/form/Button" id="addVirtualHostNode.permittedNodeAdd" data-dojo-props="label: '+'"></button> </div> diff --git a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html index 189eb6f7b6..f163390fa2 100644 --- a/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html +++ b/qpid/java/bdbstore/src/main/java/resources/virtualhostnode/bdb_ha/edit.html @@ -25,8 +25,7 @@ placeHolder: 'Group Name', required: true, disabled: true, - missingMessage: 'A group name must be supplied', - title: 'Enter group name'" /> + title: 'Name of the group'" /> </div> </div> <div class="clear"> @@ -39,9 +38,7 @@ placeHolder: 'host:port', required: true, disabled: true, - missingMessage: 'A Host and Port must be supplied', - invalidMessage: 'Must be of the form host:port', - title: 'Enter Host and Port name'" /> + title: 'Node address of the group member'" /> </div> </div> <div class="clear"> @@ -51,8 +48,9 @@ data-dojo-type="dijit/form/ValidationTextBox" data-dojo-props=" name: 'storePath', - placeHolder: 'path/to/store', - title: 'Enter configuration store path'" /> + title: 'File system location for the store', + promptMessage: 'File system location for the store'" /> + </div> </div> <div class="clear"> @@ -63,7 +61,8 @@ data-dojo-props=" name: 'designatedPrimary', required: false, - title: 'Designate node as primary. It is applicable only to 2-nodes cluster'" /> + title: 'Designate node as primary allowing it to operate solo in a group of two.', + promptMessage: 'Designate node as primary allowing it to operate solo operate solo in a group of two'" /> </div> </div> <div class="clear"> @@ -80,8 +79,9 @@ data-dojo-props=" name: 'priority', required: false, - title: 'Select node priority for election as a Master', store: nodePriorityStore, + title: 'Set the election priority associated with this node', + promptMessage: 'Election priority associated with this node.<br/>Elections will choose the node with the most recent transactions.<br/>If there is a tie, priority is used as a tie-breaker.', searchAttr: 'name'" /> </div> </div> @@ -95,7 +95,8 @@ data-dojo-props=" name: 'quorumOverride', required: false, - title: 'Enter quorum override. 0 signifies simple majority', + title: 'Select minimum required number of nodes or choose Majority', + promptMessage: 'Modifies the minimum number of nodes required to be present to elect a master or commit transactions.<br/>Majority signifies that a natural majority of nodes must be present.', store: nodeQuorumOverrideStore, searchAttr: 'name'" /> </div> |
