Author: orudyy
Date: Thu Aug  4 16:19:14 2016
New Revision: 1755203

URL: http://svn.apache.org/viewvc?rev=1755203&view=rev
Log:
QPID-7118: Add dashboard widget with ability to add query widgets and save

Added:
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html
      - copied, changed from r1755117, 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/DashboardWidget.html
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/QueryWidgetSettings.html
    
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/dashboard/widget/
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/widget/query.js
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceSaveDialogContent.js
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/PreferenceSaveDialogContent.html
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/index.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/query/QueryBrowserWidget.js
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/StoreUpdater.js
    
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html

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=1755203&r1=1755202&r2=1755203&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
 Thu Aug  4 16:19:14 2016
@@ -610,4 +610,22 @@ td.advancedSearchField, col.autoWidth {
     font-size: 3em;
     padding: 3em;
     text-align: center;
+}
+
+.claro .dojoxPortletIcon.preferenceAccessIcon,
+.claro .dojoxPortletIcon.preferenceAccessHoverIcon
+{
+    background: 
url("../dojo/dijit/icons/images/commonIconsObjActEnabled_rtl.png") no-repeat;
+    background-position: -240px;
+    width: 15px;
+    height: 15px;
+}
+
+.claro .dojoxPortletIcon.dashboardWidgetSettingsIcon,
+.claro .dojoxPortletIcon.dashboardWidgetSettingsHoverIcon
+{
+    background: 
url("../dojo/dijit/icons/images/commonIconsObjActEnabled_rtl.png") no-repeat;
+    background-position: -112px;
+    width: 15px;
+    height: 15px;
 }
\ No newline at end of file

Copied: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html
 (from r1755117, 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html)
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html?p2=qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html&p1=qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html&r1=1755117&r2=1755203&rev=1755203&view=diff
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html
 (original)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/AddWidgetDialogContent.html
 Thu Aug  4 16:19:14 2016
@@ -15,16 +15,18 @@
   ~ KIND, either express or implied.  See the License for the
   ~ specific language governing permissions and limitations
   ~ under the License.
-  ~
   -->
-
-<div>
-
-    <div data-dojo-type="dijit/Toolbar" class="alignRight">
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="all" name="filter" checked="true" value="all" 
id="all"/><label for="all">All</label>
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="myQueries" name="filter" value="myQueries" 
id="myQueries"/><label for="myQueries">My Queries</label>
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="sharedWithMe" name="filter" value="sharedWithMe" 
id="sharedWithMe"/><label for="sharedWithMe">Shared with me</label>
-    </div>
-    <div class="clear"/>
-    <div class="includeNoDataWarning" 
data-dojo-attach-point="queryBrowserGridNode"/>
+<div style="width:50vw">
+    <form data-dojo-attach-point="addWidgetForm" 
data-dojo-type="dijit/form/Form" id="${id}_addWidgetForm">
+        <div>
+            <div data-dojo-attach-point="queryBrowserNode"></div>
+        </div>
+        <div class="dijitDialogPaneActionBar">
+            <input id="${id}_cancelButton"
+                   data-dojo-attach-point="cancelButton"
+                   data-dojo-type="dijit/form/Button"
+                   type="button"
+                   label="Cancel"/>
+        </div>
+    </form>
 </div>
\ No newline at end of file

Added: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/DashboardWidget.html
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/DashboardWidget.html?rev=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/DashboardWidget.html
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/DashboardWidget.html
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,53 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<div>
+    <div data-dojo-type="dijit/Toolbar">
+        <div id="saveButton_${id}"
+             data-dojo-type="dijit/form/Button"
+             data-dojo-attach-point="saveButton"
+             data-dojo-props="iconClass: 'dijitIconSave'">Save</div>
+        <div data-dojo-attach-point="saveButtonTooltip"
+             data-dojo-type="dijit/Tooltip"
+             
data-dojo-props="connectId:'saveButton_${id}',position:['below']">Save and 
share dashboard</div>
+        <div id="cloneButton_${id}"
+             data-dojo-type="dijit/form/Button"
+             data-dojo-attach-point="cloneButton"
+             data-dojo-props="iconClass: 'dijitIconCopy'">Clone</div>
+        <div data-dojo-attach-point="cloneButtonTooltip"
+             data-dojo-type="dijit/Tooltip"
+             
data-dojo-props="connectId:'cloneButton_${id}',position:['below']">Clone 
dashboard to create a new one<br/>Note, group information is not cloned into 
new dashboard.</div>
+        <div id="deleteButton_${id}"
+             data-dojo-type="dijit/form/Button"
+             data-dojo-attach-point="deleteButton"
+             data-dojo-props="iconClass: 'trashIcon ui-icon'">Delete</div>
+        <div data-dojo-attach-point="deleteButtonTooltip"
+             data-dojo-type="dijit/Tooltip"
+             
data-dojo-props="connectId:'deleteButton_${id}',position:['below']">Delete 
dashboard from preferences and close the tab</div>
+        <div data-dojo-type="dijit/form/Button"
+             data-dojo-attach-point="addWidgetButton"
+             data-dojo-props="title:'Add new widget'"
+             class="alignRight">Add Widget</div>
+        <div class="clear"></div>
+    </div>
+
+    <div data-dojo-type="dojox.layout.GridContainerLite"
+         data-dojo-attach-point="widgetContainer">
+    </div>
+</div>
\ No newline at end of file

