You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by or...@apache.org on 2016/09/02 14:46:03 UTC

svn commit: r1758967 - in /qpid/java/trunk/broker-plugins/management-http/src/main/java/resources: js/qpid/management/ js/qpid/management/dashboard/ js/qpid/management/preference/ query/

Author: orudyy
Date: Fri Sep  2 14:46:02 2016
New Revision: 1758967

URL: http://svn.apache.org/viewvc?rev=1758967&view=rev
Log:
QPID-7413: [Java Broker, WMC] Address review comments

           Fix tooltip text for query scope
           Optimize rendering of groups and owner in PreferenceBrowser
           Stop leaking resources from dashboard UI
           Avoid premature deletion of dashboard and query content panes from TabContainer

Modified:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/DashboardTab.js
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/QueryTab.js
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceBrowserWidget.js
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryCreateDialogForm.html

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/DashboardTab.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/DashboardTab.js?rev=1758967&r1=1758966&r2=1758967&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/DashboardTab.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/DashboardTab.js Fri Sep  2 14:46:02 2016
@@ -38,15 +38,6 @@ define(["dojo/parser",
             this.parent = kwArgs.tabData.modelObject;
             this.management = this.controller.management;
             this.changed = !this.tabData.data || !this.tabData.data.name;
-            this.confirmationDilog = new qpid.common.MessageDialog({
-                title: "Discard unsaved changed?",
-                message: "<div>Dashbord contains unsaved changes.<br/>Would you like to close it anyway?</div>"
-            });
-            this.dialogHandle = this.confirmationDilog.on("execute", lang.hitch(this, function (stopDisplaying)
-            {
-                DashboardTab.stopDisplayingConfirmation = stopDisplaying;
-                this.destroy();
-            }));
         }
 
         DashboardTab.prototype.getTitle = function ()
@@ -197,8 +188,6 @@ define(["dojo/parser",
                 this.dashboardWidget.destroyRecursive();
                 this.dashboardWidget = null;
             }
-            this.controller.tabContainer.removeChild(this.contentPane);
-            this.contentPane.destroyRecursive();
         };
 
         DashboardTab.stopDisplayingConfirmation = false;

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=1758967&r1=1758966&r2=1758967&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 Sep  2 14:46:02 2016
@@ -184,8 +184,6 @@ define(["dojo/parser",
                 this.queryWidget.destroyRecursive();
                 this.queryWidget = null;
             }
-            this.controller.tabContainer.removeChild(this.contentPane);
-            this.contentPane.destroyRecursive();
         };
 
         return QueryTab;

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js?rev=1758967&r1=1758966&r2=1758967&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js Fri Sep  2 14:46:02 2016
@@ -201,6 +201,20 @@ define(["dojo/_base/declare",
                         this._widgets[i].deactivate();
                     }
                 },
+                destroyRecursive: function (preserveDom)
+                {
+                    this.inherited(arguments);
+                    if (this._saveDashboardDialog)
+                    {
+                        this._saveDashboardDialog.destroyRecursive(preserveDom);
+                        this._saveDashboardDialog = null;
+                    }
+                    if (this._addWidgetDialog)
+                    {
+                        this._addWidgetDialog.destroyRecursive(preserveDom);
+                        this._addWidgetDialog = null;
+                    }
+                },
                 _onSaveButton: function ()
                 {
                     this._saveDashboardDialogContent.set("preference", this.preference);

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceBrowserWidget.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceBrowserWidget.js?rev=1758967&r1=1758966&r2=1758967&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceBrowserWidget.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceBrowserWidget.js Fri Sep  2 14:46:02 2016
@@ -395,11 +395,10 @@ define(["dojo/_base/declare",
                 },
                 _renderOwner: function (object, value, node)
                 {
-                    var friendlyName = value ? util.toFriendlyUserName(value) : "";
-                    node.appendChild(document.createTextNode(friendlyName));
                     if (value)
                     {
                         node.title = entities.encode(value);
+                        node.appendChild(document.createTextNode(util.toFriendlyUserName(value)));
                     }
                 },
                 _renderGroups: function (object, value, node)
@@ -407,21 +406,16 @@ define(["dojo/_base/declare",
                     var data = "";
                     if (value instanceof Array)
                     {
-                        var title = "";
+                        var groupNames = [];
+                        var friendlyGroupNames = [];
                         for (var i = 0; i < value.length; i++)
                         {
                             var group = value[i];
-                            var friendlyName = entities.encode(util.toFriendlyUserName(group));
-                            if (i > 0)
-                            {
-                                friendlyName = ", " + friendlyName;
-                                group = ",\n" + group;
-                            }
-
-                            data = data + friendlyName;
-                            title = title + group;
+                            friendlyGroupNames.push(entities.encode(util.toFriendlyUserName(group)));
+                            groupNames.push(group);
                         }
-                        node.title = entities.encode(title);
+                        node.title = entities.encode(groupNames.join(",\n"));
+                        data = friendlyGroupNames.join(", ")
                     }
                     node.appendChild(document.createTextNode(data));
                 }

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryCreateDialogForm.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryCreateDialogForm.html?rev=1758967&r1=1758966&r2=1758967&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryCreateDialogForm.html (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryCreateDialogForm.html Fri Sep  2 14:46:02 2016
@@ -26,12 +26,12 @@
                         data-dojo-attach-point="scope"
                         data-dojo-type='dijit/form/FilteringSelect'
                         data-dojo-props="name: 'scope', placeHolder: 'Query scope', required: true, intermediateChanges: true"
-                        title="Determines where query is stored and where to query for the objects.
+                        title="Determines where the query is stored and where to query for the objects.
 If Broker is selected then any entity within the Broker can be queried.
 If Virtual Host is selected then only entities on the selected Virtual Host can be queried.
 Queries associated with a Virtual Host will be replicated across HA nodes.
 Queries can be added to the dashboards having the same associated object."
-                        promptMessage="Determines where query is stored and where to query for the objects.
+                        promptMessage="Determines where the query is stored and where to query for the objects.
 If Broker is selected then any entity within the Broker can be queried.
 If Virtual Host is selected then only entities on the selected Virtual Host can be queried.
 Queries associated with a Virtual Host will be replicated across HA nodes.



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