From a22fa634fe3a3f51d1a27078e17cba82e48fcf46 Mon Sep 17 00:00:00 2001 From: Keith Wall Date: Sat, 16 Aug 2014 15:03:21 +0000 Subject: 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 --- .../js/qpid/management/virtualhost/bdb_ha/edit.js | 18 ++----- .../js/qpid/management/virtualhost/bdb_ha/show.js | 4 +- .../java/resources/virtualhost/bdb_ha/edit.html | 59 +++++++++------------- .../java/resources/virtualhostnode/bdb/add.html | 3 +- .../java/resources/virtualhostnode/bdb_ha/add.html | 4 +- .../bdb_ha/add/existinggroup/add.html | 19 +++---- .../virtualhostnode/bdb_ha/add/newgroup/add.html | 18 ++++--- .../resources/virtualhostnode/bdb_ha/edit.html | 21 ++++---- 8 files changed, 67 insertions(+), 79 deletions(-) (limited to 'qpid/java/bdbstore/src') 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 + 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'"/>
@@ -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'"/>
@@ -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'" /> @@ -86,42 +89,30 @@
- High availability durability -
-
Master transaction sync policy
+ High availability durability
- - -
- -
- - -
+
Master transaction sync policy
-
- - -
-
-
-
-
Replica transaction sync policy
-
- - +
- +
- - -
+
Replica transaction sync policy
-
- - +
-
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.'"/> 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" /> 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'," />
@@ -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'" />
@@ -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'" />
@@ -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.
Other nodes will use connect to this address to replicate messages', + title: 'Enter node hostname and port number that new node will use'" />
@@ -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'" />
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.'"/>
@@ -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.
Other nodes will use connect to this address to replicate messages'" />
@@ -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'" />
@@ -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'">
@@ -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'" /> 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'" />
@@ -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'" />
@@ -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'" /> +
@@ -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'" />
@@ -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.
Elections will choose the node with the most recent transactions.
If there is a tie, priority is used as a tie-breaker.', searchAttr: 'name'" />
@@ -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.
Majority signifies that a natural majority of nodes must be present.', store: nodeQuorumOverrideStore, searchAttr: 'name'" /> -- cgit v1.2.1