Added: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/QueryWidgetSettings.html
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/QueryWidgetSettings.html?rev=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/QueryWidgetSettings.html
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/dashboard/QueryWidgetSettings.html
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,66 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~
+  -->
+<div>
+    <form data-dojo-attach-point="settingsForm" 
data-dojo-type="dijit/form/Form" id="${id}_settingsForm">
+        <div class="clear">
+            <label class="formLabel-labelCell tableContainer-labelCell" 
for="${id}_refreshPeriod">Refresh
+                period:</label>
+            <input id="${id}_refreshPeriod"
+                   class="formLabel-controlCell tableContainer-valueCell"
+                   data-dojo-attach-point="refreshPeriod"
+                   data-dojo-type="dijit/form/NumberSpinner"
+                   data-dojo-props="
+                    name:'refreshPeriod',
+                    invalidMessage: 'Invalid value',
+                    required: false,
+                    smallDelta: 1,
+                    value: 5,
+                    constraints: {min: 5, max: 65535, places: 0}"/>
+        </div>
+        <div class="clear">
+            <label class="formLabel-labelCell tableContainer-labelCell" 
for="${id}_limit">Row limit:</label>
+            <input id="${id}_limit"
+                   class="formLabel-controlCell tableContainer-valueCell"
+                   data-dojo-attach-point="limit"
+                   data-dojo-type="dijit/form/NumberSpinner"
+                   data-dojo-props="
+                    name:'limit',
+                    invalidMessage: 'Invalid value',
+                    required: false,
+                    smallDelta: 1,
+                    value: 10,
+                    constraints: {min:1, max: 100000, places: 0}"/>
+        </div>
+        <div class="clear"></div>
+
+        <div class="dijitDialogPaneActionBar">
+            <input id="${id}_cancelButton"
+                   data-dojo-attach-point="cancelButton"
+                   data-dojo-type="dijit/form/Button"
+                   type="button"
+                   label="Cancel"/>
+            <input id="${id}_saveButton"
+                   data-dojo-attach-point="saveButton"
+                   data-dojo-type="dijit/form/Button"
+                   type="submit"
+                   label="Save"/>
+        </div>
+    </form>
+</div>
\ No newline at end of file

Modified: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/index.html
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/index.html?rev=1755203&r1=1755202&r2=1755203&view=diff
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/index.html
 (original)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/index.html
 Thu Aug  4 16:19:14 2016
@@ -31,6 +31,9 @@
     <link rel="stylesheet" href="dojo/dgrid/css/dgrid.css"/>
     <link rel="stylesheet" href="dojo/dgrid/css/skins/claro.css"/>
     <link rel="stylesheet" href="dojo/dojo/resources/dnd.css"/>
+    <link rel="stylesheet" 
href="dojo/dojox/layout/resources/GridContainer.css"/>
+    <link rel="stylesheet" 
href="dojo/dojox/layout/resources/DndGridContainer.css"/>
+    <link rel="stylesheet" href="dojo/dojox/widget/Portlet/Portlet.css">
     <link rel="stylesheet" href="css/common.css" media="screen"/>
     <script>
         function getContextPath()

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=1755203&r1=1755202&r2=1755203&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
 Thu Aug  4 16:19:14 2016
