diff options
| author | Alex Rudyy <orudyy@apache.org> | 2014-08-11 16:27:38 +0000 |
|---|---|---|
| committer | Alex Rudyy <orudyy@apache.org> | 2014-08-11 16:27:38 +0000 |
| commit | 19d06780b7d15bd68d7f451ede011adf40cbf381 (patch) | |
| tree | 97db97b883f06dc83413d207c8f59a65a277729a /qpid/java/broker-plugins | |
| parent | 5eec7a22a5cc56f0460ca311493cd9efed30357b (diff) | |
| download | qpid-python-19d06780b7d15bd68d7f451ede011adf40cbf381.tar.gz | |
QPID-5987: [Java Broker] Make VHN/VH grid consistent with other grids on broker tab in web management console
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1617324 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
| -rw-r--r-- | qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js index 8cc3e76b58..fd30446d2b 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js +++ b/qpid/java/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js @@ -339,7 +339,7 @@ define(["dojo/_base/xhr", var gridProperties = { height: 400, - selectionMode: "single", + selectionMode: "extended", plugins: { pagination: { pageSizes: [10, 25, 50, 100], @@ -373,20 +373,27 @@ define(["dojo/_base/xhr", formatter: function(item){ return item && item.virtualhosts? item.virtualhosts[0].type: "N/A"; } - }, - { name: "Connections", field: "_item", width: "10%", + }, + { name: "Connections", field: "_item", width: "8%", formatter: function(item){ - return item && item.virtualhosts? item.virtualhosts[0].statistics.connectionCount: 0; + return item && item.virtualhosts? item.virtualhosts[0].statistics.connectionCount: "N/A"; } }, - { name: "Queues", field: "_item", width: "10%", + { name: "Queues", field: "_item", width: "8%", formatter: function(item){ - return item && item.virtualhosts? item.virtualhosts[0].statistics.queueCount: 0; + return item && item.virtualhosts? item.virtualhosts[0].statistics.queueCount: "N/A"; } }, - { name: "Exchanges", field: "_item", width: "10%", + { name: "Exchanges", field: "_item", width: "8%", formatter: function(item){ - return item && item.virtualhosts? item.virtualhosts[0].statistics.exchangeCount: 0; + return item && item.virtualhosts? item.virtualhosts[0].statistics.exchangeCount: "N/A"; + } + }, + { + name: "Default", field: "_item", width: "6%", + formatter: function(item){ + var val = item && item.virtualhosts? item.virtualhosts[0].name: null; + return "<input type='radio' disabled='disabled' "+(val == that.brokerData.defaultVirtualHost ? "checked='checked'": "")+" />"; } } ], function(obj) { @@ -424,6 +431,7 @@ define(["dojo/_base/xhr", if (data.length == 1) { that.showVirtualHost(data[0], brokerObj); + that.vhostsGrid.grid.selection.clear(); } }); @@ -434,6 +442,7 @@ define(["dojo/_base/xhr", { var item = data[0]; that.controller.show("virtualhostnode", item.name, brokerObj, item.id); + that.vhostsGrid.grid.selection.clear(); } } ); @@ -457,6 +466,7 @@ define(["dojo/_base/xhr", var item = data[0]; util.sendRequest("api/latest/virtualhostnode/" + encodeURIComponent(item.name), "PUT", {desiredState: "ACTIVE"}); + that.vhostsGrid.grid.selection.clear(); } }); @@ -473,6 +483,7 @@ define(["dojo/_base/xhr", { util.sendRequest("api/latest/virtualhostnode/" + encodeURIComponent(item.name), "PUT", {desiredState: "STOPPED"}); + that.vhostsGrid.grid.selection.clear(); } } }); @@ -486,6 +497,7 @@ define(["dojo/_base/xhr", var host = item.virtualhosts[0]; util.sendRequest("api/latest/virtualhost/" + encodeURIComponent(item.name) + "/" + encodeURIComponent(host.name), "PUT", {desiredState: "ACTIVE"}); + that.vhostsGrid.grid.selection.clear(); } }); @@ -501,12 +513,11 @@ define(["dojo/_base/xhr", { util.sendRequest("api/latest/virtualhost/" + encodeURIComponent(item.name) + "/" + encodeURIComponent(host.name), "PUT", {desiredState: "STOPPED"}); + that.vhostsGrid.grid.selection.clear(); } } }); - gridProperties.selectionMode="extended"; - that.portsGrid = new UpdatableStore(that.brokerData.ports, query(".broker-ports")[0], [ { name: "Name", field: "name", width: "15%"}, |
