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/11/09 14:36:22 UTC

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

Author: orudyy
Date: Wed Nov  9 14:36:21 2016
New Revision: 1768976

URL: http://svn.apache.org/viewvc?rev=1768976&view=rev
Log:
QPID-7503: Fix query and dashboard UI

           * stop sharing of selected condition fields between multiple instances of WhereExpression widget
           * destroy Dashboard and Query tab containers on tab closing
           * show grid headers in dialog for adding of dashboard widget
           * add prompt message into dialog for adding of dashboard widget

Modified:
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/css/common.css
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html
    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/query/DropDownSelect.js
    qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/WhereExpression.js

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/css/common.css
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/css/common.css?rev=1768976&r1=1768975&r2=1768976&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/css/common.css (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/css/common.css Wed Nov  9 14:36:21 2016
@@ -380,7 +380,8 @@ div .messages {
 .infoPane
 {
     margin-left: 5px;
-    padding: 5px 5px 5px 1.2em;
+    margin-bottom: 5px;
+    padding: 5px 5px 0px 1.2em;
     font-style: italic;
     background:url("../images/notification.svg") no-repeat left center;
     background-size: 1em;

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html?rev=1768976&r1=1768975&r2=1768976&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html Wed Nov  9 14:36:21 2016
@@ -19,6 +19,7 @@
 <div style="width:50vw">
     <form data-dojo-attach-point="addWidgetForm" data-dojo-type="dijit/form/Form" id="${id}_addWidgetForm">
         <div>
+            <div class="infoPane">Please, double-click on a row to add the corresponding widget into dashboard</div>
             <div data-dojo-attach-point="queryBrowserNode"></div>
         </div>
         <div class="dijitDialogPaneActionBar">

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=1768976&r1=1768975&r2=1768976&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 Wed Nov  9 14:36:21 2016
@@ -168,12 +168,12 @@ define(["dojo/parser",
                 message: "<div>Dashbord contains unsaved changes.<br/>Would you like to close it anyway?</div>",
                 confirmationId: "dashboard.confirmation.close.changed"
             })
-                .then(lang.hitch(this, this.destroy));
+                .then(lang.hitch(this, function(){this.destroy(true);}));
 
             return false;
         };
 
-        DashboardTab.prototype.destroy = function ()
+        DashboardTab.prototype.destroy = function (destroyContentPane)
         {
             if (this.destroyed)
             {
@@ -188,6 +188,12 @@ define(["dojo/parser",
                 this.dashboardWidget.destroyRecursive();
                 this.dashboardWidget = null;
             }
+
+            if (destroyContentPane)
+            {
+                this.contentPane.getParent().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=1768976&r1=1768975&r2=1768976&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 Wed Nov  9 14:36:21 2016
@@ -164,12 +164,12 @@ define(["dojo/parser",
                 message: "<div>Query contains unsaved changes.<br/>Would you like to close it anyway?</div>",
                 confirmationId: "query.confirmation.close.changed"
             })
-                .then(lang.hitch(this, this.destroy));
+                .then(lang.hitch(this, function(){this.destroy(true);}));
 
             return false;
         };
 
-        QueryTab.prototype.destroy = function ()
+        QueryTab.prototype.destroy = function (destroyContentPane)
         {
             if (this.destroyed)
             {
@@ -184,6 +184,12 @@ define(["dojo/parser",
                 this.queryWidget.destroyRecursive();
                 this.queryWidget = null;
             }
+
+            if (destroyContentPane)
+            {
+                this.contentPane.getParent().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=1768976&r1=1768975&r2=1768976&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 Wed Nov  9 14:36:21 2016
@@ -92,7 +92,15 @@ define(["dojo/_base/declare",
                     }, this.queryBrowserNode);
                     this._queryBrowser.on("open", lang.hitch(this, this._onOpenQuery));
                 },
-
+                startup: function ()
+                {
+                    this.inherited(arguments);
+                    this._queryBrowser.startup();
+                },
+                resizeQueryBrowser: function ()
+                {
+                    this._queryBrowser.resize();
+                },
                 update: function ()
                 {
                     return this._queryBrowser.update();
@@ -171,7 +179,7 @@ define(["dojo/_base/declare",
                     this._addWidgetDialogContent.on("cancel",
                         lang.hitch(this._addWidgetDialog, this._addWidgetDialog.hide));
                     this._addWidgetDialogContent.on("add", lang.hitch(this, this._onWidgetChosen));
-
+                    this._addWidgetDialog.on("show", lang.hitch(this._addWidgetDialogContent, this._addWidgetDialogContent.resizeQueryBrowser));
                     this._saveDashboardDialogContent = new PreferenceSaveDialogContent({management: this.management});
                     this._saveDashboardDialog =
                         new dijit.Dialog({title: "Save Dashboard", content: this._saveDashboardDialogContent});

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/DropDownSelect.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/DropDownSelect.js?rev=1768976&r1=1768975&r2=1768976&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/DropDownSelect.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/DropDownSelect.js Wed Nov  9 14:36:21 2016
@@ -87,7 +87,7 @@ define(["dojo/_base/declare",
                 this._selectedItems = this._optionsPanel.get("selectedItems");
                 popup.close(this._optionsDialog);
                 this._optionsPanel.resetItems();
-                this.emit("change", this._selectedItems);
+                this.emit("change", lang.clone(this._selectedItems));
             },
             _hideAndResetSearch: function ()
             {

Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/WhereExpression.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/WhereExpression.js?rev=1768976&r1=1768975&r2=1768976&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/WhereExpression.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/WhereExpression.js Wed Nov  9 14:36:21 2016
@@ -31,12 +31,13 @@ define(["dojo/_base/declare",
     return declare("qpid.management.query.WhereExpression", [ContentPane, Evented], {
         whereExpression: "",
         whereFieldsSelector: null,
-        _whereItems: {},
+        _whereItems: null,
         userPreferences: null,
 
         postCreate: function ()
         {
             this.inherited(arguments);
+            this._whereItems = {};
             if (this.whereFieldsSelector)
             {
                 this.whereFieldsSelector.on("change", lang.hitch(this, this._whereExpressionChanged));



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