You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by lq...@apache.org on 2016/05/02 17:57:54 UTC

svn commit: r1741993 [2/29] - in /qpid/java/trunk: 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/js/qpid/management/virtualh...

Modified: qpid/java/trunk/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js (original)
+++ qpid/java/trunk/bdbstore/src/main/java/resources/js/qpid/management/virtualhostnode/bdb_ha/show.js Mon May  2 15:57:52 2016
@@ -27,238 +27,221 @@ define(["dojo/_base/connect",
         "qpid/common/UpdatableStore",
         "qpid/common/util",
         "dojo/domReady!"], function (connect, entities, query, json, registry, EnhancedGrid, UpdatableStore, util)
-       {
-           var priorityNames = {
-               '_0': 'Never',
-               '_1': 'Default',
-               '_2': 'High',
-               '_3': 'Highest'
-           };
-           var nodeFields = ["storePath",
-                             "groupName",
-                             "role",
-                             "address",
-                             "designatedPrimary",
-                             "priority",
-                             "quorumOverride"];
-
-           function findNode(nodeClass, containerNode)
-           {
-               return query("." + nodeClass, containerNode)[0];
-           }
-
-           function getModelObj(nodeName, remoteNodeName, modelObj)
-           {
-               if (nodeName == remoteNodeName)
-               {
-                   return modelObj;
-               }
-               else
-               {
-                   return {
-                       name: remoteNodeName,
-                       type: "remotereplicationnode",
-                       parent: modelObj
-                   };
-               }
-           }
-
-           function BDBHA(data)
-           {
-               this.parent = data.parent;
-               var that = this;
-               util.buildUI(data.containerNode,
-                            data.parent,
-                            "virtualhostnode/bdb_ha/show.html",
-                            nodeFields,
-                            this,
-                            function ()
-                            {
-                                that._postParse(data);
-                            });
-           };
-           BDBHA.prototype._postParse = function (data)
-           {
-               var that = this;
-               var containerNode = data.containerNode;
-               this.management = data.parent.management;
-               this.designatedPrimaryContainer = findNode("designatedPrimaryContainer", containerNode);
-               this.priorityContainer = findNode("priorityContainer", containerNode);
-               this.quorumOverrideContainer = findNode("quorumOverrideContainer", containerNode);
-               this.permittedNodes = query(".permittedNodes", containerNode)[0];
-               this.membersGridPanel = registry.byNode(query(".membersGridPanel", containerNode)[0]);
-               this.membersGrid = new UpdatableStore([], findNode("groupMembers", containerNode), [{
-                   name: 'Name',
-                   field: 'name',
-                   width: '10%'
-               },
-                   {
-                       name: 'Role',
-                       field: 'role',
-                       width: '15%'
-                   },
-                   {
-                       name: 'Address',
-                       field: 'address',
-                       width: '30%'
-                   },
-                   {
-                       name: 'Join Time',
-                       field: 'joinTime',
-                       width: '25%',
-                       formatter: function (value)
-                       {
-                           return value ? that.management.userPreferences.formatDateTime(value) : "";
-                       }
-                   },
-                   {
-                       name: 'Replication Transaction ID',
-                       field: 'lastKnownReplicationTransactionId',
-                       width: '20%',
-                       formatter: function (value)
-                       {
-                           return value > 0 ? value : "N/A";
-                       }
-                   }], null, {
-                   selectionMode: "single",
-                   keepSelection: true,
-                   plugins: {
-                       indirectSelection: true
-                   }
-               }, EnhancedGrid, true);
-
-               this.removeNodeButton = registry.byNode(query(".removeNodeButton", containerNode)[0]);
-               this.transferMasterButton = registry.byNode(query(".transferMasterButton", containerNode)[0]);
-               this.transferMasterButton.set("disabled", true);
-               this.removeNodeButton.set("disabled", true);
-
-               var nodeControlsToggler = function (rowIndex)
-               {
-                   var data = that.membersGrid.grid.selection.getSelected();
-                   that.transferMasterButton.set("disabled", data.length != 1 || data[0].role != "REPLICA");
-                   that.removeNodeButton.set("disabled", data.length != 1 || data[0].role == "MASTER");
-               };
-               connect.connect(this.membersGrid.grid.selection, 'onSelected', nodeControlsToggler);
-               connect.connect(this.membersGrid.grid.selection, 'onDeselected', nodeControlsToggler);
-
-               var modelObj = data.parent.modelObj;
-               this.transferMasterButton.on("click", function (e)
-               {
-                   var data = that.membersGrid.grid.selection.getSelected();
-                   if (data.length == 1 && confirm("Are you sure you would like to transfer mastership to node '"
-                                                   + data[0].name + "'?"))
-                   {
-                       that.management.update(getModelObj(that.data.name, data[0].name, modelObj), {role: "MASTER"})
-                           .then(function (data)
-                                 {
-                                     that.membersGrid.grid.selection.clear();
-                                 });
-                   }
-               });
-
-               this.removeNodeButton.on("click", function (e)
-               {
-                   var data = that.membersGrid.grid.selection.getSelected();
-                   if (data.length == 1 && confirm("Are you sure you would like to delete node '" + data[0].name
-                                                   + "'?"))
-                   {
-                       that.management.remove(getModelObj(that.data.name, data[0].name, modelObj)).then(function (data)
-                                                                                                        {
-                                                                                                            that.membersGrid.grid.selection.clear();
-                                                                                                            if (data[0].name
-                                                                                                                == that.data.name)
-                                                                                                            {
-                                                                                                                that.parent.destroy();
-                                                                                                            }
-                                                                                                        },
-                                                                                                        util.xhrErrorHandler);
-                   }
-               });
-               this._parsed = true;
-           }
-
-           BDBHA.prototype.update = function (data)
-           {
-               if (!this._parsed)
-               {
-                   return;
-               }
-
-               this.parent.editNodeButton.set("disabled", false);
-
-               var permittedNodesMarkup = "";
-               if (data.permittedNodes)
-               {
-                   for (var i = 0; i < data.permittedNodes.length; i++)
-                   {
-                       permittedNodesMarkup += "<div>" + data.permittedNodes[i] + "</div>";
-                   }
-               }
-               this.permittedNodes.innerHTML = permittedNodesMarkup;
-
-               this.data = data;
-               for (var i = 0; i < nodeFields.length; i++)
-               {
-                   var name = nodeFields[i];
-                   if (name == "priority")
-                   {
-                       this[name].innerHTML = priorityNames["_" + data[name]];
-                   }
-                   else if (name == "quorumOverride")
-                   {
-                       this[name].innerHTML = (data[name] == 0 ? "MAJORITY" : entities.encode(String(data[name])));
-                   }
-                   else
-                   {
-                       this[name].innerHTML = entities.encode(String(data[name]));
-                   }
-               }
-
-               var members = data.remotereplicationnodes;
-               if (members)
-               {
-                   members.push({
-                                    id: data.id,
-                                    name: data.name,
-                                    groupName: data.groupName,
-                                    address: data.address,
-                                    role: data.role,
-                                    joinTime: data.joinTime,
-                                    lastKnownReplicationTransactionId: data.lastKnownReplicationTransactionId
-                                });
-               }
-               this._updateGrid(members, this.membersGridPanel, this.membersGrid);
-
-               if (!members || members.length < 3)
-               {
-                   this.designatedPrimaryContainer.style.display = "block";
-                   this.priorityContainer.style.display = "none";
-                   this.quorumOverrideContainer.style.display = "none";
-               }
-               else
-               {
-                   this.designatedPrimaryContainer.style.display = "none";
-                   this.priorityContainer.style.display = "block";
-                   this.quorumOverrideContainer.style.display = "block";
-               }
-           };
-
-           BDBHA.prototype._updateGrid = function (conf, panel, updatableGrid)
-           {
-               if (conf && conf.length > 0)
-               {
-                   panel.domNode.style.display = "block";
-                   var changed = updatableGrid.update(conf);
-                   if (changed)
-                   {
-                       updatableGrid.grid._refresh();
-                   }
-               }
-               else
-               {
-                   panel.domNode.style.display = "none";
-               }
-           }
+{
+    var priorityNames = {
+        '_0': 'Never',
+        '_1': 'Default',
+        '_2': 'High',
+        '_3': 'Highest'
+    };
+    var nodeFields = ["storePath", "groupName", "role", "address", "designatedPrimary", "priority", "quorumOverride"];
+
+    function findNode(nodeClass, containerNode)
+    {
+        return query("." + nodeClass, containerNode)[0];
+    }
+
+    function getModelObj(nodeName, remoteNodeName, modelObj)
+    {
+        if (nodeName == remoteNodeName)
+        {
+            return modelObj;
+        }
+        else
+        {
+            return {
+                name: remoteNodeName,
+                type: "remotereplicationnode",
+                parent: modelObj
+            };
+        }
+    }
+
+    function BDBHA(data)
+    {
+        this.parent = data.parent;
+        var that = this;
+        util.buildUI(data.containerNode, data.parent, "virtualhostnode/bdb_ha/show.html", nodeFields, this, function ()
+        {
+            that._postParse(data);
+        });
+    };
+    BDBHA.prototype._postParse = function (data)
+    {
+        var that = this;
+        var containerNode = data.containerNode;
+        this.management = data.parent.management;
+        this.designatedPrimaryContainer = findNode("designatedPrimaryContainer", containerNode);
+        this.priorityContainer = findNode("priorityContainer", containerNode);
+        this.quorumOverrideContainer = findNode("quorumOverrideContainer", containerNode);
+        this.permittedNodes = query(".permittedNodes", containerNode)[0];
+        this.membersGridPanel = registry.byNode(query(".membersGridPanel", containerNode)[0]);
+        this.membersGrid = new UpdatableStore([], findNode("groupMembers", containerNode), [{
+            name: 'Name',
+            field: 'name',
+            width: '10%'
+        }, {
+            name: 'Role',
+            field: 'role',
+            width: '15%'
+        }, {
+            name: 'Address',
+            field: 'address',
+            width: '30%'
+        }, {
+            name: 'Join Time',
+            field: 'joinTime',
+            width: '25%',
+            formatter: function (value)
+            {
+                return value ? that.management.userPreferences.formatDateTime(value) : "";
+            }
+        }, {
+            name: 'Replication Transaction ID',
+            field: 'lastKnownReplicationTransactionId',
+            width: '20%',
+            formatter: function (value)
+            {
+                return value > 0 ? value : "N/A";
+            }
+        }], null, {
+            selectionMode: "single",
+            keepSelection: true,
+            plugins: {
+                indirectSelection: true
+            }
+        }, EnhancedGrid, true);
+
+        this.removeNodeButton = registry.byNode(query(".removeNodeButton", containerNode)[0]);
+        this.transferMasterButton = registry.byNode(query(".transferMasterButton", containerNode)[0]);
+        this.transferMasterButton.set("disabled", true);
+        this.removeNodeButton.set("disabled", true);
+
+        var nodeControlsToggler = function (rowIndex)
+        {
+            var data = that.membersGrid.grid.selection.getSelected();
+            that.transferMasterButton.set("disabled", data.length != 1 || data[0].role != "REPLICA");
+            that.removeNodeButton.set("disabled", data.length != 1 || data[0].role == "MASTER");
+        };
+        connect.connect(this.membersGrid.grid.selection, 'onSelected', nodeControlsToggler);
+        connect.connect(this.membersGrid.grid.selection, 'onDeselected', nodeControlsToggler);
+
+        var modelObj = data.parent.modelObj;
+        this.transferMasterButton.on("click", function (e)
+        {
+            var data = that.membersGrid.grid.selection.getSelected();
+            if (data.length == 1 && confirm("Are you sure you would like to transfer mastership to node '"
+                                            + data[0].name + "'?"))
+            {
+                that.management.update(getModelObj(that.data.name, data[0].name, modelObj), {role: "MASTER"})
+                    .then(function (data)
+                    {
+                        that.membersGrid.grid.selection.clear();
+                    });
+            }
+        });
+
+        this.removeNodeButton.on("click", function (e)
+        {
+            var data = that.membersGrid.grid.selection.getSelected();
+            if (data.length == 1 && confirm("Are you sure you would like to delete node '" + data[0].name + "'?"))
+            {
+                that.management.remove(getModelObj(that.data.name, data[0].name, modelObj))
+                    .then(function (data)
+                    {
+                        that.membersGrid.grid.selection.clear();
+                        if (data[0].name == that.data.name)
+                        {
+                            that.parent.destroy();
+                        }
+                    }, util.xhrErrorHandler);
+            }
+        });
+        this._parsed = true;
+    }
+
+    BDBHA.prototype.update = function (data)
+    {
+        if (!this._parsed)
+        {
+            return;
+        }
+
+        this.parent.editNodeButton.set("disabled", false);
+
+        var permittedNodesMarkup = "";
+        if (data.permittedNodes)
+        {
+            for (var i = 0; i < data.permittedNodes.length; i++)
+            {
+                permittedNodesMarkup += "<div>" + data.permittedNodes[i] + "</div>";
+            }
+        }
+        this.permittedNodes.innerHTML = permittedNodesMarkup;
+
+        this.data = data;
+        for (var i = 0; i < nodeFields.length; i++)
+        {
+            var name = nodeFields[i];
+            if (name == "priority")
+            {
+                this[name].innerHTML = priorityNames["_" + data[name]];
+            }
+            else if (name == "quorumOverride")
+            {
+                this[name].innerHTML = (data[name] == 0 ? "MAJORITY" : entities.encode(String(data[name])));
+            }
+            else
+            {
+                this[name].innerHTML = entities.encode(String(data[name]));
+            }
+        }
+
+        var members = data.remotereplicationnodes;
+        if (members)
+        {
+            members.push({
+                id: data.id,
+                name: data.name,
+                groupName: data.groupName,
+                address: data.address,
+                role: data.role,
+                joinTime: data.joinTime,
+                lastKnownReplicationTransactionId: data.lastKnownReplicationTransactionId
+            });
+        }
+        this._updateGrid(members, this.membersGridPanel, this.membersGrid);
+
+        if (!members || members.length < 3)
+        {
+            this.designatedPrimaryContainer.style.display = "block";
+            this.priorityContainer.style.display = "none";
+            this.quorumOverrideContainer.style.display = "none";
+        }
+        else
+        {
+            this.designatedPrimaryContainer.style.display = "none";
+            this.priorityContainer.style.display = "block";
+            this.quorumOverrideContainer.style.display = "block";
+        }
+    };
+
+    BDBHA.prototype._updateGrid = function (conf, panel, updatableGrid)
+    {
+        if (conf && conf.length > 0)
+        {
+            panel.domNode.style.display = "block";
+            var changed = updatableGrid.update(conf);
+            if (changed)
+            {
+                updatableGrid.grid._refresh();
+            }
+        }
+        else
+        {
+            panel.domNode.style.display = "none";
+        }
+    }
 
-           return BDBHA;
-       });
+    return BDBHA;
+});