@@ -25,6 +25,7 @@ define(["dojo/parser",
         "dojo/json",
         "qpid/common/util",
         "dojo/text!showDashboardTab.html",
+        "qpid/management/dashboard/DashboardWidget",
         "dojo/domReady!"],
     function (parser, lang, all, Deferred, query, json, util, template)
     {
@@ -103,6 +104,14 @@ define(["dojo/parser",
         DashboardTab.prototype.onOpen = function (containerNode)
         {
             this.dashboardWidgetNode = query(".dashboardWidgetNode", 
containerNode)[0];
+
+            this.dashboardWidget = new 
qpid.management.dashboard.DashboardWidget({
+                management: this.management,
+                parentObject: this.parent,
+                preference: this.tabData.data,
+                controller: this.controller
+            }, this.dashboardWidgetNode);
+
         };
 
         DashboardTab.prototype.close = function ()

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=1755203&r1=1755202&r2=1755203&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
 Thu Aug  4 16:19:14 2016
@@ -116,7 +116,7 @@ define(["dojo/parser",
                 preference: this.tabData.data,
                 controller: this.controller
             }, this.queryWidgetNode);
-            this.contentPane.set("title", this.getTitle());
+
             this.queryWidget.on("save", lang.hitch(this, function(e)
             {
                 this.tabData.data = e.preference;

Added: 
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=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/DashboardWidget.js
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,227 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/declare",
+        "dojo/_base/lang",
+        "dojo/json",
+        "dojo/Evented",
+        "dojo/text!dashboard/DashboardWidget.html",
+        "dojo/text!dashboard/AddWidgetDialogContent.html",
+        "dojo/text!dashboard/QueryWidgetSettings.html",
+        "qpid/management/query/QueryBrowserWidget",
+        "qpid/management/preference/PreferenceSaveDialogContent",
+        "dojox/uuid/generateRandomUuid",
+        "dojox/layout/GridContainerLite",
+        "dijit/_WidgetBase",
+        "dijit/_TemplatedMixin",
+        "dijit/_WidgetsInTemplateMixin",
+        "dijit/form/Button",
+        "dijit/Toolbar",
+        "dijit/Dialog"],
+    function (declare,
+              lang,
+              json,
+              Evented,
+              template,
+              addWidgetDialogContentTemplate,
+              queryWidgetSettingsTemplate,
+              QueryBrowserWidget,
+              PreferenceSaveDialogContent,
+              generateRandomUuid
+    )
+    {
+
+        var AddWidgetDialogContent = 
declare("qpid.management.dashboard.AddWidgetDialogContent",
+            [dijit._WidgetBase, dijit._TemplatedMixin, 
dijit._WidgetsInTemplateMixin, Evented],
+            {
+                //Strip out the apache comment header from the template html 
as comments unsupported.
+                templateString: 
addWidgetDialogContentTemplate.replace(/<!--[\s\S]*?-->/g, ""),
+
+                // template fields
+                cancelButton: null,
+                queryBrowserNode: null,
+
+                // constructor mixed-in fields
+                structure: null,
+                management: null,
+                preferenceRoot: null,
+
+                // inner fields
+                _queryBrowser: null,
+
+                postCreate: function ()
+                {
+                    this.inherited(arguments);
+                    this.cancelButton.on("click", lang.hitch(this, function ()
+                    {
+                        this.emit("cancel");
+                    }));
+                    this._queryBrowser = new QueryBrowserWidget({
+                        structure: this.structure,
+                        management: this.management,
+                        preferenceRoot: this.preferenceRoot
+                    }, this.queryBrowserNode);
+                    this._queryBrowser.on("openQuery", lang.hitch(this, 
this._onOpenQuery));
+                },
+
+                update: function ()
+                {
+                    return this._queryBrowser.update();
+                },
+                _onOpenQuery: function(event)
+                {
+                    var chosenWidget = {
+                        type: "query",
+                        preference: event.preference,
+                        parentObject: event.parentObject
+                    };
+
+                    this.emit("add", {widget: chosenWidget});
+                }
+            });
+
+        return declare("qpid.management.dashboard.DashboardWidget",
+            [dijit._WidgetBase, dijit._TemplatedMixin, 
dijit._WidgetsInTemplateMixin, Evented],
+            {
+                //Strip out the apache comment header from the template html 
as comments unsupported.
+                templateString: template.replace(/<!--[\s\S]*?-->/g, ""),
+
+                // template fields
+                saveButton: null,
+                cloneButton: null,
+                deleteButton: null,
+                addWidgetButton: null,
+                widgetContainer: null,
+
+                // constructor mixed in fields
+                parentObject: null,
+                preference: null,
+                controller: null,
+                management: null,
+
+                // inner fields
+                _addWidgetDialog: null,
+                _addWidgetDialogContent: null,
+
+                postCreate: function ()
+                {
+                    this.inherited(arguments);
+                    this.deleteButton.set("disabled", true);
+                    this.saveButton.on("click", lang.hitch(this, 
this._onSaveButton));
+                    this.cloneButton.on("click", lang.hitch(this, 
this._onCloneButton));
+                    this.deleteButton.on("click", lang.hitch(this, 
this._onDeleteButton));
+                    this.addWidgetButton.on("click", lang.hitch(this, 
this._onAddWidget));
+                    this._addWidgetDialogContent =
+                        new AddWidgetDialogContent({
+                            structure: this.controller.structure,
+                            management: this.management,
+                            preferenceRoot: this.parentObject
+                        });
+                    this._addWidgetDialog =
+                        new dijit.Dialog({title: "Add Widget", content: 
this._addWidgetDialogContent});
+                    this._addWidgetDialogContent.on("cancel",
+                        lang.hitch(this._addWidgetDialog, 
this._addWidgetDialog.hide));
+                    this._addWidgetDialogContent.on("add", lang.hitch(this, 
this._onWidgetChosen));
+
+                    this._saveDashboardDialogContent = new 
PreferenceSaveDialogContent({management : this.management});
+                    this._saveDashboardDialog = new dijit.Dialog({title: "Save 
Dashboard", content: this._saveDashboardDialogContent});
+                    this._saveDashboardDialogContent.on("cancel", 
lang.hitch(this._saveDashboardDialog, this._saveDashboardDialog.hide));
+                    this._saveDashboardDialogContent.on("save", 
lang.hitch(this, this._onPreferenceSave));
+
+                    this.preference.type = "X-Dashboard";
+                    if (!this.preference.value || 
!this.preference.value.widgets)
+                    {
+                        this.preference.value = {widgets:{}};
+                    }
+                },
+                _onSaveButton: function ()
+                {
+                    this._saveDashboardDialogContent.set("preference", 
this.preference);
+                    this._saveDashboardDialog.show();
+                },
+                _onCloneButton: function ()
+                {
+                    this.emit("clone", {parentObject: this.parentObject});
+                },
+                _onDeleteButton: function ()
+                {
+                    this.emit("delete", {preference: 
this.getDashboardPreference(), parentObject: this.parentObject});
+                },
+                _onPreferenceSave: function (event)
+                {
+                    var preference = event.preference;
+                    this.management.savePreference(this.parentObject, 
preference)
+                        .then(lang.hitch(this, function ()
+                        {
+                            this._saveDashboardDialog.hide();
+                        }));
+                },
+                _onAddWidget: function ()
+                {
+                    
this._addWidgetDialogContent.update().then(lang.hitch(this._addWidgetDialog, 
this._addWidgetDialog.show));
+                },
+                _onWidgetChosen: function (event)
+                {
+                    this._addWidgetDialog.hide();
+                    this._createWidget( event.widget);
+                },
+                _createWidget: function (widgetSettings)
+                {
+                    require(["qpid/management/dashboard/widget/" + 
widgetSettings.type.toLowerCase()],
+                        lang.hitch(this, function (Widget)
+                        {
+                            var widget = new Widget({
+                                widgetSettings: {},
+                                controller: this.controller,
+                                management: this.management,
+                                preference: widgetSettings.preference,
+                                parentObject: widgetSettings.parentObject
+                            });
+                            widget.id = generateRandomUuid();
+                            var portletPromise = widget.createPortlet();
+                            portletPromise.then(lang.hitch(this, function 
(portlet)
+                            {
+                                this.widgetContainer.addChild(portlet);
+                                portlet.startup();
+                                widget.on("close", lang.hitch(this, function ()
+                                {
+                                    this.widgetContainer.removeChild(portlet);
+                                    delete 
this.preference.value.widgets[widget.id];
+                                    widget.destroy();
+                                }));
+
+                                widget.on("change", lang.hitch(this, function 
()
+                                {
+                                    this.preference.value.widgets[widget.id] = 
 widget.getSettings();
+                                    this._dashboardChanged();
+                                }));
+
+                                this.preference.value.widgets[widget.id] =  
widget.getSettings();
+                                this._dashboardChanged();
+
+                            }), this.management.errorHandler);
+                        }));
+                },
+                _dashboardChanged: function ()
+                {
+                    this.emit("change", {preference: this.preference});
+                }
+            });
+    });
\ No newline at end of file

Added: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/widget/query.js
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/widget/query.js?rev=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/widget/query.js
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/dashboard/widget/query.js
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,288 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/declare",
+        "dojo/_base/lang",
+        "dojo/json",
+        "dojo/Deferred",
+        "dojo/Evented",
+        "dojo/text!dashboard/QueryWidgetSettings.html",
+        "qpid/management/query/QueryGrid",
+        "qpid/common/util",
+        "dojox/html/entities",
+        "dojox/widget/Portlet",
+        "dojox/widget/PortletDialogSettings",
+        "dijit/_WidgetBase",
+        "dijit/_TemplatedMixin",
+        "dijit/_WidgetsInTemplateMixin",
+        "dijit/form/Button",
+        "dijit/Toolbar",
+        "dijit/Dialog"],
+    function (declare,
+              lang,
+              json,
+              Deferred,
+              Evented,
+              queryWidgetSettingsTemplate,
+              QueryGrid,
+              util,
+              entities,
+              Portlet,
+              PortletDialogSettings)
+    {
+
+        var QueryWidgetSettings = 
declare("qpid.management.dashboard.QueryWidgetSettings",
+            [dijit._WidgetBase, dijit._TemplatedMixin, 
dijit._WidgetsInTemplateMixin, Evented],
+            {
+                //Strip out the apache comment header from the template html 
as comments unsupported.
+                templateString: 
queryWidgetSettingsTemplate.replace(/<!--[\s\S]*?-->/g, ""),
+
+                // template fields
+                cancelButton: null,
+                saveButton: null,
+                refreshPeriod: null,
+                limit: null,
+                settingsForm: null,
+
+                postCreate: function ()
+                {
+                    this.inherited(arguments);
+                    this.cancelButton.on("click", lang.hitch(this, function ()
+                    {
+                        this.emit("cancel");
+                    }));
+                    this.settingsForm.on("submit", lang.hitch(this, function ()
+                    {
+                        if (this.settingsForm.validate())
+                        {
+                            var settings = {
+                                limit: this.limit.get("value"),
+                                refreshPeriod: this.refreshPeriod.get("value")
+                            };
+                            this.emit("save", {settings: settings});
+                        }
+                        else
+                        {
+                            alert('Form contains invalid data.  Please correct 
first');
+                        }
+                        return false;
+                    }));
+                    this.refreshPeriod.on("change", lang.hitch(this, 
this._onChange));
+                    this.limit.on("change", lang.hitch(this, this._onChange));
+                },
+                _onChange: function ()
+                {
+                    this.saveButton.set("disabled", 
!this.settingsForm.validate());
+                },
+                _setLimitAttr: function (value)
+                {
+                    this.limit.set("value", value)
+                },
+                _setRefreshPeriodAttr: function (value)
+                {
+                    this.refreshPeriod.set("value", value)
+                }
+            });
+
+        return declare(Evented, {
+            _timer : null,
+            portlet : null,
+
+            constructor: function (kwargs)
+            {
+                this.preference = kwargs.preference;
+                this.controller = kwargs.controller;
+                this.management = kwargs.management;
+                this.parentObject = kwargs.parentObject;
+                var widgetSettings = kwargs.widgetSettings;
+                this.limit = 10;
+                if (widgetSettings
+                    && widgetSettings.preference
+                    && widgetSettings.preference.configuration
+                    && widgetSettings.preference.configuration.limit)
+                {
+                    this.limit = widgetSettings.preference.configuration.limit;
+                }
+                this.refreshPeriod = widgetSettings && 
widgetSettings.refreshPeriod ? widgetSettings.refreshPeriod : 10;
+                this.hidden = !!(widgetSettings && widgetSettings.hidden);
+            },
+            createPortlet: function ()
+            {
+                var preference = this.preference;
+                var query = {
+                    category: preference.value.category,
+                    select: preference.value.select,
+                    where: "1=2"
+                };
+
+                var deferred = new Deferred();
+
+                var queryPreflightRequestPromise = 
this.management.query(query);
+                queryPreflightRequestPromise.then(lang.hitch(this, function 
(preflightResults)
+                {
+                    var headers = lang.clone(preflightResults.headers);
+                    var columns = [];
+                    for (var i = 0; i < headers.length; i++)
+                    {
+                        columns.push({
+                            field: i,
+                            label: headers[i],
+                            sortable: false
+                        });
+                    }
+
+                    var queryGrid = new QueryGrid({
+                        detectChanges: true,
+                        rowsPerPage: this.limit,
+                        management: this.management,
+                        parentObject: this.parentObject,
+                        category: preference.value.category,
+                        selectClause: preference.value.select + ",id",
+                        orderBy: preference.value.orderBy,
+                        where: preference.value.where,
+                        pageSizeOptions: [],
+                        previousNextArrows: false,
+                        pagingLinks: 0,
+                        columns: columns,
+                        idProperty: columns.length
+                    });
+
+                    queryGrid.on('rowBrowsed', lang.hitch(this, function 
(event)
+                    {
+                        this.controller.showById(event.id);
+                    }));
+
+                    var portlet = new Portlet({
+                        dndType: 'Portlet',
+                        title: preference.name,
+                        content: queryGrid,
+                        open: !this.hidden,
+                        onClose: lang.hitch(this, function ()
+                        {
+                            if (confirm("Are you sure you want to remove query 
widget '"
+                                        + entities.encode(new 
String(preference.name)) + "'?"))
+                            {
+                                this.emit("close");
+                            }
+                        })
+                    });
+                    //TODO: on hover a tooltip or hint can be displayed
+                    portlet.editQueryIcon = 
portlet._createIcon("preferenceAccessIcon",
+                        "preferenceAccessHoverIcon",
+                        lang.hitch(this, function ()
+                        {
+                            var tabData = {
+                                tabType: "query",
+                                modelObject: this.parentObject,
+                                data: preference,
+                                preferenceId: preference.id
+                            };
+                            this.controller.showTab(tabData);
+                        }));
+
+                    var settings = new QueryWidgetSettings();
+                    settings.set("limit", this.limit);
+                    settings.set("refreshPeriod", this.refreshPeriod);
+
+                    // TODO: remove hardcoded sizes
+                    var settingsDialog = new PortletDialogSettings({
+                        content: settings,
+                        dimensions: [540, 130],
+                        portletIconClass: "dashboardWidgetSettingsIcon",
+                        portletIconHoverClass: 
"dashboardWidgetSettingsHoverIcon",
+                        title: "Widget settings - " + preference.name
+                    });
+                    settings.on("save", lang.hitch(this, function (event)
+                    {
+                        var settings = event.settings;
+                        var emitChange = this.limit !== settings.limit || 
this.refreshPeriod !== settings.refreshPeriod;
+                        this.limit = settings.limit;
+                        this.refreshPeriod = settings.refreshPeriod;
+                        this._clearTimer();
+                        this._timer = setInterval(updateQuery, 
this.refreshPeriod  * 1000);
+                        queryGrid.set("rowsPerPage", this.limit);
+                        settingsDialog.toggle();
+                        if (emitChange)
+                        {
+                            this.emit("change");
+                        }
+                    }));
+
+                    settings.on("cancel", lang.hitch(settingsDialog, 
settingsDialog.toggle));
+
+                    portlet.addChild(settingsDialog);
+                    portlet.on("hide", lang.hitch(this, function(){
+                        this.hidden = true;
+                        this.emit("change");
+                    }));
+                    portlet.on("show", lang.hitch(this, function(){
+                        this.hidden = false;
+                        this.emit("change");
+                    }));
+
+                    var updateQuery = function ()
+                    {
+                        queryGrid.updateData();
+                    };
+                    this._timer = setInterval(updateQuery, this.refreshPeriod  
* 1000);
+
+                    this.portlet = portlet;
+                    deferred.resolve(portlet);
+
+                }), function (error)
+                {
+                    deferred.cancel(error);
+                });
+
+                return deferred.promise;
+            },
+            destroy : function ()
+            {
+                if (this.portlet)
+                {
+                    this.portlet.destroyRecursive();
+                }
+                this._clearTimer();
+
+            },
+            getSettings: function ()
+            {
+                return {
+                    type: "query",
+                    refreshPeriod: this.refreshPeriod,
+                    hidden: this.hidden,
+                    preference: {
+                        id: this.preference.id,
+                        configuration: {
+                            limit: this.limit
+                        }
+                    }
+                };
+            },
+            _clearTimer: function ()
+            {
+                if (this._timer)
+                {
+                    clearInterval(this._timer);
+                    this._timer = null;
+                }
+            }
+        });
+
+    });
\ No newline at end of file

Added: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceSaveDialogContent.js
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceSaveDialogContent.js?rev=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceSaveDialogContent.js
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/preference/PreferenceSaveDialogContent.js
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,156 @@
+/*
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+define(["dojo/_base/declare",
+        "dojo/_base/lang",
+        "dojo/json",
+        "dojo/Evented",
+        "dojo/text!preference/PreferenceSaveDialogContent.html",
+        "dijit/_WidgetBase",
+        "dijit/_TemplatedMixin",
+        "dijit/_WidgetsInTemplateMixin",
+        "dijit/form/Button",
+        "dijit/form/ValidationTextBox",
+        "dijit/form/SimpleTextarea"],
+    function (declare,
+              lang,
+              json,
+              Evented,
+              template)
+    {
+        return declare([dijit._WidgetBase, dijit._TemplatedMixin, 
dijit._WidgetsInTemplateMixin, Evented],
+            {
+                /**
+                 * dijit._TemplatedMixin enforced fields
+                 */
+                //Strip out the apache comment header from the template html 
as comments unsupported.
+                templateString: template.replace(/<!--[\s\S]*?-->/g, ""),
+
+                /**
+                 * template attach points
+                 */
+                name: null,
+                description: null,
+                groupChooser: null,
+                saveButton: null,
+                cancelButton: null,
+                form: null,
+
+                /**
+                 * constructor mixin
+                 */
+                management : null,
+
+                postCreate: function ()
+                {
+                    this.inherited(arguments);
+                    this._postCreate();
+                },
+                startup: function ()
+                {
+                    this.inherited(arguments);
+                    this.groupChooser.startup();
+                },
+                _setPreferenceAttr: function (preference)
+                {
+                    this.preference = lang.clone(preference);
+                    this.name.set("value", this.preference.name);
+                    this.description.set("value", this.preference.description);
+
+                    var userGroups = this.management.getGroups();
+                    var selected = this.preference.visibilityList || [];
+                    for (var i = selected.length - 1; i >= 0; i--)
+                    {
+                        var present = false;
+                        for (var j = 0; j < userGroups.length; j++)
+                        {
+                            if (selected[i] === userGroups[j].name)
+                            {
+                                present = true;
+                                break;
+                            }
+                        }
+                        if (!present)
+                        {
+                            selected.splice(i, 1);
+                        }
+                    }
+                    var items = [];
+                    for (var j = 0; j < userGroups.length; j++)
+                    {
+                        items[j] = {
+                            id: userGroups[j].name,
+                            name: userGroups[j].name
+                        };
+                    }
+                    this.groupChooser.set("data",
+                        {
+                            items: items,
+                            selected: selected
+                        });
+                    this._onChange();
+                },
+                _postCreate: function ()
+                {
+                    this.cancelButton.on("click", lang.hitch(this, 
this._onCancel));
+                    this.name.on("change", lang.hitch(this, this._onChange));
+                    this.form.on("submit", lang.hitch(this, 
this._onFormSubmit))
+                },
+                _onCancel: function (data)
+                {
+                    this.emit("cancel");
+                },
+                _onChange: function (e)
+                {
+                    var invalid = !this.form.validate();
+                    this.saveButton.set("disabled", invalid);
+                },
+                _onFormSubmit: function (e)
+                {
+                    try
+                    {
+                        if (this.form.validate())
+                        {
+                            var preference = this.preference;
+                            preference.name = this.name.get("value");
+                            preference.description = 
this.description.get("value");
+                            var groups = [];
+                            var selected = 
this.groupChooser.get("selectedItems");
+                            for (var i = 0; i < selected.length; i++)
+                            {
+                                groups.push(selected[i].name);
+                            }
+                            preference.visibilityList = groups;
+                            this.emit("save", {preference: preference});
+                        }
+                        else
+                        {
+                            alert('Form contains invalid data.  Please correct 
first');
+                        }
+                    }
+                    finally
+                    {
+                        return false;
+                    }
+                }
+            });
+    });
+
+

Modified: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/QueryBrowserWidget.js
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/QueryBrowserWidget.js?rev=1755203&r1=1755202&r2=1755203&view=diff
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/QueryBrowserWidget.js
 (original)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/QueryBrowserWidget.js
 Thu Aug  4 16:19:14 2016
@@ -75,16 +75,44 @@ define(["dojo/_base/declare",
                 filter: "all",
                 fetch: function ()
                 {
-                    var brokerPreferencesPromise = 
this.management.getVisiblePreferences({type: "broker"}, "query");
-                    var virtualHostsPreferencesPromise = 
this.management.getVisiblePreferences({
-                        type: "virtualhost",
-                        name: "*",
-                        parent: {
-                            type: "virtualhostnode",
+                    var brokerPreferencesPromise = null;
+                    var virtualHostsPreferencesPromise = null;
+                    if (this.preferenceRoot && this.preferenceRoot.type !== 
"broker")
+                    {
+                        var query = 
this.management.getVisiblePreferences(this.preferenceRoot, "query");
+                        var brokerDeferred = new Deferred();
+                        brokerPreferencesPromise = brokerDeferred.promise;
+                        brokerDeferred.resolve(null);
+
+                        var virtualHostDeferred = new Deferred();
+                        virtualHostsPreferencesPromise = 
virtualHostDeferred.promise;
+                        query.then(function (data)
+                            {
+                                virtualHostDeferred.resolve([data]);
+                            },
+                            function (error)
+                            {
+                                virtualHostDeferred.cancel(error);
+                            });
+                    }
+                    else
+                    {
+                        brokerPreferencesPromise = 
this.management.getVisiblePreferences({type: "broker"}, "query");
+                        virtualHostsPreferencesPromise = 
this.management.getVisiblePreferences({
+                            type: "virtualhost",
                             name: "*",
-                            parent: {type: "broker"}
-                        }
-                    }, "query");
+                            parent: {
+                                type: "virtualhostnode",
+                                name: "*",
+                                parent: {type: "broker"}
+                            }
+                        }, "query");
+                    }
+
+                    var resultPromise = all({
+                        brokerPreferences: brokerPreferencesPromise,
+                        virtualHostsPreferences: virtualHostsPreferencesPromise
+                    });
 
                     var deferred = new Deferred();
 
@@ -102,11 +130,7 @@ define(["dojo/_base/declare",
                         deferred.resolve([]);
                     });
 
-                    all({
-                        brokerPreferences: brokerPreferencesPromise,
-                        virtualHostsPreferences: virtualHostsPreferencesPromise
-                    })
-                        .then(successHandler, failureHandler);
+                    resultPromise.then(successHandler, failureHandler);
 
                     return new QueryResults(deferred.promise, {
                         totalLength: deferred.promise.then(function (data)
@@ -139,6 +163,7 @@ define(["dojo/_base/declare",
                 // passed automatically by constructor
                 manangement: null,
                 structure: null,
+                preferenceRoot: null,
 
                 // internal
                 _preferenceStore: null,
@@ -196,6 +221,10 @@ define(["dojo/_base/declare",
                         highlightRow: function ()
                         {
                             // Suppress row highlighting
+                        },
+                        shouldExpand: function ()
+                        {
+                            return true;
                         }
                     }, this.queryBrowserGridNode);
 
@@ -218,7 +247,7 @@ define(["dojo/_base/declare",
                 },
                 update: function ()
                 {
-                    this._preferenceStore.update();
+                    return this._preferenceStore.update();
                 },
                 _createPreferencesStore: function (targetStore)
                 {
@@ -227,7 +256,8 @@ define(["dojo/_base/declare",
                         targetStore: targetStore,
                         management: this.management,
                         structure: this.structure,
-                        transformer: lang.hitch(this, 
this._preferencesTransformer)
+                        transformer: lang.hitch(this, 
this._preferencesTransformer),
+                        preferenceRoot: this.preferenceRoot
                     });
                     return preferencesStore;
                 },

Modified: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/StoreUpdater.js
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/StoreUpdater.js?rev=1755203&r1=1755202&r2=1755203&view=diff
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/StoreUpdater.js
 (original)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/query/StoreUpdater.js
 Thu Aug  4 16:19:14 2016
@@ -78,7 +78,7 @@ define(["dojo/_base/declare",
                     if (!this._updating)
                     {
                         this._updating = true;
-                        this.fetch();
+                        return this.fetch();
                     }
                 },
                 updateRange: function ()
@@ -87,7 +87,7 @@ define(["dojo/_base/declare",
                     if (!this._updating && args)
                     {
                         this._updating = true;
-                        this.fetchRange(args);
+                        return this.fetchRange(args);
                     }
                 },
                 _captureResults: function (queryResults, methodName, args)

Added: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/PreferenceSaveDialogContent.html
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/PreferenceSaveDialogContent.html?rev=1755203&view=auto
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/PreferenceSaveDialogContent.html
 (added)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/preference/PreferenceSaveDialogContent.html
 Thu Aug  4 16:19:14 2016
@@ -0,0 +1,76 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  ~
+  -->
+<div>
+    <form data-dojo-attach-point="form" data-dojo-type="dijit/form/Form" 
id="${id}_form">
+        <div>
+            <div class="clear">
+                <label class="formLabel-labelCell tableContainer-labelCell" 
for="${id}_name">Name*: </label>
+                <input id="${id}_name" type="text"
+                       class="formLabel-controlCell tableContainer-valueCell"
+                       data-dojo-attach-point="name"
+                       data-dojo-type="dijit/form/ValidationTextBox"
+                       data-dojo-props="   name: 'name',
+                                        required: true,
+                                        intermediateChanges: true,
+                                        placeHolder: 'Name',
+                                        title: 'Enter name'">
+                </input>
+            </div>
+            <div class="clear">
+                <label class="formLabel-labelCell tableContainer-labelCell" 
for="${id}_description">Description: </label>
+                <div class="formLabel-controlCell tableContainer-valueCell">
+                <textarea id="${id}_description"
+                          data-dojo-attach-point="description"
+                          data-dojo-type="dijit/form/SimpleTextarea"
+                          data-dojo-props="  name: 'description',
+                                             rows: 4,
+                                             intermediateChanges: true,
+                                             placeHolder: 'description',
+                                             title: 'Enter description',
+                                             promptMessage: 'Enter 
description'"></textarea>
+                </div>
+            </div>
+            <div class="clear"></div>
+            <div class="clear">
+                <label class="formLabel-labelCell tableContainer-labelCell" 
for="${id}_groups">Shared with: </label>
+                <div  class="formLabel-controlCell tableContainer-valueCell">
+
+                    <div id="${id}_groups"
+                         data-dojo-attach-point="groupChooser"
+                         data-dojo-type="qpid/management/query/OptionsPanel"
+                         data-dojo-props="  name: 'groups',
+                                         title: 'Select groups to share with',
+                                         promptMessage: 'Select groups to 
share with'"> </div>
+                </div>
+            </div>
+        </div>
+        <div class="dijitDialogPaneActionBar">
+            <input id="${id}_cancelButton"
+                   data-dojo-attach-point="cancelButton"
+                   data-dojo-type="dijit/form/Button"
+                   type="button"
+                   label="Cancel"/>
+            <input id="${id}_saveButton"
+                   data-dojo-attach-point="saveButton"
+                   data-dojo-type="dijit/form/Button"
+                   type="submit" label="Save"/>
+        </div>
+    </form>
+</div>
\ No newline at end of file

Modified: 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html?rev=1755203&r1=1755202&r2=1755203&view=diff
==============================================================================
--- 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html
 (original)
+++ 
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/query/QueryBrowserWidget.html
 Thu Aug  4 16:19:14 2016
@@ -21,9 +21,12 @@
 <div>
 
     <div data-dojo-type="dijit/Toolbar" class="alignRight">
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="all" name="filter" checked="true" value="all" 
id="all"/><label for="all">All</label>
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="myQueries" name="filter" value="myQueries" 
id="myQueries"/><label for="myQueries">My Queries</label>
-        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="sharedWithMe" name="filter" value="sharedWithMe" 
id="sharedWithMe"/><label for="sharedWithMe">Shared with me</label>
+        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="all" name="filter"
+               checked="true" value="all" id="${id}_all"/><label 
for="${id}_all">All</label>
+        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="myQueries" name="filter"
+               value="myQueries" id="${id}_myQueries"/><label 
for="${id}_myQueries">My Queries</label>
+        <input type="radio" data-dojo-type="dijit/form/RadioButton" 
data-dojo-attach-point="sharedWithMe" name="filter"
+               value="sharedWithMe" id="${id}_sharedWithMe"/><label 
for="${id}_sharedWithMe">Shared with me</label>
     </div>
     <div class="clear"/>
     <div class="includeNoDataWarning" 
data-dojo-attach-point="queryBrowserGridNode"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to