qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lqu...@apache.org
Subject svn commit: r1741609 [12/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...
Date Fri, 29 Apr 2016 11:04:44 GMT
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Port.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Port.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Port.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Port.js Fri Apr 29 11:04:40 2016
@@ -31,75 +31,93 @@ define(["dojo/dom",
         "qpid/management/addPort",
         "dojo/text!showPort.html",
         "dojo/domReady!"],
-       function (dom, parser, query, connect, registry, entities, properties, updater, util, formatter, addPort, template) {
+       function (dom, parser, query, connect, registry, entities, properties, updater, util, formatter, addPort, template)
+       {
 
-           function Port(name, parent, controller) {
+           function Port(name, parent, controller)
+           {
                this.name = name;
                this.controller = controller;
                this.management = controller.management;
-               this.modelObj = { type: "port", name: name, parent: parent};
+               this.modelObj = {
+                   type: "port",
+                   name: name,
+                   parent: parent
+               };
            }
 
-           Port.prototype.getTitle = function() {
+           Port.prototype.getTitle = function ()
+           {
                return "Port: " + this.name;
            };
 
-           Port.prototype.open = function(contentPane) {
+           Port.prototype.open = function (contentPane)
+           {
                var that = this;
                this.contentPane = contentPane;
 
-                contentPane.containerNode.innerHTML = template;
-                parser.parse(contentPane.containerNode).then(function(instances)
-                {
-                            that.portUpdater = new PortUpdater(that);
-
-                            var deletePortButton = query(".deletePortButton", contentPane.containerNode)[0];
-                            var node = registry.byNode(deletePortButton);
-                            connect.connect(node, "onClick",
-                                function(evt){
-                                    that.deletePort();
-                                });
-
-                            var editPortButton = query(".editPortButton", contentPane.containerNode)[0];
-                            var node = registry.byNode(editPortButton);
-                            connect.connect(node, "onClick",
-                                function(evt){
-                                  that.showEditDialog();
-                                });
-
-                            that.portUpdater.update(function(){updater.add( that.portUpdater );});
-                });
+               contentPane.containerNode.innerHTML = template;
+               parser.parse(contentPane.containerNode).then(function (instances)
+                                                            {
+                                                                that.portUpdater = new PortUpdater(that);
+
+                                                                var deletePortButton = query(".deletePortButton",
+                                                                                             contentPane.containerNode)[0];
+                                                                var node = registry.byNode(deletePortButton);
+                                                                connect.connect(node, "onClick", function (evt)
+                                                                {
+                                                                    that.deletePort();
+                                                                });
+
+                                                                var editPortButton = query(".editPortButton",
+                                                                                           contentPane.containerNode)[0];
+                                                                var node = registry.byNode(editPortButton);
+                                                                connect.connect(node, "onClick", function (evt)
+                                                                {
+                                                                    that.showEditDialog();
+                                                                });
+
+                                                                that.portUpdater.update(function ()
+                                                                                        {
+                                                                                            updater.add(that.portUpdater);
+                                                                                        });
+                                                            });
            };
 
-           Port.prototype.close = function() {
-               updater.remove( this.portUpdater );
+           Port.prototype.close = function ()
+           {
+               updater.remove(this.portUpdater);
            };
 
-
-           Port.prototype.deletePort = function() {
-               if(confirm("Are you sure you want to delete port '" + entities.encode(this.name) + "'?")) {
+           Port.prototype.deletePort = function ()
+           {
+               if (confirm("Are you sure you want to delete port '" + entities.encode(this.name) + "'?"))
+               {
                    var that = this;
-                   this.management.remove(this.modelObj).then(
-                       function(data) {
-                           that.contentPane.onClose()
-                           that.controller.tabContainer.removeChild(that.contentPane);
-                           that.contentPane.destroyRecursive();
-                           that.close();
-                       },
-                       util.xhrErrorHandler);
+                   this.management.remove(this.modelObj).then(function (data)
+                                                              {
+                                                                  that.contentPane.onClose()
+                                                                  that.controller.tabContainer.removeChild(that.contentPane);
+                                                                  that.contentPane.destroyRecursive();
+                                                                  that.close();
+                                                              }, util.xhrErrorHandler);
                }
            }
 
-           Port.prototype.showEditDialog = function() {
+           Port.prototype.showEditDialog = function ()
+           {
                var that = this;
                this.management.load(that.modelObj.parent)
-               .then(function(data)
-                     {
-                         var brokerData= data[0];
-                         addPort.show(that.management, that.modelObj, that.portUpdater.portData.type, brokerData.authenticationproviders, brokerData.keystores, brokerData.truststores);
-                     },
-                     util.xhrErrorHandler
-               );
+                   .then(function (data)
+                         {
+                             var brokerData = data[0];
+                             addPort.show(that.management,
+                                          that.modelObj,
+                                          that.portUpdater.portData.type,
+                                          brokerData.authenticationproviders,
+                                          brokerData.keystores,
+                                          brokerData.truststores);
+                         }, util.xhrErrorHandler);
            }
 
            function PortUpdater(portTab)
@@ -110,15 +128,17 @@ define(["dojo/dom",
                this.modelObj = portTab.modelObj;
                var containerNode = portTab.contentPane.containerNode;
 
-               function findNode(name) {
+               function findNode(name)
+               {
                    return query("." + name, containerNode)[0];
                }
 
                function storeNodes(names)
                {
-                  for(var i = 0; i < names.length; i++) {
-                      that[names[i]] = findNode(names[i]);
-                  }
+                   for (var i = 0; i < names.length; i++)
+                   {
+                       that[names[i]] = findNode(names[i]);
+                   }
                }
 
                storeNodes(["nameValue",
@@ -150,109 +170,128 @@ define(["dojo/dom",
                            "threadPoolMaximumValue",
                            "threadPoolSizeValue",
                            "portTypeSpecificDetails",
-                           "portAttributes"
-                           ]);
+                           "portAttributes"]);
            }
 
-           PortUpdater.prototype.updateHeader = function()
+           PortUpdater.prototype.updateHeader = function ()
            {
                function printArray(fieldName, object)
                {
                    var array = object[fieldName];
                    var data = "<div>";
-                   if (array) {
-                       for(var i = 0; i < array.length; i++) {
-                           data+= "<div>" + entities.encode(array[i]) + "</div>";
+                   if (array)
+                   {
+                       for (var i = 0; i < array.length; i++)
+                       {
+                           data += "<div>" + entities.encode(array[i]) + "</div>";
                        }
                    }
                    return data + "</div>";
                }
 
-              this.nameValue.innerHTML = entities.encode(String(this.portData[ "name" ]));
-              this.stateValue.innerHTML = entities.encode(String(this.portData[ "state" ]));
-              this.typeValue.innerHTML = entities.encode(String(this.portData[ "type" ]));
-              this.portValue.innerHTML = entities.encode(String(this.portData[ "port" ]));
-              this.authenticationProviderValue.innerHTML = this.portData[ "authenticationProvider" ] ? entities.encode(String(this.portData[ "authenticationProvider" ])) : "";
-              this.protocolsValue.innerHTML = printArray( "protocols", this.portData);
-              this.transportsValue.innerHTML = printArray( "transports", this.portData);
-              this.bindingAddressValue.innerHTML = this.portData[ "bindingAddress" ] ? entities.encode(String(this.portData[ "bindingAddress" ])) : "" ;
-              this.connectionCountValue.innerHTML = this.portData[ "connectionCount" ] ? entities.encode(String(this.portData[ "connectionCount" ])) : "0" ;
-              this.maxOpenConnectionsValue.innerHTML = (this.portData[ "maxOpenConnections" ] && this.portData[ "maxOpenConnections" ] >= 0) ? entities.encode(String(this.portData[ "maxOpenConnections" ])) : "(no limit)" ;
-              this.threadPoolMinimumValue.innerHTML = entities.encode(String(this.portData["threadPoolMinimum"] || ""));
-              this.threadPoolMaximumValue.innerHTML = entities.encode(String(this.portData["threadPoolMaximum"] || ""));
-              this.threadPoolSizeValue.innerHTML = entities.encode(String(this.portData["threadPoolSize"] || ""));
-
-              this.keyStoreValue.innerHTML = this.portData[ "keyStore" ] ? entities.encode(String(this.portData[ "keyStore" ])) : "";
-              this.needClientAuthValue.innerHTML = "<input type='checkbox' disabled='disabled' "+(this.portData[ "needClientAuth" ] ? "checked='checked'": "")+" />" ;
-              this.wantClientAuthValue.innerHTML = "<input type='checkbox' disabled='disabled' "+(this.portData[ "wantClientAuth" ] ? "checked='checked'": "")+" />" ;
-              this.trustStoresValue.innerHTML = printArray( "trustStores", this.portData);
-              this.clientCertRecorderValue.innerHTML = this.portData[ "clientCertRecorder"]? entities.encode(String(this.portData[ "clientCertRecorder"])):"";
-
-              var typeMetaData = this.management.metadata.getMetaData("Port", this.portData["type"]);
-
-              this.authenticationProvider.style.display = "authenticationProvider" in typeMetaData.attributes ? "block" : "none";
-              this.bindingAddress.style.display = "bindingAddress" in typeMetaData.attributes ? "block" : "none";
-              this.keyStore.style.display = "keyStore" in typeMetaData.attributes ? "block" : "none";
-              this.needClientAuth.style.display = "needClientAuth" in typeMetaData.attributes ? "block" : "none";
-              this.wantClientAuth.style.display = "wantClientAuth" in typeMetaData.attributes ? "block" : "none";
-              this.trustStores.style.display = "trustStores" in typeMetaData.attributes ? "block" : "none";
-
-              var hasThreadPoolMinMaxSettings = "threadPoolMaximum" in typeMetaData.attributes;
-              this.threadPoolMinimum.style.display = hasThreadPoolMinMaxSettings ? "block" : "none";
-              this.threadPoolMaximum.style.display = hasThreadPoolMinMaxSettings ? "block" : "none";
+               this.nameValue.innerHTML = entities.encode(String(this.portData["name"]));
+               this.stateValue.innerHTML = entities.encode(String(this.portData["state"]));
+               this.typeValue.innerHTML = entities.encode(String(this.portData["type"]));
+               this.portValue.innerHTML = entities.encode(String(this.portData["port"]));
+               this.authenticationProviderValue.innerHTML = this.portData["authenticationProvider"]
+                   ? entities.encode(String(this.portData["authenticationProvider"]))
+                   : "";
+               this.protocolsValue.innerHTML = printArray("protocols", this.portData);
+               this.transportsValue.innerHTML = printArray("transports", this.portData);
+               this.bindingAddressValue.innerHTML =
+                   this.portData["bindingAddress"] ? entities.encode(String(this.portData["bindingAddress"])) : "";
+               this.connectionCountValue.innerHTML =
+                   this.portData["connectionCount"] ? entities.encode(String(this.portData["connectionCount"])) : "0";
+               this.maxOpenConnectionsValue.innerHTML =
+                   (this.portData["maxOpenConnections"] && this.portData["maxOpenConnections"] >= 0) ? entities.encode(
+                       String(this.portData["maxOpenConnections"])) : "(no limit)";
+               this.threadPoolMinimumValue.innerHTML =
+                   entities.encode(String(this.portData["threadPoolMinimum"] || ""));
+               this.threadPoolMaximumValue.innerHTML =
+                   entities.encode(String(this.portData["threadPoolMaximum"] || ""));
+               this.threadPoolSizeValue.innerHTML = entities.encode(String(this.portData["threadPoolSize"] || ""));
+
+               this.keyStoreValue.innerHTML =
+                   this.portData["keyStore"] ? entities.encode(String(this.portData["keyStore"])) : "";
+               this.needClientAuthValue.innerHTML =
+                   "<input type='checkbox' disabled='disabled' " + (this.portData["needClientAuth"]
+                       ? "checked='checked'"
+                       : "") + " />";
+               this.wantClientAuthValue.innerHTML =
+                   "<input type='checkbox' disabled='disabled' " + (this.portData["wantClientAuth"]
+                       ? "checked='checked'"
+                       : "") + " />";
+               this.trustStoresValue.innerHTML = printArray("trustStores", this.portData);
+               this.clientCertRecorderValue.innerHTML = this.portData["clientCertRecorder"]
+                   ? entities.encode(String(this.portData["clientCertRecorder"]))
+                   : "";
+
+               var typeMetaData = this.management.metadata.getMetaData("Port", this.portData["type"]);
+
+               this.authenticationProvider.style.display =
+                   "authenticationProvider" in typeMetaData.attributes ? "block" : "none";
+               this.bindingAddress.style.display = "bindingAddress" in typeMetaData.attributes ? "block" : "none";
+               this.keyStore.style.display = "keyStore" in typeMetaData.attributes ? "block" : "none";
+               this.needClientAuth.style.display = "needClientAuth" in typeMetaData.attributes ? "block" : "none";
+               this.wantClientAuth.style.display = "wantClientAuth" in typeMetaData.attributes ? "block" : "none";
+               this.trustStores.style.display = "trustStores" in typeMetaData.attributes ? "block" : "none";
+
+               var hasThreadPoolMinMaxSettings = "threadPoolMaximum" in typeMetaData.attributes;
+               this.threadPoolMinimum.style.display = hasThreadPoolMinMaxSettings ? "block" : "none";
+               this.threadPoolMaximum.style.display = hasThreadPoolMinMaxSettings ? "block" : "none";
 
-              var hasThreadPoolSizeSettings = "threadPoolSize" in typeMetaData.attributes;
-              this.threadPoolSize.style.display = hasThreadPoolSizeSettings ? "block" : "none";
+               var hasThreadPoolSizeSettings = "threadPoolSize" in typeMetaData.attributes;
+               this.threadPoolSize.style.display = hasThreadPoolSizeSettings ? "block" : "none";
 
-              this.maxOpenConnections.style.display = "maxOpenConnections" in typeMetaData.attributes ? "block" : "none";
+               this.maxOpenConnections.style.display =
+                   "maxOpenConnections" in typeMetaData.attributes ? "block" : "none";
 
            };
 
-           PortUpdater.prototype.update = function(callback)
+           PortUpdater.prototype.update = function (callback)
            {
 
-              var thisObj = this;
+               var thisObj = this;
 
-              this.management.load(this.modelObj).then(function(data)
-                   {
-                      thisObj.portData = data[0] || {};
-                      thisObj.updateUI(thisObj.portData);
-                      util.flattenStatistics( thisObj.portData );
-                      if (callback)
-                      {
-                        callback();
-                      }
-                      thisObj.updateHeader();
-                   },
-                   function(error)
-                   {
-                      util.tabErrorHandler(error, {updater:thisObj,
-                                                   contentPane: thisObj.tabObject.contentPane,
-                                                   tabContainer: thisObj.tabObject.controller.tabContainer,
-                                                   name: thisObj.modelObj.name,
-                                                   category: "Port"});
-                   });
+               this.management.load(this.modelObj).then(function (data)
+                                                        {
+                                                            thisObj.portData = data[0] || {};
+                                                            thisObj.updateUI(thisObj.portData);
+                                                            util.flattenStatistics(thisObj.portData);
+                                                            if (callback)
+                                                            {
+                                                                callback();
+                                                            }
+                                                            thisObj.updateHeader();
+                                                        }, function (error)
+                                                        {
+                                                            util.tabErrorHandler(error, {
+                                                                updater: thisObj,
+                                                                contentPane: thisObj.tabObject.contentPane,
+                                                                tabContainer: thisObj.tabObject.controller.tabContainer,
+                                                                name: thisObj.modelObj.name,
+                                                                category: "Port"
+                                                            });
+                                                        });
            };
 
-           PortUpdater.prototype.updateUI = function(data)
+           PortUpdater.prototype.updateUI = function (data)
            {
                if (!this.details)
                {
                    var that = this;
-                   require(["qpid/management/port/" + data.type.toLowerCase() + "/show"],
-                       function (Details)
-                       {
-                           that.details = new Details({
-                               containerNode: that.portAttributes,
-                               typeSpecificDetailsNode: that.portTypeSpecificDetails,
-                               metadata: that.tabObject.management.metadata,
-                               data: data,
-                               management: that.tabObject.management,
-                               modelObj: that.tabObject.modelObj,
-                               portUpdater: that.portUpdater
-                           });
-                       }
-                   );
+                   require(["qpid/management/port/" + data.type.toLowerCase() + "/show"], function (Details)
+                   {
+                       that.details = new Details({
+                           containerNode: that.portAttributes,
+                           typeSpecificDetailsNode: that.portTypeSpecificDetails,
+                           metadata: that.tabObject.management.metadata,
+                           data: data,
+                           management: that.tabObject.management,
+                           modelObj: that.tabObject.modelObj,
+                           portUpdater: that.portUpdater
+                       });
+                   });
                }
                else
                {
@@ -260,6 +299,5 @@ define(["dojo/dom",
                }
            }
 
-
            return Port;
        });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Preferences.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Preferences.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Preferences.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Preferences.js Fri Apr 29 11:04:40 2016
@@ -18,8 +18,7 @@
  * under the License.
  *
  */
-define([
-        "dojo/_base/declare",
+define(["dojo/_base/declare",
         "dojo/_base/event",
         "dojo/_base/connect",
         "dojo/dom",
@@ -49,237 +48,279 @@ define([
         "dojox/validate/us",
         "dojox/validate/web",
         "dojo/domReady!"],
-function (declare, event, connect, dom, domConstruct, parser, json, Memory, ObjectStore, entities, registry, TimeZoneSelector, markup, util) {
+       function (declare, event, connect, dom, domConstruct, parser, json, Memory, ObjectStore, entities, registry, TimeZoneSelector, markup, util)
+       {
 
-  var preferenceNames = ["timeZone", "updatePeriod"];
+           var preferenceNames = ["timeZone", "updatePeriod"];
 
-  return declare("qpid.management.Preferences", null, {
+           return declare("qpid.management.Preferences", null, {
 
-    preferencesDialog: null,
+               preferencesDialog: null,
 
-    constructor: function(management)
-    {
-      var that = this;
-      this.management = management;
-      this.userPreferences = {};
-      this.domNode = domConstruct.create("div", {innerHTML: markup});
-      parser.parse(this.domNode).then(function(instances)
-      {
-        that._postParse();
-      });
-    },
-    _postParse: function()
-    {
-      var that = this;
-      this.preferencesDialog = registry.byId("preferences.preferencesDialog");
-      for(var i=0; i<preferenceNames.length; i++)
-      {
-        var name = preferenceNames[i];
-        this[name] = registry.byId("preferences." + name);
-        this[name].on("change", function(val){that._toggleSetButtons();});
-      }
-
-      this.timeZoneSelector = registry.byId("preferences.timeZone");
-      this.timeZoneSelector.set("timezones", this.management.timezone.getAllTimeZones());
-      this.setButton = registry.byId("preferences.setButton");
-      this.setAndCloseButton = registry.byId("preferences.setAndCloseButton");
-      this.setButton.on("click", function(e){that._savePreferences(e, false);});
-      this.setAndCloseButton.on("click", function(e){that._savePreferences(e, true);});
-      this.theForm = registry.byId("preferences.preferencesForm");
-      this.usersGrid = registry.byId("preferences.users");
-      this.usersGrid.set("structure", [ { name: "User", field: "name", width: "50%"},
-                                 { name: "Authentication Provider", field: "authenticationProvider", width: "50%"}]);
-      this.deleteButton = registry.byId("preferences.deleteButton");
-      this.deleteAndCloseButton = registry.byId("preferences.deleteAndCloseButton");
-      this.deleteButton.on("click", function(e){that._deletePreferences(false);});
-      this.deleteAndCloseButton.on("click", function(e){that._deletePreferences(true);});
-
-      var deletePreferencesButtonToggler = function(rowIndex){
-        var data = that.usersGrid.selection.getSelected();
-        that.deleteButton.set("disabled",!data.length );
-        that.deleteAndCloseButton.set("disabled",!data.length );
-      };
-      connect.connect(this.usersGrid.selection, 'onSelected',  deletePreferencesButtonToggler);
-      connect.connect(this.usersGrid.selection, 'onDeselected',  deletePreferencesButtonToggler);
-      this.theForm.on("submit", function(e){event.stop(e); return false;});
-
-      this._setValues();
-
-      deletePreferencesButtonToggler();
-      this.preferencesDialog.startup();
-    },
-
-    showDialog: function(){
-      this._setValues();
-      var that = this;
-      this._loadUserPreferences(function(){that.preferencesDialog.show();});
-    },
-
-    destroy: function()
-    {
-      if (this.preferencesDialog)
-      {
-        this.preferencesDialog.destroyRecursevly();
-        this.preferencesDialog = null;
-      }
-    },
-
-    _savePreferences: function(e, hideDialog)
-    {
-      var that =this;
-      event.stop(e);
-      if(this.theForm.validate()){
-        var preferences = {};
-        for(var i=0; i<preferenceNames.length; i++)
-        {
-          var name = preferenceNames[i];
-          var preferenceWidget = this[name];
-          if (preferenceWidget)
-          {
-            preferences[name] = preferenceWidget.hasOwnProperty("checked") ? preferenceWidget.checked : preferenceWidget.get("value");
-          }
-        }
-
-        this.management.userPreferences.save(
-            preferences,
-            function(preferences)
-            {
-              success = true;
-              if (hideDialog)
-              {
-                that.preferencesDialog.hide();
-              }
-              else
-              {
-                var reloadUsers = true;
-                if (that.users)
-                {
-                  var authenticatedUser = dom.byId("authenticatedUser").innerHTML;
-                  for(var i=0; i<that.users.length; i++)
-                  {
-                    if (that.users[i].name == authenticatedUser)
-                    {
-                      reloadUsers = false;
-                      break;
-                    }
-                  }
-                }
-                if (reloadUsers)
-                {
-                  that._loadUserPreferences();
-                }
-              }
-              that._toggleSetButtons();
-            });
-      }
-    },
-
-    _deletePreferences: function(hideDialog){
-    var that = this;
-    var postDelete = function(data)
-       {
-        that._loadUserPreferences();
-        var authenticatedUser = dom.byId("authenticatedUser").innerHTML;
-        for(i = 0; i<data.length; i++)
-        {
-          if (data[i].name == authenticatedUser)
-          {
-            that.management.userPreferences.resetPreferences();
-            that._setValues();
-            break;
-          }
-        }
-        if (hideDialog)
-        {
-          that.preferencesDialog.hide();
-        }
-       };
-
-      util.deleteSelectedRows(this.usersGrid,
-                              "Are you sure you want to delete preferences for user",
-                              this.management,
-                              "service/userpreferences",
-                              null,
-                              "user",
-                              postDelete );
-    },
-
-    _setValues: function()
-    {
-      for(var i = 0; i < preferenceNames.length; i++)
-      {
-        var name = preferenceNames[i];
-        var preferenceWidget = this[name];
-        if (preferenceWidget)
-        {
-          var value = this.management.userPreferences[name]
-          if (typeof value == "string")
-          {
-            value = entities.encode(String(value))
-          }
-          if (!value && name == "updatePeriod")
-          {
-            // set to default
-            value = 5;
-          }
-          preferenceWidget.set("value", value);
-          if (preferenceWidget.hasOwnProperty("checked"))
-          {
-            preferenceWidget.set("checked", this.management.userPreferences[name] ? true : false);
-          }
-        }
-      }
-      this._toggleSetButtons();
-    },
-
-    _loadUserPreferences : function(callback)
-    {
-      var that = this;
-      this.management.get({url: "service/userpreferences"}).then(
-                          function(users)
-                          {
-                                 for(var i=0; i<users.length; i++)
-                                 {
-                                     users[i].id = encodeURIComponent(users[i].authenticationProvider)
-                                         + "/"
-                                         + encodeURIComponent(users[i].name);
-                                 }
-                                 that.users = users;
-                                 var usersStore = new Memory({data: users, idProperty: "id"});
-                                 var usersDataStore = new ObjectStore({objectStore: usersStore});
-                                 if (that.usersGrid.store)
-                                 {
-                                   that.usersGrid.store.close();
-                                 }
-                                 that.usersGrid.set("store", usersDataStore);
-                                 if (callback)
-                                 {
-                                    callback();
-                                 }
-                                 that.usersGrid._refresh();
-                          });
-    },
-
-    _toggleSetButtons: function()
-    {
-      var changed = false;
-      for(var i=0; i<preferenceNames.length; i++)
-      {
-        var name = preferenceNames[i];
-        var preferenceWidget = this[name];
-        if (preferenceWidget)
-        {
-          var value = preferenceWidget.hasOwnProperty("checked") ? preferenceWidget.checked : preferenceWidget.get("value");
-          if (value != this.management.userPreferences[name])
-          {
-            changed = true;
-            break;
-          }
-        }
-      }
-      this.setButton.set("disabled", !changed);
-      this.setAndCloseButton.set("disabled", !changed);
-    }
+               constructor: function (management)
+               {
+                   var that = this;
+                   this.management = management;
+                   this.userPreferences = {};
+                   this.domNode = domConstruct.create("div", {innerHTML: markup});
+                   parser.parse(this.domNode).then(function (instances)
+                                                   {
+                                                       that._postParse();
+                                                   });
+               },
+               _postParse: function ()
+               {
+                   var that = this;
+                   this.preferencesDialog = registry.byId("preferences.preferencesDialog");
+                   for (var i = 0; i < preferenceNames.length; i++)
+                   {
+                       var name = preferenceNames[i];
+                       this[name] = registry.byId("preferences." + name);
+                       this[name].on("change", function (val)
+                       {
+                           that._toggleSetButtons();
+                       });
+                   }
+
+                   this.timeZoneSelector = registry.byId("preferences.timeZone");
+                   this.timeZoneSelector.set("timezones", this.management.timezone.getAllTimeZones());
+                   this.setButton = registry.byId("preferences.setButton");
+                   this.setAndCloseButton = registry.byId("preferences.setAndCloseButton");
+                   this.setButton.on("click", function (e)
+                   {
+                       that._savePreferences(e, false);
+                   });
+                   this.setAndCloseButton.on("click", function (e)
+                   {
+                       that._savePreferences(e, true);
+                   });
+                   this.theForm = registry.byId("preferences.preferencesForm");
+                   this.usersGrid = registry.byId("preferences.users");
+                   this.usersGrid.set("structure",
+                                      [{
+                                          name: "User",
+                                          field: "name",
+                                          width: "50%"
+                                      },
+                                          {
+                                              name: "Authentication Provider",
+                                              field: "authenticationProvider",
+                                              width: "50%"
+                                          }]);
+                   this.deleteButton = registry.byId("preferences.deleteButton");
+                   this.deleteAndCloseButton = registry.byId("preferences.deleteAndCloseButton");
+                   this.deleteButton.on("click", function (e)
+                   {
+                       that._deletePreferences(false);
+                   });
+                   this.deleteAndCloseButton.on("click", function (e)
+                   {
+                       that._deletePreferences(true);
+                   });
+
+                   var deletePreferencesButtonToggler = function (rowIndex)
+                   {
+                       var data = that.usersGrid.selection.getSelected();
+                       that.deleteButton.set("disabled", !data.length);
+                       that.deleteAndCloseButton.set("disabled", !data.length);
+                   };
+                   connect.connect(this.usersGrid.selection, 'onSelected', deletePreferencesButtonToggler);
+                   connect.connect(this.usersGrid.selection, 'onDeselected', deletePreferencesButtonToggler);
+                   this.theForm.on("submit", function (e)
+                   {
+                       event.stop(e);
+                       return false;
+                   });
+
+                   this._setValues();
+
+                   deletePreferencesButtonToggler();
+                   this.preferencesDialog.startup();
+               },
+
+               showDialog: function ()
+               {
+                   this._setValues();
+                   var that = this;
+                   this._loadUserPreferences(function ()
+                                             {
+                                                 that.preferencesDialog.show();
+                                             });
+               },
+
+               destroy: function ()
+               {
+                   if (this.preferencesDialog)
+                   {
+                       this.preferencesDialog.destroyRecursevly();
+                       this.preferencesDialog = null;
+                   }
+               },
+
+               _savePreferences: function (e, hideDialog)
+               {
+                   var that = this;
+                   event.stop(e);
+                   if (this.theForm.validate())
+                   {
+                       var preferences = {};
+                       for (var i = 0; i < preferenceNames.length; i++)
+                       {
+                           var name = preferenceNames[i];
+                           var preferenceWidget = this[name];
+                           if (preferenceWidget)
+                           {
+                               preferences[name] = preferenceWidget.hasOwnProperty("checked")
+                                   ? preferenceWidget.checked
+                                   : preferenceWidget.get("value");
+                           }
+                       }
+
+                       this.management.userPreferences.save(preferences, function (preferences)
+                       {
+                           success = true;
+                           if (hideDialog)
+                           {
+                               that.preferencesDialog.hide();
+                           }
+                           else
+                           {
+                               var reloadUsers = true;
+                               if (that.users)
+                               {
+                                   var authenticatedUser = dom.byId("authenticatedUser").innerHTML;
+                                   for (var i = 0; i < that.users.length; i++)
+                                   {
+                                       if (that.users[i].name == authenticatedUser)
+                                       {
+                                           reloadUsers = false;
+                                           break;
+                                       }
+                                   }
+                               }
+                               if (reloadUsers)
+                               {
+                                   that._loadUserPreferences();
+                               }
+                           }
+                           that._toggleSetButtons();
+                       });
+                   }
+               },
+
+               _deletePreferences: function (hideDialog)
+               {
+                   var that = this;
+                   var postDelete = function (data)
+                   {
+                       that._loadUserPreferences();
+                       var authenticatedUser = dom.byId("authenticatedUser").innerHTML;
+                       for (i = 0; i < data.length; i++)
+                       {
+                           if (data[i].name == authenticatedUser)
+                           {
+                               that.management.userPreferences.resetPreferences();
+                               that._setValues();
+                               break;
+                           }
+                       }
+                       if (hideDialog)
+                       {
+                           that.preferencesDialog.hide();
+                       }
+                   };
+
+                   util.deleteSelectedRows(this.usersGrid,
+                                           "Are you sure you want to delete preferences for user",
+                                           this.management,
+                                           "service/userpreferences",
+                                           null,
+                                           "user",
+                                           postDelete);
+               },
+
+               _setValues: function ()
+               {
+                   for (var i = 0; i < preferenceNames.length; i++)
+                   {
+                       var name = preferenceNames[i];
+                       var preferenceWidget = this[name];
+                       if (preferenceWidget)
+                       {
+                           var value = this.management.userPreferences[name]
+                           if (typeof value == "string")
+                           {
+                               value = entities.encode(String(value))
+                           }
+                           if (!value && name == "updatePeriod")
+                           {
+                               // set to default
+                               value = 5;
+                           }
+                           preferenceWidget.set("value", value);
+                           if (preferenceWidget.hasOwnProperty("checked"))
+                           {
+                               preferenceWidget.set("checked", this.management.userPreferences[name] ? true : false);
+                           }
+                       }
+                   }
+                   this._toggleSetButtons();
+               },
+
+               _loadUserPreferences: function (callback)
+               {
+                   var that = this;
+                   this.management.get({url: "service/userpreferences"}).then(function (users)
+                                                                              {
+                                                                                  for (var i = 0; i < users.length; i++)
+                                                                                  {
+                                                                                      users[i].id =
+                                                                                          encodeURIComponent(users[i].authenticationProvider)
+                                                                                          + "/" + encodeURIComponent(
+                                                                                              users[i].name);
+                                                                                  }
+                                                                                  that.users = users;
+                                                                                  var usersStore = new Memory({
+                                                                                      data: users,
+                                                                                      idProperty: "id"
+                                                                                  });
+                                                                                  var usersDataStore = new ObjectStore({objectStore: usersStore});
+                                                                                  if (that.usersGrid.store)
+                                                                                  {
+                                                                                      that.usersGrid.store.close();
+                                                                                  }
+                                                                                  that.usersGrid.set("store",
+                                                                                                     usersDataStore);
+                                                                                  if (callback)
+                                                                                  {
+                                                                                      callback();
+                                                                                  }
+                                                                                  that.usersGrid._refresh();
+                                                                              });
+               },
+
+               _toggleSetButtons: function ()
+               {
+                   var changed = false;
+                   for (var i = 0; i < preferenceNames.length; i++)
+                   {
+                       var name = preferenceNames[i];
+                       var preferenceWidget = this[name];
+                       if (preferenceWidget)
+                       {
+                           var value = preferenceWidget.hasOwnProperty("checked")
+                               ? preferenceWidget.checked
+                               : preferenceWidget.get("value");
+                           if (value != this.management.userPreferences[name])
+                           {
+                               changed = true;
+                               break;
+                           }
+                       }
+                   }
+                   this.setButton.set("disabled", !changed);
+                   this.setAndCloseButton.set("disabled", !changed);
+               }
 
-  });
-});
+           });
+       });

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/PreferencesProvider.js Fri Apr 29 11:04:40 2016
@@ -32,41 +32,61 @@ define(["dojo/parser",
         "qpid/management/addPreferencesProvider",
         "dojo/text!showPreferencesProvider.html",
         "dojo/domReady!"],
-       function (parser, query, construct, array, properties, updater, util, event, registry, domStyle, entities, addPreferencesProvider, template) {
+       function (parser, query, construct, array, properties, updater, util, event, registry, domStyle, entities, addPreferencesProvider, template)
+       {
 
-           function PreferencesProvider(name, parent, controller) {
+           function PreferencesProvider(name, parent, controller)
+           {
                this.name = name;
                this.controller = controller;
                this.management = management;
-               this.modelObj = { type: "preferencesprovider", name: name, parent: parent};
+               this.modelObj = {
+                   type: "preferencesprovider",
+                   name: name,
+                   parent: parent
+               };
                this.authenticationProviderName = parent.name;
            }
 
-           PreferencesProvider.prototype.getTitle = function() {
-               return "PreferencesProvider:" + this.authenticationProviderName + "/" + this.name ;
+           PreferencesProvider.prototype.getTitle = function ()
+           {
+               return "PreferencesProvider:" + this.authenticationProviderName + "/" + this.name;
            };
 
-           PreferencesProvider.prototype.init = function(node, parentObject) {
-             var that = this;
+           PreferencesProvider.prototype.init = function (node, parentObject)
+           {
+               var that = this;
                node.innerHTML = template;
-               parser.parse(node).then(function(instances)
-               {
-                   that.containerNode = node;
-                   that.parentObject = parentObject;
-                   that.preferencesProviderType=query(".preferencesProviderType", node)[0];
-                   that.preferencesProviderState=query(".preferencesProviderState", node)[0];
-                   that.editPreferencesProviderButton = query(".editPreferencesProviderButton", node)[0];
-                   that.deletePreferencesProviderButton = query(".deletePreferencesProviderButton", node)[0];
-                   that.preferencesProviderAttributes = query(".preferencesProviderAttributes", node)[0];
-                   that.preferencesDetailsDiv = query(".preferencesDetails", node)[0];
-                   var editPreferencesProviderWidget = registry.byNode(that.editPreferencesProviderButton);
-                   editPreferencesProviderWidget.on("click", function(evt){ event.stop(evt); that.editPreferencesProvider();});
-                   var deletePreferencesProviderWidget = registry.byNode(that.deletePreferencesProviderButton);
-                   deletePreferencesProviderWidget.on("click", function(evt){ event.stop(evt); that.deletePreferencesProvider();});
-               });
+               parser.parse(node).then(function (instances)
+                                       {
+                                           that.containerNode = node;
+                                           that.parentObject = parentObject;
+                                           that.preferencesProviderType = query(".preferencesProviderType", node)[0];
+                                           that.preferencesProviderState = query(".preferencesProviderState", node)[0];
+                                           that.editPreferencesProviderButton =
+                                               query(".editPreferencesProviderButton", node)[0];
+                                           that.deletePreferencesProviderButton =
+                                               query(".deletePreferencesProviderButton", node)[0];
+                                           that.preferencesProviderAttributes =
+                                               query(".preferencesProviderAttributes", node)[0];
+                                           that.preferencesDetailsDiv = query(".preferencesDetails", node)[0];
+                                           var editPreferencesProviderWidget = registry.byNode(that.editPreferencesProviderButton);
+                                           editPreferencesProviderWidget.on("click", function (evt)
+                                           {
+                                               event.stop(evt);
+                                               that.editPreferencesProvider();
+                                           });
+                                           var deletePreferencesProviderWidget = registry.byNode(that.deletePreferencesProviderButton);
+                                           deletePreferencesProviderWidget.on("click", function (evt)
+                                           {
+                                               event.stop(evt);
+                                               that.deletePreferencesProvider();
+                                           });
+                                       });
            };
 
-           PreferencesProvider.prototype.open = function(contentPane) {
+           PreferencesProvider.prototype.open = function (contentPane)
+           {
                this.contentPane = contentPane;
                this.init(contentPane.containerNode);
                this.reload();
@@ -74,102 +94,115 @@ define(["dojo/parser",
                updater.add(this.updater);
            };
 
-           PreferencesProvider.prototype.close = function() {
-             if (this.updater)
-             {
-               updater.remove( this.updater);
-             }
-           };
-
-           PreferencesProvider.prototype.deletePreferencesProvider = function() {
-             if (this.preferencesProviderData){
-               var preferencesProviderData = this.preferencesProviderData;
-               if(confirm("Are you sure you want to delete preferences provider '" + preferencesProviderData.name + "'?")) {
-                 var that = this;
-                 this.management.remove(this.modelObj).then(
-                     function(data) {
-                       that.update(null);
-
-                       // if opened in tab
-                       if (that.contentPane)
-                       {
-                         that.close();
-                         that.contentPane.onClose()
-                         that.controller.tabContainer.removeChild(that.contentPane);
-                         that.contentPane.destroyRecursive();
-                       }
-                       else
-                       {
-                         var widgets = registry.findWidgets(that.containerNode);
-                         array.forEach(widgets, function(item) { item.destroyRecursive();});
-                         construct.empty(that.containerNode);
-                         if (that.parentObject)
-                         {
-                            that.parentObject.onPreferencesProviderDeleted();
-                         }
-                       }
-                     },
-                     util.xhrErrorHandler);
+           PreferencesProvider.prototype.close = function ()
+           {
+               if (this.updater)
+               {
+                   updater.remove(this.updater);
+               }
+           };
+
+           PreferencesProvider.prototype.deletePreferencesProvider = function ()
+           {
+               if (this.preferencesProviderData)
+               {
+                   var preferencesProviderData = this.preferencesProviderData;
+                   if (confirm("Are you sure you want to delete preferences provider '" + preferencesProviderData.name
+                               + "'?"))
+                   {
+                       var that = this;
+                       this.management.remove(this.modelObj).then(function (data)
+                                                                  {
+                                                                      that.update(null);
+
+                                                                      // if opened in tab
+                                                                      if (that.contentPane)
+                                                                      {
+                                                                          that.close();
+                                                                          that.contentPane.onClose()
+                                                                          that.controller.tabContainer.removeChild(that.contentPane);
+                                                                          that.contentPane.destroyRecursive();
+                                                                      }
+                                                                      else
+                                                                      {
+                                                                          var widgets = registry.findWidgets(that.containerNode);
+                                                                          array.forEach(widgets, function (item)
+                                                                          {
+                                                                              item.destroyRecursive();
+                                                                          });
+                                                                          construct.empty(that.containerNode);
+                                                                          if (that.parentObject)
+                                                                          {
+                                                                              that.parentObject.onPreferencesProviderDeleted();
+                                                                          }
+                                                                      }
+                                                                  }, util.xhrErrorHandler);
+                   }
+               }
+           };
+
+           PreferencesProvider.prototype.editPreferencesProvider = function ()
+           {
+               if (this.preferencesProviderData)
+               {
+                   addPreferencesProvider.show(this.management, this.modelObj);
                }
-             }
            };
 
-           PreferencesProvider.prototype.editPreferencesProvider = function() {
-             if (this.preferencesProviderData){
-               addPreferencesProvider.show(this.management, this.modelObj);
-             }
-           };
-
-           PreferencesProvider.prototype.update = function(data) {
-             this.preferencesProviderData = data;
-             if (data)
-             {
-               this.name = data.name;
-               this.preferencesProviderAttributes.style.display = 'block';
-               this.editPreferencesProviderButton.style.display = 'inline';
-               this.deletePreferencesProviderButton.style.display = 'inline';
-               this.preferencesProviderType.innerHTML = entities.encode(String(data.type));
-               this.preferencesProviderState.innerHTML = entities.encode(String(data.state));
-               if (!this.details)
+           PreferencesProvider.prototype.update = function (data)
+           {
+               this.preferencesProviderData = data;
+               if (data)
                {
-                 var that = this;
-                 require(["qpid/management/preferencesprovider/" + data.type.toLowerCase() + "/show"],
-                   function(PreferencesProviderDetails) {
-                     that.details = new PreferencesProviderDetails(that.preferencesDetailsDiv);
-                     that.details.update(data);
-                 });
+                   this.name = data.name;
+                   this.preferencesProviderAttributes.style.display = 'block';
+                   this.editPreferencesProviderButton.style.display = 'inline';
+                   this.deletePreferencesProviderButton.style.display = 'inline';
+                   this.preferencesProviderType.innerHTML = entities.encode(String(data.type));
+                   this.preferencesProviderState.innerHTML = entities.encode(String(data.state));
+                   if (!this.details)
+                   {
+                       var that = this;
+                       require(["qpid/management/preferencesprovider/" + data.type.toLowerCase() + "/show"],
+                               function (PreferencesProviderDetails)
+                               {
+                                   that.details = new PreferencesProviderDetails(that.preferencesDetailsDiv);
+                                   that.details.update(data);
+                               });
+                   }
+                   else
+                   {
+                       this.details.update(data);
+                   }
                }
                else
                {
-                 this.details.update(data);
+                   this.editPreferencesProviderButton.style.display = 'none';
+                   this.deletePreferencesProviderButton.style.display = 'none';
+                   this.preferencesProviderAttributes.style.display = 'none';
+                   this.details = null;
                }
-             }
-             else
-             {
-               this.editPreferencesProviderButton.style.display = 'none';
-               this.deletePreferencesProviderButton.style.display = 'none';
-               this.preferencesProviderAttributes.style.display = 'none';
-               this.details = null;
-             }
-           };
-
-           PreferencesProvider.prototype.reload = function()
-           {
-             var that = this;
-             that.management.load(that.modelObj)
-                 .then(function(data) {
-                     var preferencesProviderData = data[0];
-                     util.flattenStatistics( preferencesProviderData );
-                     that.update(preferencesProviderData);
-                 },
-                 function(error)
-                 {
-                    util.tabErrorHandler(error, {updater:that.updater,
-                                                 contentPane: that.contentPane,
-                                                 tabContainer: that.controller.tabContainer,
-                                                 name: that.modelObj.name,
-                                                 category: "Preferences Provider"});
-                 });
+           };
+
+           PreferencesProvider.prototype.reload = function ()
+           {
+               var that = this;
+               that.management.load(that.modelObj)
+                   .then(function (data)
+                         {
+                             var preferencesProviderData = data[0];
+                             util.flattenStatistics(preferencesProviderData);
+                             that.update(preferencesProviderData);
+                         }, function (error)
+                         {
+                             util.tabErrorHandler(error, {
+                                 updater: that.updater,
+                                 contentPane: that.contentPane,
+                                 tabContainer: that.controller.tabContainer,
+                                 name: that.modelObj.name,
+                                 category: "Preferences Provider"
+                             });
+                         });
            };
 
            function PreferencesProviderUpdater(preferencesProvider)
@@ -177,9 +210,9 @@ define(["dojo/parser",
                this.preferencesProvider = preferencesProvider;
            };
 
-           PreferencesProviderUpdater.prototype.update = function()
+           PreferencesProviderUpdater.prototype.update = function ()
            {
-             this.preferencesProvider.reload();
+               this.preferencesProvider.reload();
            };
 
            return PreferencesProvider;

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/QueryTab.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/QueryTab.js?rev=1741609&r1=1741608&r2=1741609&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/QueryTab.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/QueryTab.js Fri Apr 29 11:04:40 2016
@@ -19,68 +19,70 @@
  *
  */
 define(["dojo/parser",
-    "dojo/query",
-    "dijit/registry",
-    "dojox/html/entities",
-    "qpid/common/properties",
-    "qpid/common/util",
-    "qpid/common/formatter",
-    "dojo/text!showQueryTab.html",
-    "qpid/management/query/QueryBuilder",
-    "dojo/dom-construct",
-    "dojo/domReady!"],
-  function (parser, query, registry, entities, properties, util, formatter, template, QueryBuilder, domConstruct)
-  {
-
-    function QueryTab(name, parent, controller)
-    {
-      this.name = name;
-      this.controller = controller;
-      this.management = controller.management;
-      this.parent = parent;
-    }
-
-    QueryTab.prototype.getTitle = function ()
-    {
-      return "Query";
-    };
-
-    QueryTab.prototype.open = function (contentPane)
-    {
-      var that = this;
-      this.contentPane = contentPane;
-      contentPane.containerNode.innerHTML = template;
-      parser.parse(contentPane.containerNode).then(function (instances)
-                                                   {
-                                                     that.onOpen(contentPane.containerNode)
-                                                   },
-                                                   function(e)
-                                                   {
-                                                     console.error("Unexpected error on parsing query tab template", e);
-                                                   });
-    };
-
-    QueryTab.prototype.onOpen = function (containerNode)
-    {
-      this.queryEditorNode =  query(".queryEditorNode", containerNode)[0];
-      this.queryBuilder = new QueryBuilder({management: this.management,
-                                            parentModelObj: this.parent,
-                                            controller: this.controller},
-                                           this.queryEditorNode);
-    };
-
-    QueryTab.prototype.close = function ()
-    {
-
-    };
-
-    QueryTab.prototype.destroy = function ()
-    {
-      this.close();
-      this.contentPane.onClose();
-      this.controller.tabContainer.removeChild(this.contentPane);
-      this.contentPane.destroyRecursive();
-    };
+        "dojo/query",
+        "dijit/registry",
+        "dojox/html/entities",
+        "qpid/common/properties",
+        "qpid/common/util",
+        "qpid/common/formatter",
+        "dojo/text!showQueryTab.html",
+        "qpid/management/query/QueryBuilder",
+        "dojo/dom-construct",
+        "dojo/domReady!"],
+       function (parser, query, registry, entities, properties, util, formatter, template, QueryBuilder, domConstruct)
+       {
+
+           function QueryTab(name, parent, controller)
+           {
+               this.name = name;
+               this.controller = controller;
+               this.management = controller.management;
+               this.parent = parent;
+           }
+
+           QueryTab.prototype.getTitle = function ()
+           {
+               return "Query";
+           };
+
+           QueryTab.prototype.open = function (contentPane)
+           {
+               var that = this;
+               this.contentPane = contentPane;
+               contentPane.containerNode.innerHTML = template;
+               parser.parse(contentPane.containerNode).then(function (instances)
+                                                            {
+                                                                that.onOpen(contentPane.containerNode)
+                                                            }, function (e)
+                                                            {
+                                                                console.error(
+                                                                    "Unexpected error on parsing query tab template",
+                                                                    e);
+                                                            });
+           };
+
+           QueryTab.prototype.onOpen = function (containerNode)
+           {
+               this.queryEditorNode = query(".queryEditorNode", containerNode)[0];
+               this.queryBuilder = new QueryBuilder({
+                   management: this.management,
+                   parentModelObj: this.parent,
+                   controller: this.controller
+               }, this.queryEditorNode);
+           };
+
+           QueryTab.prototype.close = function ()
+           {
+
+           };
+
+           QueryTab.prototype.destroy = function ()
+           {
+               this.close();
+               this.contentPane.onClose();
+               this.controller.tabContainer.removeChild(this.contentPane);
+               this.contentPane.destroyRecursive();
+           };
 
-    return QueryTab;
-  });
+           return QueryTab;
+       });



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


Mime
View raw message