Modified: qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js (original)
+++ qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/add.js Mon May  2 15:57:52 2016
@@ -28,18 +28,19 @@ define(["dojo/_base/xhr",
         "dijit/form/ValidationTextBox",
         "dijit/form/NumberTextBox",
         "dojo/domReady!"], function (xhr, parser, dom, domConstruct, json, registry, template, util)
-       {
-           return {
-               show: function (data)
-               {
-                   this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
-                   parser.parse(this.containerNode).then(function (instances)
-                                                         {
-                                                             registry.byId("addVirtualHost.storeUnderfullSize")
-                                                                     .set("regExpGen", util.numericOrContextVarRegexp);
-                                                             registry.byId("addVirtualHost.storeOverfullSize")
-                                                                     .set("regExpGen", util.numericOrContextVarRegexp);
-                                                         });
-               }
-           };
-       });
+{
+    return {
+        show: function (data)
+        {
+            this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+            parser.parse(this.containerNode)
+                .then(function (instances)
+                {
+                    registry.byId("addVirtualHost.storeUnderfullSize")
+                        .set("regExpGen", util.numericOrContextVarRegexp);
+                    registry.byId("addVirtualHost.storeOverfullSize")
+                        .set("regExpGen", util.numericOrContextVarRegexp);
+                });
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js (original)
+++ qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhost/derby/edit.js Mon May  2 15:57:52 2016
@@ -23,8 +23,10 @@ define(["qpid/common/util", "dijit/regis
         {
             util.parseHtmlIntoDiv(data.containerNode, "virtualhost/sizemonitoring/edit.html", function ()
             {
-                registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
-                registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+                registry.byId("editVirtualHost.storeUnderfullSize")
+                    .set("regExpGen", util.numericOrContextVarRegexp);
+                registry.byId("editVirtualHost.storeOverfullSize")
+                    .set("regExpGen", util.numericOrContextVarRegexp);
             });
         }
     };

Modified: qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/add.js (original)
+++ qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/add.js Mon May  2 15:57:52 2016
@@ -28,12 +28,12 @@ define(["dojo/_base/xhr",
         "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);
-               }
-           };
-       });
+{
+    return {
+        show: function (data)
+        {
+            this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+            parser.parse(this.containerNode);
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js (original)
+++ qpid/java/trunk/broker-plugins/derby-store/src/main/java/resources/js/qpid/management/virtualhostnode/derby/edit.js Mon May  2 15:57:52 2016
@@ -23,7 +23,8 @@ define(["qpid/common/util", "dijit/regis
         {
             util.parseHtmlIntoDiv(data.containerNode, "virtualhostnode/filebased/edit.html", function ()
             {
-                registry.byId("editVirtualHostNode.storePath").set("disabled", data.data.state != "STOPPED");
+                registry.byId("editVirtualHostNode.storePath")
+                    .set("disabled", data.data.state != "STOPPED");
             });
         }
     };

Modified: qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/add.js Mon May  2 15:57:52 2016
@@ -31,16 +31,16 @@ define(["dojo/_base/xhr",
         "dojo/store/Memory",
         "dijit/form/FilteringSelect",
         "dojo/domReady!"],
-       function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect)
-       {
-           return {
-               show: function (data)
-               {
-                   data.context.addInheritedContext({
-                                                        "qpid.jdbcstore.bonecp.partitionCount": "4",
-                                                        "qpid.jdbcstore.bonecp.minConnectionsPerPartition": "5",
-                                                        "qpid.jdbcstore.bonecp.maxConnectionsPerPartition": "10"
-                                                    });
-               }
-           };
-       });
+    function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect)
+    {
+        return {
+            show: function (data)
+            {
+                data.context.addInheritedContext({
+                    "qpid.jdbcstore.bonecp.partitionCount": "4",
+                    "qpid.jdbcstore.bonecp.minConnectionsPerPartition": "5",
+                    "qpid.jdbcstore.bonecp.maxConnectionsPerPartition": "10"
+                });
+            }
+        };
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/edit.js Mon May  2 15:57:52 2016
@@ -26,10 +26,10 @@ define(["dojo/_base/xhr",
         "dojo/parser",
         "qpid/common/util",
         "dojo/domReady!"], function (xhr, dom, construct, win, registry, parser, util)
-       {
-           return {
-               show: function (data)
-               {
-               }
-           };
-       });
+{
+    return {
+        show: function (data)
+        {
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-provider-bone/src/main/java/resources/js/qpid/management/store/pool/bonecp/show.js Mon May  2 15:57:52 2016
@@ -19,44 +19,44 @@
  *
  */
 define(["dojo/_base/xhr", "dojo/parser", "dojox/html/entities", "dojo/query", "dojo/domReady!"],
-       function (xhr, parser, entities, query)
-       {
-           var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
+    function (xhr, parser, entities, query)
+    {
+        var fieldNames = ["maxConnectionsPerPartition", "minConnectionsPerPartition", "partitionCount"];
 
-           function BoneCP(data)
-           {
-               var containerNode = data.containerNode;
-               this.parent = data.parent;
-               var that = this;
-               xhr.get({
-                           url: "store/pool/bonecp/show.html",
-                           sync: true,
-                           load: function (template)
-                           {
-                               containerNode.innerHTML = template;
-                               parser.parse(containerNode).then(function (instances)
-                                                                {
-                                                                    for (var i = 0; i < fieldNames.length; i++)
-                                                                    {
-                                                                        var fieldName = fieldNames[i];
-                                                                        that[fieldName] =
-                                                                            query("." + fieldName, containerNode)[0];
-                                                                    }
-                                                                });
-                           }
-                       });
-           }
+        function BoneCP(data)
+        {
+            var containerNode = data.containerNode;
+            this.parent = data.parent;
+            var that = this;
+            xhr.get({
+                url: "store/pool/bonecp/show.html",
+                sync: true,
+                load: function (template)
+                {
+                    containerNode.innerHTML = template;
+                    parser.parse(containerNode)
+                        .then(function (instances)
+                        {
+                            for (var i = 0; i < fieldNames.length; i++)
+                            {
+                                var fieldName = fieldNames[i];
+                                that[fieldName] = query("." + fieldName, containerNode)[0];
+                            }
+                        });
+                }
+            });
+        }
 
-           BoneCP.prototype.update = function (data)
-           {
+        BoneCP.prototype.update = function (data)
+        {
 
-               for (var i = 0; i < fieldNames.length; i++)
-               {
-                   var fieldName = fieldNames[i];
-                   var value = data && data.context ? data.context["qpid.jdbcstore.bonecp." + fieldName] : "";
-                   this[fieldName].innerHTML = value ? entities.encode(String(value)) : "";
-               }
-           };
+            for (var i = 0; i < fieldNames.length; i++)
+            {
+                var fieldName = fieldNames[i];
+                var value = data && data.context ? data.context["qpid.jdbcstore.bonecp." + fieldName] : "";
+                this[fieldName].innerHTML = value ? entities.encode(String(value)) : "";
+            }
+        };
 
-           return BoneCP;
-       });
+        return BoneCP;
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/store/pool/none/add.js Mon May  2 15:57:52 2016
@@ -31,12 +31,12 @@ define(["dojo/_base/xhr",
         "dojo/store/Memory",
         "dijit/form/FilteringSelect",
         "dojo/domReady!"],
-       function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect)
-       {
-           return {
-               show: function (data)
-               {
-                   data.context.removeDynamicallyAddedInheritedContext();
-               }
-           };
-       });
+    function (xhr, dom, construct, win, registry, parser, array, event, json, string, Memory, FilteringSelect)
+    {
+        return {
+            show: function (data)
+            {
+                data.context.removeDynamicallyAddedInheritedContext();
+            }
+        };
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/add.js Mon May  2 15:57:52 2016
@@ -30,60 +30,63 @@ define(["dojo/_base/xhr",
         "dijit/form/ValidationTextBox",
         "dijit/form/CheckBox",
         "dojo/domReady!"],
-       function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, util)
-       {
-           return {
-               show: function (data)
-               {
-                   var that = this;
-                   this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
-                   parser.parse(this.containerNode).then(function (instances)
-                                                         {
-                                                             that._postParse(data);
-                                                         });
-               },
-               _postParse: function (data)
-               {
-                   var that = this;
-                   registry.byId("addVirtualHost.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
-                   registry.byId("addVirtualHost.username").set("regExpGen", util.nameOrContextVarRegexp);
+    function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, util)
+    {
+        return {
+            show: function (data)
+            {
+                var that = this;
+                this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+                parser.parse(this.containerNode)
+                    .then(function (instances)
+                    {
+                        that._postParse(data);
+                    });
+            },
+            _postParse: function (data)
+            {
+                var that = this;
+                registry.byId("addVirtualHost.connectionUrl")
+                    .set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+                registry.byId("addVirtualHost.username")
+                    .set("regExpGen", util.nameOrContextVarRegexp);
 
-                   var typeMetaData = data.metadata.getMetaData("VirtualHost", "JDBC");
-                   var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
-                   var poolTypesData = [];
-                   array.forEach(poolTypes, function (item)
-                   {
-                       poolTypesData.push({
-                                              id: item,
-                                              name: item
-                                          });
-                   });
+                var typeMetaData = data.metadata.getMetaData("VirtualHost", "JDBC");
+                var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
+                var poolTypesData = [];
+                array.forEach(poolTypes, function (item)
+                {
+                    poolTypesData.push({
+                        id: item,
+                        name: item
+                    });
+                });
 
-                   var poolTypesStore = new Memory({data: poolTypesData});
-                   var poolTypeControl = registry.byId("addVirtualHost.connectionPoolType");
-                   poolTypeControl.set("store", poolTypesStore);
-                   poolTypeControl.set("value", "NONE");
+                var poolTypesStore = new Memory({data: poolTypesData});
+                var poolTypeControl = registry.byId("addVirtualHost.connectionPoolType");
+                poolTypeControl.set("store", poolTypesStore);
+                poolTypeControl.set("value", "NONE");
 
-                   var poolTypeFieldsDiv = dom.byId("addVirtualHost.poolSpecificDiv");
-                   poolTypeControl.on("change", function (type)
-                   {
-                       if (type && string.trim(type) != "")
-                       {
-                           var widgets = registry.findWidgets(poolTypeFieldsDiv);
-                           array.forEach(widgets, function (item)
-                           {
-                               item.destroyRecursive();
-                           });
-                           domConstruct.empty(poolTypeFieldsDiv);
-                           require(["qpid/management/store/pool/" + type.toLowerCase() + "/add"], function (poolType)
-                           {
-                               poolType.show({
-                                                 containerNode: poolTypeFieldsDiv,
-                                                 context: data.parent.virtualHostContext
-                                             });
-                           });
-                       }
-                   });
-               }
-           };
-       });
+                var poolTypeFieldsDiv = dom.byId("addVirtualHost.poolSpecificDiv");
+                poolTypeControl.on("change", function (type)
+                {
+                    if (type && string.trim(type) != "")
+                    {
+                        var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                        array.forEach(widgets, function (item)
+                        {
+                            item.destroyRecursive();
+                        });
+                        domConstruct.empty(poolTypeFieldsDiv);
+                        require(["qpid/management/store/pool/" + type.toLowerCase() + "/add"], function (poolType)
+                        {
+                            poolType.show({
+                                containerNode: poolTypeFieldsDiv,
+                                context: data.parent.virtualHostContext
+                            });
+                        });
+                    }
+                });
+            }
+        };
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/edit.js Mon May  2 15:57:52 2016
@@ -25,66 +25,68 @@ define(["qpid/common/util",
         "dojo/dom-construct",
         "dijit/registry",
         "dojo/domReady!"], function (util, array, json, string, Memory, dom, domConstruct, registry)
-       {
+{
 
-           return {
-               show: function (data)
-               {
-                   var that = this;
-                   util.parseHtmlIntoDiv(data.containerNode, "virtualhost/jdbc/edit.html", function ()
-                   {
-                       that._postParse(data)
-                   });
-               },
-               _postParse: function (data)
-               {
-                   registry.byId("editVirtualHost.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
-                   registry.byId("editVirtualHost.username").set("regExpGen", util.nameOrContextVarRegexp);
-
-                   var typeMetaData = data.metadata.getMetaData("VirtualHost", "JDBC");
-                   var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
-                   var poolTypesData = [];
-                   array.forEach(poolTypes, function (item)
-                   {
-                       poolTypesData.push({
-                                              id: item,
-                                              name: item
-                                          });
-                   });
-
-                   var poolTypesStore = new Memory({data: poolTypesData});
-                   var poolTypeControl = registry.byId("editVirtualHost.connectionPoolType");
-                   poolTypeControl.set("store", poolTypesStore);
-                   poolTypeControl.set("value", data.data.connectionPoolType);
-
-                   var passwordControl = registry.byId("editVirtualHost.password");
-                   if (data.data.password)
-                   {
-                       passwordControl.set("placeHolder", "*******");
-                   }
-
-                   var poolTypeFieldsDiv = dom.byId("editVirtualHost.poolSpecificDiv");
-                   poolTypeControl.on("change", function (type)
-                   {
-                       if (type && string.trim(type) != "")
-                       {
-                           var widgets = registry.findWidgets(poolTypeFieldsDiv);
-                           array.forEach(widgets, function (item)
-                           {
-                               item.destroyRecursive();
-                           });
-                           domConstruct.empty(poolTypeFieldsDiv);
-
-                           require(["qpid/management/store/pool/" + type.toLowerCase() + "/edit"], function (poolType)
-                           {
-                               poolType.show({
-                                                 containerNode: poolTypeFieldsDiv,
-                                                 data: data.data,
-                                                 context: data.parent.context
-                                             })
-                           });
-                       }
-                   });
-               }
-           };
-       });
+    return {
+        show: function (data)
+        {
+            var that = this;
+            util.parseHtmlIntoDiv(data.containerNode, "virtualhost/jdbc/edit.html", function ()
+            {
+                that._postParse(data)
+            });
+        },
+        _postParse: function (data)
+        {
+            registry.byId("editVirtualHost.connectionUrl")
+                .set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+            registry.byId("editVirtualHost.username")
+                .set("regExpGen", util.nameOrContextVarRegexp);
+
+            var typeMetaData = data.metadata.getMetaData("VirtualHost", "JDBC");
+            var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
+            var poolTypesData = [];
+            array.forEach(poolTypes, function (item)
+            {
+                poolTypesData.push({
+                    id: item,
+                    name: item
+                });
+            });
+
+            var poolTypesStore = new Memory({data: poolTypesData});
+            var poolTypeControl = registry.byId("editVirtualHost.connectionPoolType");
+            poolTypeControl.set("store", poolTypesStore);
+            poolTypeControl.set("value", data.data.connectionPoolType);
+
+            var passwordControl = registry.byId("editVirtualHost.password");
+            if (data.data.password)
+            {
+                passwordControl.set("placeHolder", "*******");
+            }
+
+            var poolTypeFieldsDiv = dom.byId("editVirtualHost.poolSpecificDiv");
+            poolTypeControl.on("change", function (type)
+            {
+                if (type && string.trim(type) != "")
+                {
+                    var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                    array.forEach(widgets, function (item)
+                    {
+                        item.destroyRecursive();
+                    });
+                    domConstruct.empty(poolTypeFieldsDiv);
+
+                    require(["qpid/management/store/pool/" + type.toLowerCase() + "/edit"], function (poolType)
+                    {
+                        poolType.show({
+                            containerNode: poolTypeFieldsDiv,
+                            data: data.data,
+                            context: data.parent.context
+                        })
+                    });
+                }
+            });
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhost/jdbc/show.js Mon May  2 15:57:52 2016
@@ -19,58 +19,56 @@
  *
  */
 define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"],
-       function (util, query, array, domConstruct, registry)
-       {
-           var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
+    function (util, query, array, domConstruct, registry)
+    {
+        var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
 
-           function JDBC(data)
-           {
-               var that = this;
-               util.buildUI(data.containerNode,
-                            data.parent,
-                            "virtualhostnode/jdbc/show.html",
-                            fieldNames,
-                            this,
-                            function ()
-                            {
-                                that.usernameAttributeContainer =
-                                    query(".usernameAttributeContainer", data.containerNode)[0];
-                                that.connectionPoolTypeAttributeContainer =
-                                    query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
-                            });
-           }
+        function JDBC(data)
+        {
+            var that = this;
+            util.buildUI(data.containerNode,
+                data.parent,
+                "virtualhostnode/jdbc/show.html",
+                fieldNames,
+                this,
+                function ()
+                {
+                    that.usernameAttributeContainer = query(".usernameAttributeContainer", data.containerNode)[0];
+                    that.connectionPoolTypeAttributeContainer =
+                        query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
+                });
+        }
 
-           JDBC.prototype.update = function (data)
-           {
-               var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
-               util.updateUI(data, fieldNames, this);
-               this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
-               if (data.connectionPoolType && (!this.poolDetails || previousConnectionPoolType
-                                                                    != data.connectionPoolType))
-               {
-                   var that = this;
-                   require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
-                           function (PoolDetails)
-                           {
-                               var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
-                               array.forEach(widgets, function (item)
-                               {
-                                   item.destroyRecursive();
-                               });
-                               domConstruct.empty(that.connectionPoolTypeAttributeContainer);
+        JDBC.prototype.update = function (data)
+        {
+            var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
+            util.updateUI(data, fieldNames, this);
+            this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
+            if (data.connectionPoolType && (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType))
+            {
+                var that = this;
+                require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
+                    function (PoolDetails)
+                    {
+                        var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
+                        array.forEach(widgets, function (item)
+                        {
+                            item.destroyRecursive();
+                        });
+                        domConstruct.empty(that.connectionPoolTypeAttributeContainer);
 
-                               that.poolDetails = new PoolDetails({
-                                   containerNode: that.connectionPoolTypeAttributeContainer,
-                                   parent: that
-                               });
-                               that.poolDetails.update(data);
-                           });
-               }
-               else
-               {
-                   this.poolDetails.update(data);
-               }
-           }
+                        that.poolDetails = new PoolDetails({
+                            containerNode: that.connectionPoolTypeAttributeContainer,
+                            parent: that
+                        });
+                        that.poolDetails.update(data);
+                    });
+            }
+            else
+            {
+                this.poolDetails.update(data);
+            }
+        }
 
-           return JDBC;
-       });
+        return JDBC;
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/add.js Mon May  2 15:57:52 2016
@@ -32,59 +32,62 @@ define(["dojo/_base/xhr",
         "dijit/form/ValidationTextBox",
         "dijit/form/CheckBox",
         "dojo/domReady!"],
-       function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, util)
-       {
-           return {
-               show: function (data)
-               {
-                   var that = this;
-                   this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
-                   parser.parse(this.containerNode).then(function (instances)
-                                                         {
-                                                             that._postParse(data);
-                                                         });
-               },
-               _postParse: function (data)
-               {
-                   var that = this;
-                   registry.byId("addVirtualHostNode.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
-                   registry.byId("addVirtualHostNode.username").set("regExpGen", util.nameOrContextVarRegexp);
+    function (xhr, array, parser, dom, domConstruct, json, string, Memory, registry, template, util)
+    {
+        return {
+            show: function (data)
+            {
+                var that = this;
+                this.containerNode = domConstruct.create("div", {innerHTML: template}, data.containerNode);
+                parser.parse(this.containerNode)
+                    .then(function (instances)
+                    {
+                        that._postParse(data);
+                    });
+            },
+            _postParse: function (data)
+            {
+                var that = this;
+                registry.byId("addVirtualHostNode.connectionUrl")
+                    .set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+                registry.byId("addVirtualHostNode.username")
+                    .set("regExpGen", util.nameOrContextVarRegexp);
 
-                   var typeMetaData = data.metadata.getMetaData("VirtualHostNode", "JDBC");
-                   var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
-                   var poolTypesData = [];
-                   array.forEach(poolTypes, function (item)
-                   {
-                       poolTypesData.push({
-                                              id: item,
-                                              name: item
-                                          });
-                   });
-                   var poolTypesStore = new Memory({data: poolTypesData});
-                   var poolTypeControl = registry.byId("addVirtualHostNode.connectionPoolType");
-                   poolTypeControl.set("store", poolTypesStore);
-                   poolTypeControl.set("value", "NONE");
+                var typeMetaData = data.metadata.getMetaData("VirtualHostNode", "JDBC");
+                var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
+                var poolTypesData = [];
+                array.forEach(poolTypes, function (item)
+                {
+                    poolTypesData.push({
+                        id: item,
+                        name: item
+                    });
+                });
+                var poolTypesStore = new Memory({data: poolTypesData});
+                var poolTypeControl = registry.byId("addVirtualHostNode.connectionPoolType");
+                poolTypeControl.set("store", poolTypesStore);
+                poolTypeControl.set("value", "NONE");
 
-                   var poolTypeFieldsDiv = dom.byId("addVirtualHostNode.poolSpecificDiv");
-                   poolTypeControl.on("change", function (type)
-                   {
-                       if (type && string.trim(type) != "")
-                       {
-                           var widgets = registry.findWidgets(poolTypeFieldsDiv);
-                           array.forEach(widgets, function (item)
-                           {
-                               item.destroyRecursive();
-                           });
-                           domConstruct.empty(poolTypeFieldsDiv);
-                           require(["qpid/management/store/pool/" + type.toLowerCase() + "/add"], function (poolType)
-                           {
-                               poolType.show({
-                                                 containerNode: poolTypeFieldsDiv,
-                                                 context: data.parent.virtualHostNodeContext
-                                             });
-                           });
-                       }
-                   });
-               }
-           };
-       });
+                var poolTypeFieldsDiv = dom.byId("addVirtualHostNode.poolSpecificDiv");
+                poolTypeControl.on("change", function (type)
+                {
+                    if (type && string.trim(type) != "")
+                    {
+                        var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                        array.forEach(widgets, function (item)
+                        {
+                            item.destroyRecursive();
+                        });
+                        domConstruct.empty(poolTypeFieldsDiv);
+                        require(["qpid/management/store/pool/" + type.toLowerCase() + "/add"], function (poolType)
+                        {
+                            poolType.show({
+                                containerNode: poolTypeFieldsDiv,
+                                context: data.parent.virtualHostNodeContext
+                            });
+                        });
+                    }
+                });
+            }
+        };
+    });

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/edit.js Mon May  2 15:57:52 2016
@@ -25,73 +25,75 @@ define(["qpid/common/util",
         "dojo/dom-construct",
         "dijit/registry",
         "dojo/domReady!"], function (util, array, json, string, Memory, dom, domConstruct, registry)
-       {
-           return {
-               show: function (data)
-               {
-                   var that = this;
-                   util.parseHtmlIntoDiv(data.containerNode, "virtualhostnode/jdbc/edit.html", function ()
-                   {
-                       that._postParse(data);
-                   });
-               },
-               _postParse: function (data)
-               {
-                   registry.byId("editVirtualHostNode.connectionUrl").set("regExpGen", util.jdbcUrlOrContextVarRegexp);
-                   registry.byId("editVirtualHostNode.username").set("regExpGen", util.nameOrContextVarRegexp);
+{
+    return {
+        show: function (data)
+        {
+            var that = this;
+            util.parseHtmlIntoDiv(data.containerNode, "virtualhostnode/jdbc/edit.html", function ()
+            {
+                that._postParse(data);
+            });
+        },
+        _postParse: function (data)
+        {
+            registry.byId("editVirtualHostNode.connectionUrl")
+                .set("regExpGen", util.jdbcUrlOrContextVarRegexp);
+            registry.byId("editVirtualHostNode.username")
+                .set("regExpGen", util.nameOrContextVarRegexp);
 
-                   var typeMetaData = data.metadata.getMetaData("VirtualHostNode", "JDBC");
-                   var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
-                   var poolTypesData = [];
-                   array.forEach(poolTypes, function (item)
-                   {
-                       poolTypesData.push({
-                                              id: item,
-                                              name: item
-                                          });
-                   });
-                   var poolTypesStore = new Memory({data: poolTypesData});
-                   var poolTypeControl = registry.byId("editVirtualHostNode.connectionPoolType");
-                   poolTypeControl.set("store", poolTypesStore);
-                   poolTypeControl.set("value", data.data.connectionPoolType);
+            var typeMetaData = data.metadata.getMetaData("VirtualHostNode", "JDBC");
+            var poolTypes = typeMetaData.attributes.connectionPoolType.validValues;
+            var poolTypesData = [];
+            array.forEach(poolTypes, function (item)
+            {
+                poolTypesData.push({
+                    id: item,
+                    name: item
+                });
+            });
+            var poolTypesStore = new Memory({data: poolTypesData});
+            var poolTypeControl = registry.byId("editVirtualHostNode.connectionPoolType");
+            poolTypeControl.set("store", poolTypesStore);
+            poolTypeControl.set("value", data.data.connectionPoolType);
 
-                   var passwordControl = registry.byId("editVirtualHostNode.password");
-                   if (data.data.password)
-                   {
-                       passwordControl.set("placeHolder", "*******");
-                   }
+            var passwordControl = registry.byId("editVirtualHostNode.password");
+            if (data.data.password)
+            {
+                passwordControl.set("placeHolder", "*******");
+            }
 
-                   var poolTypeFieldsDiv = dom.byId("editVirtualHostNode.poolSpecificDiv");
-                   poolTypeControl.on("change", function (type)
-                   {
-                       if (type && string.trim(type) != "")
-                       {
-                           var widgets = registry.findWidgets(poolTypeFieldsDiv);
-                           array.forEach(widgets, function (item)
-                           {
-                               item.destroyRecursive();
-                           });
-                           domConstruct.empty(poolTypeFieldsDiv);
+            var poolTypeFieldsDiv = dom.byId("editVirtualHostNode.poolSpecificDiv");
+            poolTypeControl.on("change", function (type)
+            {
+                if (type && string.trim(type) != "")
+                {
+                    var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                    array.forEach(widgets, function (item)
+                    {
+                        item.destroyRecursive();
+                    });
+                    domConstruct.empty(poolTypeFieldsDiv);
 
-                           require(["qpid/management/store/pool/" + type.toLowerCase() + "/edit"], function (poolType)
-                           {
-                               poolType.show({
-                                                 containerNode: poolTypeFieldsDiv,
-                                                 data: data.data,
-                                                 context: data.parent.context
-                                             })
+                    require(["qpid/management/store/pool/" + type.toLowerCase() + "/edit"], function (poolType)
+                    {
+                        poolType.show({
+                            containerNode: poolTypeFieldsDiv,
+                            data: data.data,
+                            context: data.parent.context
+                        })
 
-                               if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED"))
-                               {
-                                   var widgets = registry.findWidgets(poolTypeFieldsDiv);
-                                   array.forEach(widgets, function (item)
-                                   {
-                                       item.set("disabled", true);
-                                   });
-                               }
-                           });
-                       }
-                   });
-               }
-           };
-       });
+                        if (!(data.data.state == "STOPPED" || data.data.state == "ERRORED"))
+                        {
+                            var widgets = registry.findWidgets(poolTypeFieldsDiv);
+                            array.forEach(widgets, function (item)
+                            {
+                                item.set("disabled", true);
+                            });
+                        }
+                    });
+                }
+            });
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js (original)
+++ qpid/java/trunk/broker-plugins/jdbc-store/src/main/java/resources/js/qpid/management/virtualhostnode/jdbc/show.js Mon May  2 15:57:52 2016
@@ -20,61 +20,59 @@
  */
 
 define(["qpid/common/util", "dojo/query", "dojo/_base/array", "dojo/dom-construct", "dijit/registry", "dojo/domReady!"],
-       function (util, query, array, domConstruct, registry)
-       {
-           var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
-
-           function Jdbc(data)
-           {
-               this.parent = data.parent;
-               var that = this;
-               util.buildUI(data.containerNode,
-                            data.parent,
-                            "virtualhostnode/jdbc/show.html",
-                            fieldNames,
-                            this,
-                            function ()
-                            {
-                                that.usernameAttributeContainer =
-                                    query(".usernameAttributeContainer", data.containerNode)[0];
-                                that.connectionPoolTypeAttributeContainer =
-                                    query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
-                            });
-           }
-
-           Jdbc.prototype.update = function (data)
-           {
-               var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
-               this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
-               util.updateUI(data, fieldNames, this);
-
-               this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
-               if (data.connectionPoolType && (!this.poolDetails || previousConnectionPoolType
-                                                                    != data.connectionPoolType))
-               {
-                   var that = this;
-                   require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
-                           function (PoolDetails)
-                           {
-                               var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
-                               array.forEach(widgets, function (item)
-                               {
-                                   item.destroyRecursive();
-                               });
-                               domConstruct.empty(that.connectionPoolTypeAttributeContainer);
-
-                               that.poolDetails = new PoolDetails({
-                                   containerNode: that.connectionPoolTypeAttributeContainer,
-                                   parent: that
-                               });
-                               that.poolDetails.update(data);
-                           });
-               }
-               else
-               {
-                   this.poolDetails.update(data);
-               }
-           };
+    function (util, query, array, domConstruct, registry)
+    {
+        var fieldNames = ["connectionUrl", "username", "connectionPoolType"];
+
+        function Jdbc(data)
+        {
+            this.parent = data.parent;
+            var that = this;
+            util.buildUI(data.containerNode,
+                data.parent,
+                "virtualhostnode/jdbc/show.html",
+                fieldNames,
+                this,
+                function ()
+                {
+                    that.usernameAttributeContainer = query(".usernameAttributeContainer", data.containerNode)[0];
+                    that.connectionPoolTypeAttributeContainer =
+                        query(".connectionPoolTypeAttributeContainer", data.containerNode)[0];
+                });
+        }
+
+        Jdbc.prototype.update = function (data)
+        {
+            var previousConnectionPoolType = this.connectionPoolType ? this.connectionPoolType.innerHTML : null;
+            this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
+            util.updateUI(data, fieldNames, this);
+
+            this.usernameAttributeContainer.style.display = data.username ? "block" : "none";
+            if (data.connectionPoolType && (!this.poolDetails || previousConnectionPoolType != data.connectionPoolType))
+            {
+                var that = this;
+                require(["qpid/management/store/pool/" + data.connectionPoolType.toLowerCase() + "/show"],
+                    function (PoolDetails)
+                    {
+                        var widgets = registry.findWidgets(that.connectionPoolTypeAttributeContainer);
+                        array.forEach(widgets, function (item)
+                        {
+                            item.destroyRecursive();
+                        });
+                        domConstruct.empty(that.connectionPoolTypeAttributeContainer);
+
+                        that.poolDetails = new PoolDetails({
+                            containerNode: that.connectionPoolTypeAttributeContainer,
+                            parent: that
+                        });
+                        that.poolDetails.update(data);
+                    });
+            }
+            else
+            {
+                this.poolDetails.update(data);
+            }
+        };
 
-           return Jdbc;
-       });
+        return Jdbc;
+    });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/addVirtualHostAlias.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/addVirtualHostAlias.js?rev=1741993&r1=1741992&r2=1741993&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/addVirtualHostAlias.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/addVirtualHostAlias.js Mon May  2 15:57:52 2016
@@ -43,193 +43,194 @@ define(["dojo/_base/lang",
         "dijit/layout/ContentPane",
         "dojox/layout/TableContainer",
         "dojo/domReady!"], function (lang, dom, construct, registry, parser, memory, array, event, json, util, template)
-       {
-           var addLogInclusionRule = {
-               init: function ()
-               {
-                   var that = this;
-                   this.containerNode = construct.create("div", {innerHTML: template});
-                   parser.parse(this.containerNode).then(function (instances)
-                                                         {
-                                                             that._postParse();
-                                                         });
-               },
-               _postParse: function ()
-               {
-                   var that = this;
-                   this.name = registry.byId("addLogInclusionRule.name");
-                   this.name.set("regExpGen", util.nameOrContextVarRegexp);
-
-                   this.dialog = registry.byId("addLogInclusionRule");
-                   this.addButton = registry.byId("addLogInclusionRule.addButton");
-                   this.cancelButton = registry.byId("addLogInclusionRule.cancelButton");
-                   this.cancelButton.on("click", function (e)
-                   {
-                       that._cancel(e);
-                   });
-                   this.addButton.on("click", function (e)
-                   {
-                       that._add(e);
-                   });
-
-                   this.typeFieldsContainer = dom.byId("addLogInclusionRule.typeFields");
-                   this.form = registry.byId("addLogInclusionRule.form");
-                   this.form.on("submit", function ()
-                   {
-                       return false;
-                   });
-
-                   this.logInclusionRuleType = registry.byId("addLogInclusionRule.type");
-                   this.logInclusionRuleType.on("change", function (type)
-                   {
-                       that._typeChanged(type);
-                   });
-
-                   this.durable = registry.byId("addLogInclusionRule.durable");
-                   this.allFieldsContainer = dom.byId("addLogInclusionRule.contentPane");
-               },
-               show: function (management, modelObj, category, actualData)
-               {
-                   this.management = management;
-                   this.modelObj = modelObj;
-                   var metadata = management.metadata;
-                   this.category = category;
-                   this.configured = false;
-                   this._destroyTypeFields(this.typeFieldsContainer);
-                   this.logInclusionRuleType.set("store",
-                                                 util.makeTypeStoreFromMetadataByCategory(management.metadata,
-                                                                                          category));
-                   this.form.reset();
-
-                   this.initialData = actualData;
-                   this.isNew = !actualData;
-
-                   this.name.set("disabled", !this.isNew);
-                   this.logInclusionRuleType.set("disabled", !this.isNew);
-                   this.durable.set("disabled", !this.isNew);
-                   this.dialog.set("title",
-                                   this.isNew ? "Add Log Inclusion Rule" : "Edit Log Inclusion Rule - "
-                                                                           + actualData.name);
-
-                   if (actualData)
-                   {
-                       this._configure(actualData.type);
-                   }
-
-                   this.dialog.show();
-               },
-               _cancel: function (e)
-               {
-                   event.stop(e);
-                   this._destroyTypeFields(this.typeFieldsContainer);
-                   this.dialog.hide();
-               },
-               _add: function (e)
-               {
-                   event.stop(e);
-                   this._submit();
-               },
-               _submit: function ()
-               {
-                   if (this.form.validate())
-                   {
-                       var that = this;
-                       var formData = util.getFormWidgetValues(this.form, this.initialData);
-
-                       if (this.isNew)
-                       {
-                           this.management.create(this.category, this.modelObj, formData).then(function (x)
-                                                                                               {
-                                                                                                   that.dialog.hide();
-                                                                                               });
-                       }
-                       else
-                       {
-                           this.management.update(this.modelObj, formData).then(function (x)
-                                                                                {
-                                                                                    that.dialog.hide();
-                                                                                });
-                       }
-                   }
-                   else
-                   {
-                       alert('Form contains invalid data. Please correct first');
-                   }
-               },
-               _destroyTypeFields: function (typeFieldsContainer)
-               {
-                   var widgets = registry.findWidgets(typeFieldsContainer);
-                   array.forEach(widgets, function (item)
-                   {
-                       item.destroyRecursive();
-                   });
-                   construct.empty(typeFieldsContainer);
-               },
-               _typeChanged: function (type)
-               {
-                   this._destroyTypeFields(this.typeFieldsContainer);
-
-                   if (type)
-                   {
-                       this._configure(type);
-                       var that = this;
-                       require(["qpid/management/loginclusionrule/" + this.category.toLowerCase() + "/"
-                                + type.toLowerCase() + "/add"], function (typeUI)
-                               {
-                                   try
-                                   {
-                                       var metadata = that.management.metadata;
-                                       var promise = typeUI.show({
-                                                                     containerNode: that.typeFieldsContainer,
-                                                                     data: that.initialData,
-                                                                     metadata: metadata,
-                                                                     category: that.category,
-                                                                     type: type
-                                                                 });
-                                       if (promise)
-                                       {
-                                           promise.then(function (instances)
-                                                        {
-                                                            util.applyToWidgets(that.typeFieldsContainer,
-                                                                                that.category,
-                                                                                type,
-                                                                                that.initialData,
-                                                                                metadata);
-                                                            if (!that.isNew)
-                                                            {
-                                                                util.disableWidgetsForImmutableFields(that.allFieldsContainer,
-                                                                                                      that.category,
-                                                                                                      type,
-                                                                                                      metadata);
-                                                            }
-                                                        });
-                                       }
-                                   }
-                                   catch (e)
-                                   {
-                                       console.warn(e);
-                                   }
-                               });
-                   }
-               },
-               _configure: function (type)
-               {
-                   if (!this.configured)
-                   {
-                       var metadata = this.management.metadata;
-                       util.applyToWidgets(this.allFieldsContainer, this.category, type, this.initialData, metadata);
-                       this.configured = true;
-                   }
-               }
-           };
-
-           try
-           {
-               addLogInclusionRule.init();
-           }
-           catch (e)
-           {
-               console.warn(e);
-           }
-           return addLogInclusionRule;
-       });
+{
+    var addLogInclusionRule = {
+        init: function ()
+        {
+            var that = this;
+            this.containerNode = construct.create("div", {innerHTML: template});
+            parser.parse(this.containerNode)
+                .then(function (instances)
+                {
+                    that._postParse();
+                });
+        },
+        _postParse: function ()
+        {
+            var that = this;
+            this.name = registry.byId("addLogInclusionRule.name");
+            this.name.set("regExpGen", util.nameOrContextVarRegexp);
+
+            this.dialog = registry.byId("addLogInclusionRule");
+            this.addButton = registry.byId("addLogInclusionRule.addButton");
+            this.cancelButton = registry.byId("addLogInclusionRule.cancelButton");
+            this.cancelButton.on("click", function (e)
+            {
+                that._cancel(e);
+            });
+            this.addButton.on("click", function (e)
+            {
+                that._add(e);
+            });
+
+            this.typeFieldsContainer = dom.byId("addLogInclusionRule.typeFields");
+            this.form = registry.byId("addLogInclusionRule.form");
+            this.form.on("submit", function ()
+            {
+                return false;
+            });
+
+            this.logInclusionRuleType = registry.byId("addLogInclusionRule.type");
+            this.logInclusionRuleType.on("change", function (type)
+            {
+                that._typeChanged(type);
+            });
+
+            this.durable = registry.byId("addLogInclusionRule.durable");
+            this.allFieldsContainer = dom.byId("addLogInclusionRule.contentPane");
+        },
+        show: function (management, modelObj, category, actualData)
+        {
+            this.management = management;
+            this.modelObj = modelObj;
+            var metadata = management.metadata;
+            this.category = category;
+            this.configured = false;
+            this._destroyTypeFields(this.typeFieldsContainer);
+            this.logInclusionRuleType.set("store",
+                util.makeTypeStoreFromMetadataByCategory(management.metadata, category));
+            this.form.reset();
+
+            this.initialData = actualData;
+            this.isNew = !actualData;
+
+            this.name.set("disabled", !this.isNew);
+            this.logInclusionRuleType.set("disabled", !this.isNew);
+            this.durable.set("disabled", !this.isNew);
+            this.dialog.set("title",
+                this.isNew ? "Add Log Inclusion Rule" : "Edit Log Inclusion Rule - " + actualData.name);
+
+            if (actualData)
+            {
+                this._configure(actualData.type);
+            }
+
+            this.dialog.show();
+        },
+        _cancel: function (e)
+        {
+            event.stop(e);
+            this._destroyTypeFields(this.typeFieldsContainer);
+            this.dialog.hide();
+        },
+        _add: function (e)
+        {
+            event.stop(e);
+            this._submit();
+        },
+        _submit: function ()
+        {
+            if (this.form.validate())
+            {
+                var that = this;
+                var formData = util.getFormWidgetValues(this.form, this.initialData);
+
+                if (this.isNew)
+                {
+                    this.management.create(this.category, this.modelObj, formData)
+                        .then(function (x)
+                        {
+                            that.dialog.hide();
+                        });
+                }
+                else
+                {
+                    this.management.update(this.modelObj, formData)
+                        .then(function (x)
+                        {
+                            that.dialog.hide();
+                        });
+                }
+            }
+            else
+            {
+                alert('Form contains invalid data. Please correct first');
+            }
+        },
+        _destroyTypeFields: function (typeFieldsContainer)
+        {
+            var widgets = registry.findWidgets(typeFieldsContainer);
+            array.forEach(widgets, function (item)
+            {
+                item.destroyRecursive();
+            });
+            construct.empty(typeFieldsContainer);
+        },
+        _typeChanged: function (type)
+        {
+            this._destroyTypeFields(this.typeFieldsContainer);
+
+            if (type)
+            {
+                this._configure(type);
+                var that = this;
+                require(["qpid/management/loginclusionrule/" + this.category.toLowerCase() + "/" + type.toLowerCase()
+                         + "/add"], function (typeUI)
+                {
+                    try
+                    {
+                        var metadata = that.management.metadata;
+                        var promise = typeUI.show({
+                            containerNode: that.typeFieldsContainer,
+                            data: that.initialData,
+                            metadata: metadata,
+                            category: that.category,
+                            type: type
+                        });
+                        if (promise)
+                        {
+                            promise.then(function (instances)
+                            {
+                                util.applyToWidgets(that.typeFieldsContainer,
+                                    that.category,
+                                    type,
+                                    that.initialData,
+                                    metadata);
+                                if (!that.isNew)
+                                {
+                                    util.disableWidgetsForImmutableFields(that.allFieldsContainer,
+                                        that.category,
+                                        type,
+                                        metadata);
+                                }
+                            });
+                        }
+                    }
+                    catch (e)
+                    {
+                        console.warn(e);
+                    }
+                });
+            }
+        },
+        _configure: function (type)
+        {
+            if (!this.configured)
+            {
+                var metadata = this.management.metadata;
+                util.applyToWidgets(this.allFieldsContainer, this.category, type, this.initialData, metadata);
+                this.configured = true;
+            }
+        }
+    };
+
+    try
+    {
+        addLogInclusionRule.init();
+    }
+    catch (e)
+    {
+        console.warn(e);
+    }
+    return addLogInclusionRule;
+});




---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org