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/04/29 13:04:44 UTC

svn commit: r1741609 [29/31] - 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/virtual...

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/treeView.js Fri Apr 29 11:04:40 2016
@@ -18,99 +18,125 @@
  * under the License.
  *
  */
-define([
-        "dojo/query",
+define(["dojo/query",
         "dojo/io-query",
         "dijit/Tree",
         "qpid/common/util",
         "qpid/common/updater",
         "qpid/management/controller",
         "dojo/ready",
-        "dojo/domReady!"],
-       function (query, ioQuery, Tree, util, updater, controller, ready) {
+        "dojo/domReady!"], function (query, ioQuery, Tree, util, updater, controller, ready)
+       {
 
-           function TreeViewModel(queryString, management) {
+           function TreeViewModel(queryString, management)
+           {
                this.query = queryString;
                this.management = management;
 
-               this.onChildrenChange = function (parent, children) {
+               this.onChildrenChange = function (parent, children)
+               {
                    // fired when the set of children for an object change
                };
 
-               this.onChange = function (object) {
+               this.onChange = function (object)
+               {
                    // fired when the properties of an object change
                };
 
-               this.onDelete = function (object) {
+               this.onDelete = function (object)
+               {
                    // fired when an object is deleted
                };
            }
 
-
-           TreeViewModel.prototype.buildModel = function (data) {
+           TreeViewModel.prototype.buildModel = function (data)
+           {
                this.model = data;
 
            };
 
-           TreeViewModel.prototype.updateModel = function (data) {
+           TreeViewModel.prototype.updateModel = function (data)
+           {
                var that = this;
 
-               function checkForChanges(oldData, data) {
+               function checkForChanges(oldData, data)
+               {
                    var propName;
-                   if (oldData.name != data.name) {
+                   if (oldData.name != data.name)
+                   {
                        that.onChange(data);
                    }
 
                    var childChanges = false;
                    // Iterate over old childTypes, check all are in new
-                   for (propName in oldData) {
-                       if (oldData.hasOwnProperty(propName)) {
-                           var oldChildren = oldData[ propName ];
-                           if (util.isArray(oldChildren)) {
+                   for (propName in oldData)
+                   {
+                       if (oldData.hasOwnProperty(propName))
+                       {
+                           var oldChildren = oldData[propName];
+                           if (util.isArray(oldChildren))
+                           {
 
-                               var newChildren = data[ propName ];
+                               var newChildren = data[propName];
 
-                               if (!(newChildren && util.isArray(newChildren))) {
+                               if (!(newChildren && util.isArray(newChildren)))
+                               {
                                    childChanges = true;
-                               } else {
+                               }
+                               else
+                               {
                                    var subChanges = false;
                                    // iterate over elements in array, make sure in both, in which case recurse
-                                   for (var i = 0; i < oldChildren.length; i++) {
+                                   for (var i = 0; i < oldChildren.length; i++)
+                                   {
                                        var matched = false;
-                                       for (var j = 0; j < newChildren.length; j++) {
-                                           if (oldChildren[i].id == newChildren[j].id) {
+                                       for (var j = 0; j < newChildren.length; j++)
+                                       {
+                                           if (oldChildren[i].id == newChildren[j].id)
+                                           {
                                                checkForChanges(oldChildren[i], newChildren[j]);
                                                matched = true;
                                                break;
                                            }
                                        }
-                                       if (!matched) {
+                                       if (!matched)
+                                       {
                                            subChanges = true;
                                        }
                                    }
-                                   if (subChanges == true || oldChildren.length != newChildren.length) {
-                                       that.onChildrenChange({ id:data.id + propName, _dummyChild:propName, data:data },
-                                                             newChildren);
+                                   if (subChanges == true || oldChildren.length != newChildren.length)
+                                   {
+                                       that.onChildrenChange({
+                                                                 id: data.id + propName,
+                                                                 _dummyChild: propName,
+                                                                 data: data
+                                                             }, newChildren);
                                    }
                                }
                            }
                        }
                    }
 
-                   for (propName in data) {
-                       if (data.hasOwnProperty(propName)) {
-                           var prop = data[ propName ];
-                           if (util.isArray(prop)) {
-                               if (!(oldData[ propName ] && util.isArray(oldData[propName]))) {
+                   for (propName in data)
+                   {
+                       if (data.hasOwnProperty(propName))
+                       {
+                           var prop = data[propName];
+                           if (util.isArray(prop))
+                           {
+                               if (!(oldData[propName] && util.isArray(oldData[propName])))
+                               {
                                    childChanges = true;
                                }
                            }
                        }
                    }
 
-                   if (childChanges) {
+                   if (childChanges)
+                   {
                        var children = [];
-                       that.getChildren(data, function (theChildren) {
+                       that.getChildren(data, function (theChildren)
+                       {
                            children = theChildren
                        });
                        that.onChildrenChange(data, children);
@@ -123,24 +149,39 @@ define([
                checkForChanges(oldData, data);
            };
 
+           TreeViewModel.prototype.fetchItemByIdentity = function (id)
+           {
 
-           TreeViewModel.prototype.fetchItemByIdentity = function (id) {
-
-               function fetchItem(id, data) {
+               function fetchItem(id, data)
+               {
                    var propName;
 
-                   if (data.id == id) {
+                   if (data.id == id)
+                   {
                        return data;
-                   } else if (id.indexOf(data.id) == 0) {
-                       return { id:id, _dummyChild:id.substring(id.length), data:data };
-                   } else {
-                       for (propName in data) {
-                           if (data.hasOwnProperty(propName)) {
-                               var prop = data[ propName ];
-                               if (util.isArray(prop)) {
-                                   for (var i = 0; i < prop.length; i++) {
+                   }
+                   else if (id.indexOf(data.id) == 0)
+                   {
+                       return {
+                           id: id,
+                           _dummyChild: id.substring(id.length),
+                           data: data
+                       };
+                   }
+                   else
+                   {
+                       for (propName in data)
+                       {
+                           if (data.hasOwnProperty(propName))
+                           {
+                               var prop = data[propName];
+                               if (util.isArray(prop))
+                               {
+                                   for (var i = 0; i < prop.length; i++)
+                                   {
                                        var theItem = fetchItem(id, prop[i]);
-                                       if (theItem) {
+                                       if (theItem)
+                                       {
                                            return theItem;
                                        }
                                    }
@@ -154,111 +195,159 @@ define([
                return fetchItem(id, this.model);
            };
 
-           TreeViewModel.prototype.getChildren = function (parentItem, onComplete) {
+           TreeViewModel.prototype.getChildren = function (parentItem, onComplete)
+           {
 
-               if (parentItem) {
-                   if (parentItem._dummyChild) {
-                       onComplete(parentItem.data[ parentItem._dummyChild ]);
-                   } else {
+               if (parentItem)
+               {
+                   if (parentItem._dummyChild)
+                   {
+                       onComplete(parentItem.data[parentItem._dummyChild]);
+                   }
+                   else
+                   {
                        var children = [];
-                       for (var propName in parentItem) {
-                           if (parentItem.hasOwnProperty(propName)) {
-                               var prop = parentItem[ propName ];
-
-                               if (util.isArray(prop)) {
-                                   children.push({ id:parentItem.id
-                                       + propName, _dummyChild:propName, data:parentItem });
+                       for (var propName in parentItem)
+                       {
+                           if (parentItem.hasOwnProperty(propName))
+                           {
+                               var prop = parentItem[propName];
+
+                               if (util.isArray(prop))
+                               {
+                                   children.push({
+                                                     id: parentItem.id + propName,
+                                                     _dummyChild: propName,
+                                                     data: parentItem
+                                                 });
                                }
                            }
                        }
                        onComplete(children);
                    }
-               } else {
+               }
+               else
+               {
                    onComplete([]);
                }
            };
 
-           TreeViewModel.prototype.getIdentity = function (theItem) {
-               if (theItem) {
+           TreeViewModel.prototype.getIdentity = function (theItem)
+           {
+               if (theItem)
+               {
                    return theItem.id;
                }
 
            };
 
-           TreeViewModel.prototype.getLabel = function (theItem) {
-               if (theItem) {
-                   if (theItem._dummyChild) {
+           TreeViewModel.prototype.getLabel = function (theItem)
+           {
+               if (theItem)
+               {
+                   if (theItem._dummyChild)
+                   {
                        return theItem._dummyChild;
-                   } else {
+                   }
+                   else
+                   {
                        return theItem.name;
                    }
-               } else {
+               }
+               else
+               {
                    return "";
                }
            };
 
-           TreeViewModel.prototype.getRoot = function (onItem) {
+           TreeViewModel.prototype.getRoot = function (onItem)
+           {
                onItem(this.model);
            };
 
-           TreeViewModel.prototype.mayHaveChildren = function (theItem) {
-               if (theItem) {
-                   if (theItem._dummyChild) {
+           TreeViewModel.prototype.mayHaveChildren = function (theItem)
+           {
+               if (theItem)
+               {
+                   if (theItem._dummyChild)
+                   {
                        return true;
-                   } else {
-                       for (var propName in theItem) {
-                           if (theItem.hasOwnProperty(propName)) {
-                               var prop = theItem[ propName ];
-                               if (util.isArray(prop)) {
+                   }
+                   else
+                   {
+                       for (var propName in theItem)
+                       {
+                           if (theItem.hasOwnProperty(propName))
+                           {
+                               var prop = theItem[propName];
+                               if (util.isArray(prop))
+                               {
                                    return true;
                                }
                            }
                        }
                        return false;
                    }
-               } else {
+               }
+               else
+               {
                    return false;
                }
            };
 
-           TreeViewModel.prototype.relocate = function (theItem) {
+           TreeViewModel.prototype.relocate = function (theItem)
+           {
 
-               function findItemDetails(theItem, details, type, object, parent) {
-                   if (theItem.id == object.id) {
+               function findItemDetails(theItem, details, type, object, parent)
+               {
+                   if (theItem.id == object.id)
+                   {
                        details.type = type;
-                       details[ type ] = object.name;
+                       details[type] = object.name;
                        details.parent = parent;
-                   } else {
-                       var parentObject ={
-                               type: type,
-                               name: object.name
+                   }
+                   else
+                   {
+                       var parentObject = {
+                           type: type,
+                           name: object.name
                        };
                        if (parent)
                        {
                            parentObject.parent = parent;
                        }
                        // iterate over children
-                       for (var propName in object) {
-                           if (object.hasOwnProperty(propName)) {
-                               var prop = object[ propName ];
-                               if (util.isArray(prop)) {
-                                   for (var i = 0; i < prop.length; i++) {
-                                       findItemDetails(theItem, details, propName.substring(0, propName.length - 1),
-                                                       prop[i], parentObject);
+                       for (var propName in object)
+                       {
+                           if (object.hasOwnProperty(propName))
+                           {
+                               var prop = object[propName];
+                               if (util.isArray(prop))
+                               {
+                                   for (var i = 0; i < prop.length; i++)
+                                   {
+                                       findItemDetails(theItem,
+                                                       details,
+                                                       propName.substring(0, propName.length - 1),
+                                                       prop[i],
+                                                       parentObject);
 
-                                       if (details.type) {
+                                       if (details.type)
+                                       {
                                            break;
                                        }
                                    }
                                }
-                               if (details.type) {
+                               if (details.type)
+                               {
                                    break;
                                }
                            }
                        }
 
-                       if (!details.type) {
-                           details[ type ] = null;
+                       if (!details.type)
+                       {
+                           details[type] = null;
                        }
                    }
                }
@@ -266,126 +355,174 @@ define([
                var details = new Object();
                findItemDetails(theItem, details, "broker", this.model, null);
 
-               if (details.type == "broker") {
+               if (details.type == "broker")
+               {
                    controller.show("broker", "", null, theItem.id);
-               } else if (details.type == "virtualhost") {
+               }
+               else if (details.type == "virtualhost")
+               {
                    controller.show("virtualhost", details.virtualhost, details.parent, theItem.id);
-               } else if (details.type == "exchange") {
+               }
+               else if (details.type == "exchange")
+               {
                    controller.show("exchange", details.exchange, details.parent, theItem.id);
-               } else if (details.type == "queue") {
+               }
+               else if (details.type == "queue")
+               {
                    controller.show("queue", details.queue, details.parent, theItem.id);
-               } else if (details.type == "connection") {
+               }
+               else if (details.type == "connection")
+               {
                    controller.show("connection", details.connection, details.parent, theItem.id);
-               } else if (details.type == 'port') {
+               }
+               else if (details.type == 'port')
+               {
                    controller.show("port", details.port, details.parent, theItem.id);
-               } else if (details.type == 'authenticationprovider') {
-                   controller.show("authenticationprovider", details.authenticationprovider, details.parent, theItem.id);
-               } else if (details.type == 'groupprovider') {
+               }
+               else if (details.type == 'authenticationprovider')
+               {
+                   controller.show("authenticationprovider",
+                                   details.authenticationprovider,
+                                   details.parent,
+                                   theItem.id);
+               }
+               else if (details.type == 'groupprovider')
+               {
                    controller.show("groupprovider", details.groupprovider, details.parent, theItem.id);
-               } else if (details.type == 'group') {
+               }
+               else if (details.type == 'group')
+               {
                    controller.show("group", details.group, details.parent, theItem.id);
-               } else if (details.type == 'keystore') {
-                 controller.show("keystore", details.keystore, details.parent, theItem.id);
-               } else if (details.type == 'truststore') {
-                 controller.show("truststore", details.truststore, details.parent, theItem.id);
-               } else if (details.type == 'accesscontrolprovider') {
-                 controller.show("accesscontrolprovider", details.accesscontrolprovider, details.parent, theItem.id);
-               } else if (details.type == 'plugin') {
-                 controller.show("plugin", details.plugin, {type:"broker", name:""}, theItem.id);
-               } else if (details.type == "preferencesprovider") {
-                 controller.show("preferencesprovider", details.preferencesprovider, details.parent, theItem.id);
-               } else if (details.type == "virtualhostnode") {
-                 controller.show("virtualhostnode", details.virtualhostnode, details.parent, theItem.id);
-               } else if (details.type == "brokerlogger") {
-                 controller.show("brokerlogger", details.brokerlogger, details.parent, theItem.id);
-               } else if (details.type == "virtualhostlogger") {
-                 controller.show("virtualhostlogger", details.virtualhostlogger, details.parent, theItem.id);
+               }
+               else if (details.type == 'keystore')
+               {
+                   controller.show("keystore", details.keystore, details.parent, theItem.id);
+               }
+               else if (details.type == 'truststore')
+               {
+                   controller.show("truststore", details.truststore, details.parent, theItem.id);
+               }
+               else if (details.type == 'accesscontrolprovider')
+               {
+                   controller.show("accesscontrolprovider", details.accesscontrolprovider, details.parent, theItem.id);
+               }
+               else if (details.type == 'plugin')
+               {
+                   controller.show("plugin",
+                                   details.plugin,
+                                   {
+                                       type: "broker",
+                                       name: ""
+                                   },
+                                   theItem.id);
+               }
+               else if (details.type == "preferencesprovider")
+               {
+                   controller.show("preferencesprovider", details.preferencesprovider, details.parent, theItem.id);
+               }
+               else if (details.type == "virtualhostnode")
+               {
+                   controller.show("virtualhostnode", details.virtualhostnode, details.parent, theItem.id);
+               }
+               else if (details.type == "brokerlogger")
+               {
+                   controller.show("brokerlogger", details.brokerlogger, details.parent, theItem.id);
+               }
+               else if (details.type == "virtualhostlogger")
+               {
+                   controller.show("virtualhostlogger", details.virtualhostlogger, details.parent, theItem.id);
                }
            };
 
-           TreeViewModel.prototype.update = function (callback) {
+           TreeViewModel.prototype.update = function (callback)
+           {
                var thisObj = this;
 
                this.management.get({url: this.query})
-                   .then(function (data) {
-                           try
-                           {
-                             if (thisObj.model) {
-                                 thisObj.updateModel(data);
-                             }
-                             else {
-                                 thisObj.buildModel(data);
+                   .then(function (data)
+                         {
+                             try
+                             {
+                                 if (thisObj.model)
+                                 {
+                                     thisObj.updateModel(data);
+                                 }
+                                 else
+                                 {
+                                     thisObj.buildModel(data);
+                                 }
+
+                                 if (callback)
+                                 {
+                                     callback();
+                                 }
                              }
-
-                             if (callback)
+                             catch (e)
                              {
-                                callback();
+                                 console.error(e);
                              }
-                           }
-                           catch(e)
-                           {
-                             console.error(e);
-                           }
                          }, util.xhrErrorHandler);
 
            };
 
-
-           TreeViewModel.create = function(structureUrl, management, node )
+           TreeViewModel.create = function (structureUrl, management, node)
            {
                var treeModel = new TreeViewModel(structureUrl, management);
-               treeModel.update(function(){
-                    var tree = new Tree({ model: treeModel }, node);
-                    tree.on("dblclick",
-                           function (object) {
-                               if (object && !object._dummyChild) {
-                                   treeModel.relocate(object);
-                               }
+               treeModel.update(function ()
+                                {
+                                    var tree = new Tree({model: treeModel}, node);
+                                    tree.on("dblclick", function (object)
+                                    {
+                                        if (object && !object._dummyChild)
+                                        {
+                                            treeModel.relocate(object);
+                                        }
+
+                                    }, true);
+                                    tree.startup();
+                                    updater.add(treeModel);
+                                    try
+                                    {
+                                        onReady();
+                                    }
+                                    catch (e)
+                                    {
+                                        console.error(e);
+                                    }
+                                });
+
+               var onReady = function ()
+               {
+                   controller.show("broker", "");
 
-                           }, true);
-                    tree.startup();
-                    updater.add( treeModel );
-                    try
-                    {
-                        onReady();
-                    }
-                    catch(e)
-                    {
-                        console.error(e);
-                    }
-               });
-
-               var onReady =function() {
-                 controller.show("broker","");
-
-                 var tabs = management.userPreferences.tabs;
-                 if (tabs)
-                 {
-                   for(var i in tabs)
-                   {
-                     var tab = tabs[i], modelObject;
-                     if (tab.objectType != "broker")
-                     {
-                       if (tab.objectId)
-                       {
-                         modelObject = treeModel.fetchItemByIdentity(tab.objectId);
-                         if (modelObject)
-                         {
-                           treeModel.relocate(modelObject);
-                         }
-                         else
-                         {
-                           management.userPreferences.removeTab(tab);
-                         }
-                       }
-                       else
+                   var tabs = management.userPreferences.tabs;
+                   if (tabs)
+                   {
+                       for (var i in tabs)
                        {
-                         controller.show(tab.objectType, "");
+                           var tab = tabs[i], modelObject;
+                           if (tab.objectType != "broker")
+                           {
+                               if (tab.objectId)
+                               {
+                                   modelObject = treeModel.fetchItemByIdentity(tab.objectId);
+                                   if (modelObject)
+                                   {
+                                       treeModel.relocate(modelObject);
+                                   }
+                                   else
+                                   {
+                                       management.userPreferences.removeTab(tab);
+                                   }
+                               }
+                               else
+                               {
+                                   controller.show(tab.objectType, "");
+                               }
+                           }
                        }
-                     }
                    }
-                 }
-             };
+               };
            };
 
            return TreeViewModel;

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/add.js Fri Apr 29 11:04:40 2016
@@ -26,27 +26,28 @@ define(["dojo/_base/xhr",
         "dojo/text!virtualhost/providedstore/add.html",
         "qpid/common/util",
         "dijit/form/ValidationTextBox",
-        "dojo/domReady!"],
-  function (xhr, parser, dom, domConstruct, json, 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)
-        {
-            registry.byId("addVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
-            registry.byId("addVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+        "dojo/domReady!"], function (xhr, parser, dom, domConstruct, json, 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)
+               {
+                   registry.byId("addVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+                   registry.byId("addVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
 
-            if (data.parent.virtualHostNodeType.value == "JDBC")
-            {
-                dom.byId("addVirtualHost.diskFlowControls").style.display = "none";
-            }
+                   if (data.parent.virtualHostNodeType.value == "JDBC")
+                   {
+                       dom.byId("addVirtualHost.diskFlowControls").style.display = "none";
+                   }
 
-        }
-    };
-  }
-);
+               }
+           };
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/edit.js Fri Apr 29 11:04:40 2016
@@ -17,19 +17,16 @@
  * under the License.
  */
 
-define(["dijit/registry", "qpid/common/util", "dojo/domReady!"],
-   function (registry, util)
-   {
-       return {
-           show: function(data)
-           {
-              util.parseHtmlIntoDiv(data.containerNode, "virtualhost/providedstore/edit.html",
-              function()
-              {
-                  registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
-                  registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
-              });
-           }
-       };
-   }
-);
+define(["dijit/registry", "qpid/common/util", "dojo/domReady!"], function (registry, util)
+{
+    return {
+        show: function (data)
+        {
+            util.parseHtmlIntoDiv(data.containerNode, "virtualhost/providedstore/edit.html", function ()
+            {
+                registry.byId("editVirtualHost.storeUnderfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+                registry.byId("editVirtualHost.storeOverfullSize").set("regExpGen", util.numericOrContextVarRegexp);
+            });
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhost/providedstore/show.js Fri Apr 29 11:04:40 2016
@@ -17,9 +17,8 @@
  * under the License.
  */
 
-define(["qpid/common/util", "dojo/domReady!"],
-  function (util)
-  {
+define(["qpid/common/util", "dojo/domReady!"], function (util)
+{
     var fields = ["storeUnderfullSize", "storeOverfullSize"];
 
     function ProvidedStore(data)
@@ -27,11 +26,10 @@ define(["qpid/common/util", "dojo/domRea
         util.buildUI(data.containerNode, data.parent, "virtualhost/providedstore/show.html", fields, this);
     }
 
-    ProvidedStore.prototype.update = function(data)
+    ProvidedStore.prototype.update = function (data)
     {
         util.updateUI(data, fields, this);
     }
 
     return ProvidedStore;
-  }
-);
+});

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/defaultalias/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/defaultalias/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/defaultalias/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/defaultalias/add.js Fri Apr 29 11:04:40 2016
@@ -25,23 +25,20 @@ define(["dojo/dom",
         "qpid/common/util",
         "dojo/parser",
         "dojo/text!virtualhostalias/defaultalias/add.html",
-        "dojo/domReady!"],
-    function (dom, query, array, registry, util, parser, template)
-    {
-        var addVirtualHostAlias =
-        {
-            show: function(data)
-            {
-                var that = this;
-                this.metadata = data.metadata;
-                this.containerNode = data.containerNode;
-                data.containerNode.innerHTML = template;
-                return parser.parse(this.containerNode).then(function(instances)
-                {
-                });
-            }
-        };
+        "dojo/domReady!"], function (dom, query, array, registry, util, parser, template)
+       {
+           var addVirtualHostAlias = {
+               show: function (data)
+               {
+                   var that = this;
+                   this.metadata = data.metadata;
+                   this.containerNode = data.containerNode;
+                   data.containerNode.innerHTML = template;
+                   return parser.parse(this.containerNode).then(function (instances)
+                                                                {
+                                                                });
+               }
+           };
 
-        return addVirtualHostAlias;
-    }
-);
+           return addVirtualHostAlias;
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/hostnamealias/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/hostnamealias/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/hostnamealias/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/hostnamealias/add.js Fri Apr 29 11:04:40 2016
@@ -25,25 +25,24 @@ define(["dojo/dom",
         "qpid/common/util",
         "dojo/parser",
         "dojo/text!virtualhostalias/hostnamealias/add.html",
-        "dojo/domReady!"],
-    function (dom, query, array, registry, util, parser, template)
-    {
-        var addVirtualHostAlias =
-        {
-            show: function(data)
-            {
-                var that = this;
-                this.metadata = data.metadata;
-                this.containerNode = data.containerNode;
-                data.containerNode.innerHTML = template;
-                return parser.parse(this.containerNode).then(function(instances)
-                {
-                    var virtualHostNodeNameWidget = registry.byId("addVirtualHostAlias.virtualHostNodeName");
-                    virtualHostNodeNameWidget.set("regExpGen", util.nameOrContextVarRegexp);
-                });
-            }
-        };
+        "dojo/domReady!"], function (dom, query, array, registry, util, parser, template)
+       {
+           var addVirtualHostAlias = {
+               show: function (data)
+               {
+                   var that = this;
+                   this.metadata = data.metadata;
+                   this.containerNode = data.containerNode;
+                   data.containerNode.innerHTML = template;
+                   return parser.parse(this.containerNode).then(function (instances)
+                                                                {
+                                                                    var virtualHostNodeNameWidget = registry.byId(
+                                                                        "addVirtualHostAlias.virtualHostNodeName");
+                                                                    virtualHostNodeNameWidget.set("regExpGen",
+                                                                                                  util.nameOrContextVarRegexp);
+                                                                });
+               }
+           };
 
-        return addVirtualHostAlias;
-    }
-);
+           return addVirtualHostAlias;
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/namealias/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/namealias/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/namealias/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/namealias/add.js Fri Apr 29 11:04:40 2016
@@ -25,23 +25,20 @@ define(["dojo/dom",
         "qpid/common/util",
         "dojo/parser",
         "dojo/text!virtualhostalias/namealias/add.html",
-        "dojo/domReady!"],
-    function (dom, query, array, registry, util, parser, template)
-    {
-        var addVirtualHostAlias =
-        {
-            show: function(data)
-            {
-                var that = this;
-                this.metadata = data.metadata;
-                this.containerNode = data.containerNode;
-                data.containerNode.innerHTML = template;
-                return parser.parse(this.containerNode).then(function(instances)
-                {
-                });
-            }
-        };
+        "dojo/domReady!"], function (dom, query, array, registry, util, parser, template)
+       {
+           var addVirtualHostAlias = {
+               show: function (data)
+               {
+                   var that = this;
+                   this.metadata = data.metadata;
+                   this.containerNode = data.containerNode;
+                   data.containerNode.innerHTML = template;
+                   return parser.parse(this.containerNode).then(function (instances)
+                                                                {
+                                                                });
+               }
+           };
 
-        return addVirtualHostAlias;
-    }
-);
+           return addVirtualHostAlias;
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/patternmatchingalias/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/patternmatchingalias/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/patternmatchingalias/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostalias/patternmatchingalias/add.js Fri Apr 29 11:04:40 2016
@@ -25,25 +25,24 @@ define(["dojo/dom",
         "qpid/common/util",
         "dojo/parser",
         "dojo/text!virtualhostalias/patternmatchingalias/add.html",
-        "dojo/domReady!"],
-    function (dom, query, array, registry, util, parser, template)
-    {
-        var addVirtualHostAlias =
-        {
-            show: function(data)
-            {
-                var that = this;
-                this.metadata = data.metadata;
-                this.containerNode = data.containerNode;
-                data.containerNode.innerHTML = template;
-                return parser.parse(this.containerNode).then(function(instances)
-                {
-                    var virtualHostNodeNameWidget = registry.byId("addVirtualHostAlias.virtualHostNodeName");
-                    virtualHostNodeNameWidget.set("regExpGen", util.nameOrContextVarRegexp);
-                });
-            }
-        };
+        "dojo/domReady!"], function (dom, query, array, registry, util, parser, template)
+       {
+           var addVirtualHostAlias = {
+               show: function (data)
+               {
+                   var that = this;
+                   this.metadata = data.metadata;
+                   this.containerNode = data.containerNode;
+                   data.containerNode.innerHTML = template;
+                   return parser.parse(this.containerNode).then(function (instances)
+                                                                {
+                                                                    var virtualHostNodeNameWidget = registry.byId(
+                                                                        "addVirtualHostAlias.virtualHostNodeName");
+                                                                    virtualHostNodeNameWidget.set("regExpGen",
+                                                                                                  util.nameOrContextVarRegexp);
+                                                                });
+               }
+           };
 
-        return addVirtualHostAlias;
-    }
-);
+           return addVirtualHostAlias;
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/add.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/add.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/add.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/add.js Fri Apr 29 11:04:40 2016
@@ -27,15 +27,13 @@ define(["dojo/_base/xhr",
         "dojo/text!virtualhostnode/json/add.html",
         "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);
-        }
-    };
-  }
-);
+        "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);
+               }
+           };
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/edit.js Fri Apr 29 11:04:40 2016
@@ -16,18 +16,16 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-define(["qpid/common/util", "dijit/registry", "dojo/domReady!"],
-   function (util, registry)
-   {
-       return {
-           show: function(data)
-           {
-              util.parseHtmlIntoDiv(data.containerNode, "virtualhostnode/filebased/edit.html",
-              function()
-              {
-                registry.byId("editVirtualHostNode.storePath").set("disabled", !(data.data.state == "STOPPED" || data.data.state == "ERRORED"));
-              });
-           }
-       };
-   }
-);
+define(["qpid/common/util", "dijit/registry", "dojo/domReady!"], function (util, registry)
+{
+    return {
+        show: function (data)
+        {
+            util.parseHtmlIntoDiv(data.containerNode, "virtualhostnode/filebased/edit.html", function ()
+            {
+                registry.byId("editVirtualHostNode.storePath")
+                        .set("disabled", !(data.data.state == "STOPPED" || data.data.state == "ERRORED"));
+            });
+        }
+    };
+});

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/show.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/show.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/show.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/virtualhostnode/json/show.js Fri Apr 29 11:04:40 2016
@@ -18,24 +18,21 @@
  * under the License.
  *
  */
- define(["qpid/common/util",
-         "dojo/domReady!"],
-   function (util)
-   {
-     var fields = ["storePath"];
+define(["qpid/common/util", "dojo/domReady!"], function (util)
+{
+    var fields = ["storePath"];
 
-     function JSON(data)
-     {
-         this.parent = data.parent;
-         util.buildUI(data.containerNode, data.parent, "virtualhostnode/json/show.html", fields, this);
-     }
+    function JSON(data)
+    {
+        this.parent = data.parent;
+        util.buildUI(data.containerNode, data.parent, "virtualhostnode/json/show.html", fields, this);
+    }
 
-     JSON.prototype.update = function(data)
-     {
-         this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
-         util.updateUI(data, fields, this);
-     }
+    JSON.prototype.update = function (data)
+    {
+        this.parent.editNodeButton.set("disabled", !(data.state == "STOPPED" || data.state == "ERRORED"));
+        util.updateUI(data, fields, this);
+    }
 
-     return JSON;
-   }
- );
+    return JSON;
+});

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/Authenticator.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/Authenticator.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/Authenticator.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/Authenticator.js Fri Apr 29 11:04:40 2016
@@ -43,43 +43,40 @@ define(["dojo/_base/lang", "dojo/Deferre
             var mechanism = mechanisms.shift();
             if (mechanism)
             {
-              var url = "qpid/sasl/" + encodeURIComponent(mechanism.toLowerCase()) + "/SaslClient";
-              management.get({url:"js/" + url + ".js",
-                              handleAs: "text",
-                              headers: { "Content-Type": "text/plain"}})
-                        .then(function(data)
-                              {
-                                  require([url],
-                                          function(SaslClient)
-                                          {
-                                              try
-                                              {
-                                                  var saslClient = new SaslClient();
-                                                  saslClients.push(saslClient);
-                                              }
-                                              catch(e)
-                                              {
-                                                  console.error("Unexpected error on loading of mechanism " +
-                                                                mechanism + ": " + json.stringify(e));
-                                              }
-                                              finally
-                                              {
-                                                handleMechanisms();
-                                              }
-                                          });
-                              },
-                              function(data)
-                              {
-                                  if (data.response.status != 404 )
-                                  {
-                                      console.error("Unexpected error on loading mechanism " +
-                                                   mechanism +
-                                                   ": " +
-                                                   json.stringify(data));
-                                  }
-                                  handleMechanisms();
-                              }
-                        );
+                var url = "qpid/sasl/" + encodeURIComponent(mechanism.toLowerCase()) + "/SaslClient";
+                management.get({
+                                   url: "js/" + url + ".js",
+                                   handleAs: "text",
+                                   headers: {"Content-Type": "text/plain"}
+                               })
+                          .then(function (data)
+                                {
+                                    require([url], function (SaslClient)
+                                    {
+                                        try
+                                        {
+                                            var saslClient = new SaslClient();
+                                            saslClients.push(saslClient);
+                                        }
+                                        catch (e)
+                                        {
+                                            console.error("Unexpected error on loading of mechanism " + mechanism + ": "
+                                                          + json.stringify(e));
+                                        }
+                                        finally
+                                        {
+                                            handleMechanisms();
+                                        }
+                                    });
+                                }, function (data)
+                                {
+                                    if (data.response.status != 404)
+                                    {
+                                        console.error("Unexpected error on loading mechanism " + mechanism + ": "
+                                                      + json.stringify(data));
+                                    }
+                                    handleMechanisms();
+                                });
             }
             else
             {
@@ -91,38 +88,35 @@ define(["dojo/_base/lang", "dojo/Deferre
     }
 
     return {
-              authenticate:   function(mechanisms, management)
-                              {
-                                   var deferred = new Deferred();
-                                   var successCallback = function(data)
-                                                         {
-                                                           deferred.resolve(data);
-                                                         };
-                                   var failureCallback = function(data)
-                                                         {
-                                                           deferred.reject(data);
-                                                         };
-                                   loadSaslClients(mechanisms,
-                                                   management,
-                                                   function (saslClients)
-                                                   {
-                                                      if (saslClients.length > 0)
-                                                      {
-                                                        saslClients.sort(function(c1, c2)
-                                                                         {
-                                                                           return c2.getPriority() - c1.getPriority();
-                                                                         });
-                                                        saslClients[0].authenticate(management).then(successCallback,
-                                                                                                     failureCallback);
-                                                      }
-                                                      else
-                                                      {
-                                                        failureCallback({message:"No SASL client available for " +
-                                                                                      data.mechanisms});
-                                                      }
-                                                   },
-                                                   failureCallback);
-                                   return deferred.promise;
-                              }
-           };
+        authenticate: function (mechanisms, management)
+        {
+            var deferred = new Deferred();
+            var successCallback = function (data)
+            {
+                deferred.resolve(data);
+            };
+            var failureCallback = function (data)
+            {
+                deferred.reject(data);
+            };
+            loadSaslClients(mechanisms, management, function (saslClients)
+            {
+                if (saslClients.length > 0)
+                {
+                    saslClients.sort(function (c1, c2)
+                                     {
+                                         return c2.getPriority() - c1.getPriority();
+                                     });
+                    saslClients[0].authenticate(management).then(successCallback, failureCallback);
+                }
+                else
+                {
+                    failureCallback({
+                                        message: "No SASL client available for " + data.mechanisms
+                                    });
+                }
+            }, failureCallback);
+            return deferred.promise;
+        }
+    };
 });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/CredentialBasedSaslClient.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/CredentialBasedSaslClient.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/CredentialBasedSaslClient.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/CredentialBasedSaslClient.js Fri Apr 29 11:04:40 2016
@@ -24,103 +24,99 @@ define(["dojo/_base/declare",
         "dojo/request/script",
         "dojox/uuid/generateRandomUuid",
         "dojo/Deferred",
-        "qpid/sasl/SaslClient"],
-       function(declare, lang, base64, json, script, uuid, Deferred, SaslClient)
+        "qpid/sasl/SaslClient"], function (declare, lang, base64, json, script, uuid, Deferred, SaslClient)
        {
-         return declare("qpid.sasl.CredentialBasedSaslClient",
-                        [SaslClient],
-                        {
-                            getResponse:      function(challenge)
-                                              {
-                                                  // summary:
-                                                  //        Generates response for given challenge
-                                                  // description:
-                                                  //        Handles given challenge represented as
-                                                  //       JSON object and generates response in
-                                                  //       JSON format.
-                                                  //       Method can be called multiple times
-                                                  //       for different challenges.
-                                                  //       Throws exception on various errors or
-                                                  //       authentication failures.
-                                                  // returns: JSON objectSa
-                                                  throw new TypeError("abstract");
-                                              },
-                            isComplete:       function()
-                                              {
-                                                  // summary:
-                                                  //        Returns true when no more response generation is required.
-                                                  // description:
-                                                  //        Returns true when challenge handling is complete
-                                                  // returns: boolean
-                                                  throw new TypeError("abstract");
-                                              },
-                            getCredentials:   function()
-                                              {
-                                                  // summary:
-                                                  //        Returns initial credentials
-                                                  //       to start authentication
-                                                  // description:
-                                                  //        Provides initial credentials as Promise or
-                                                  //        JSON object to start authentication process
-                                                  // returns: promise
-                                                  throw new TypeError("abstract");
-                                              },
-                            toString:         function()
-                                              {
-                                                  return "[object CredentialBasedSaslClient]";
-                                              },
-                            authenticate:     function (management)
-                                              {
-                                                  var deferred = new Deferred();
-                                                  var successCallback = function(data)
-                                                                        {
-                                                                          deferred.resolve(data);
-                                                                        };
-                                                  var failureCallback = function(data)
-                                                                        {
-                                                                          deferred.reject(data);
-                                                                        };
+           return declare("qpid.sasl.CredentialBasedSaslClient", [SaslClient], {
+               getResponse: function (challenge)
+               {
+                   // summary:
+                   //        Generates response for given challenge
+                   // description:
+                   //        Handles given challenge represented as
+                   //       JSON object and generates response in
+                   //       JSON format.
+                   //       Method can be called multiple times
+                   //       for different challenges.
+                   //       Throws exception on various errors or
+                   //       authentication failures.
+                   // returns: JSON objectSa
+                   throw new TypeError("abstract");
+               },
+               isComplete: function ()
+               {
+                   // summary:
+                   //        Returns true when no more response generation is required.
+                   // description:
+                   //        Returns true when challenge handling is complete
+                   // returns: boolean
+                   throw new TypeError("abstract");
+               },
+               getCredentials: function ()
+               {
+                   // summary:
+                   //        Returns initial credentials
+                   //       to start authentication
+                   // description:
+                   //        Provides initial credentials as Promise or
+                   //        JSON object to start authentication process
+                   // returns: promise
+                   throw new TypeError("abstract");
+               },
+               toString: function ()
+               {
+                   return "[object CredentialBasedSaslClient]";
+               },
+               authenticate: function (management)
+               {
+                   var deferred = new Deferred();
+                   var successCallback = function (data)
+                   {
+                       deferred.resolve(data);
+                   };
+                   var failureCallback = function (data)
+                   {
+                       deferred.reject(data);
+                   };
 
-                                                  var saslClient = this;
-                                                  var processChallenge = function processChallenge(challenge)
-                                                  {
-                                                    if (saslClient.isComplete())
-                                                    {
-                                                        successCallback(true);
-                                                        return;
-                                                    }
+                   var saslClient = this;
+                   var processChallenge = function processChallenge(challenge)
+                   {
+                       if (saslClient.isComplete())
+                       {
+                           successCallback(true);
+                           return;
+                       }
 
-                                                    var response = null;
-                                                    try
-                                                    {
-                                                        response = saslClient.getResponse(challenge);
-                                                    }
-                                                    catch(e)
-                                                    {
-                                                        failureCallback(e);
-                                                        return;
-                                                    }
+                       var response = null;
+                       try
+                       {
+                           response = saslClient.getResponse(challenge);
+                       }
+                       catch (e)
+                       {
+                           failureCallback(e);
+                           return;
+                       }
 
-                                                    if (saslClient.isComplete() && (response == null || response == undefined))
-                                                    {
-                                                        successCallback(true);
-                                                    }
-                                                    else
-                                                    {
-                                                        management.sendSaslResponse(response)
-                                                                  .then(function(challenge)
-                                                                        {
-                                                                          processChallenge(challenge);
-                                                                        });
-                                                    }
-                                                  };
+                       if (saslClient.isComplete() && (response == null || response == undefined))
+                       {
+                           successCallback(true);
+                       }
+                       else
+                       {
+                           management.sendSaslResponse(response)
+                                     .then(function (challenge)
+                                           {
+                                               processChallenge(challenge);
+                                           });
+                       }
+                   };
 
-                                                  dojo.when(this.getCredentials()).then(function(data)
-                                                                                        {
-                                                                                           processChallenge(data);
-                                                                                        },
-                                                                                        failureCallback);
-                                                  return deferred.promise;
-                                              }
-                        });
+                   dojo.when(this.getCredentials()).then(function (data)
+                                                         {
+                                                             processChallenge(data);
+                                                         }, failureCallback);
+                   return deferred.promise;
+               }
+           });
        });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/SaslClient.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/SaslClient.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/SaslClient.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/sasl/SaslClient.js Fri Apr 29 11:04:40 2016
@@ -17,54 +17,52 @@
  * under the License.
  */
 
-define(["dojo/_base/lang"],
-       function(lang)
-       {
-            return lang.extend( function SaslClient()
-                                {
-                                    // summary:
-                                    //        The public interface to a SaslClient.
-                                    // description:
-                                    //        The public interface to a SaslClient. All SaslClient in Qpid are
-                                    //        instances of this class.
-                                },
-                                {
-                                getMechanismName: function()
-                                                  {
-                                                      // summary:
-                                                      //        Returns mechanism name.
-                                                      // description:
-                                                      //        Returns mechanism name for the implementation.
-                                                      // returns: string
-                                                      throw new TypeError("abstract");
-                                                  },
-                                authenticate:     function(management)
-                                                  {
-                                                      // summary:
-                                                      //        Authenticates and invokes callback function
-                                                      //                                  on successful authentication
-                                                      // description:
-                                                      //        Performs SASL authentication as required by algorithm
-                                                      //        and returns promise
-                                                      // returns: promise
-                                                      throw new TypeError("abstract");
-                                                  },
-                                getPriority:      function()
-                                                  {
-                                                      // summary:
-                                                      //        Returns SaslClient priority as integer
-                                                      // description:
-                                                      //        Returns SaslClient priority as integer.
-                                                      //        SaslClients with highest priority is
-                                                      //        chosen from multiple supported.
-                                                      // returns: integer
-                                                      throw new TypeError("abstract");
-                                                  },
-                                toString:         function()
-                                                  {
-                                                      // returns: string
-                                                      //        Returns `[object SaslClient]`.
-                                                      return "[object SaslClient]";
-                                                  }
-                                });
-       });
+define(["dojo/_base/lang"], function (lang)
+{
+    return lang.extend(function SaslClient()
+                       {
+                           // summary:
+                           //        The public interface to a SaslClient.
+                           // description:
+                           //        The public interface to a SaslClient. All SaslClient in Qpid are
+                           //        instances of this class.
+                       }, {
+                           getMechanismName: function ()
+                           {
+                               // summary:
+                               //        Returns mechanism name.
+                               // description:
+                               //        Returns mechanism name for the implementation.
+                               // returns: string
+                               throw new TypeError("abstract");
+                           },
+                           authenticate: function (management)
+                           {
+                               // summary:
+                               //        Authenticates and invokes callback function
+                               //                                  on successful authentication
+                               // description:
+                               //        Performs SASL authentication as required by algorithm
+                               //        and returns promise
+                               // returns: promise
+                               throw new TypeError("abstract");
+                           },
+                           getPriority: function ()
+                           {
+                               // summary:
+                               //        Returns SaslClient priority as integer
+                               // description:
+                               //        Returns SaslClient priority as integer.
+                               //        SaslClients with highest priority is
+                               //        chosen from multiple supported.
+                               // returns: integer
+                               throw new TypeError("abstract");
+                           },
+                           toString: function ()
+                           {
+                               // returns: string
+                               //        Returns `[object SaslClient]`.
+                               return "[object SaslClient]";
+                           }
+                       });
+});



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