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/05/13 11:30:11 UTC
svn commit: r1743655 -
/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
Author: orudyy
Date: Fri May 13 11:30:11 2016
New Revision: 1743655
URL: http://svn.apache.org/viewvc?rev=1743655&view=rev
Log:
QPID-7214: [Java Broker, WMC] Verify virtual host node existence before merging virtual host node and virtual host data
Modified:
qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
Modified: qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js
URL: http://svn.apache.org/viewvc/qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js?rev=1743655&r1=1743654&r2=1743655&view=diff
==============================================================================
--- qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js (original)
+++ qpid/java/trunk/broker-plugins/management-http/src/main/java/resources/js/qpid/management/Broker.js Fri May 13 11:30:11 2016
@@ -901,26 +901,29 @@ define(["dojo/parser",
{
queryVirtualHostNodes[virtualHostData[i].id] = null;
}
- for (var i = 0; i < that.brokerData.virtualhostnodes.length; i++)
+ if (that.brokerData.virtualhostnodes && that.brokerData.virtualhostnodes.length)
{
- var node = that.brokerData.virtualhostnodes[i];
- var nodeId = node.id;
- if (!(nodeId in queryVirtualHostNodes))
+ for (var i = 0;i < that.brokerData.virtualhostnodes.length; i++)
{
- virtualHostData.push({
- id: nodeId,
- name: node.name,
- type: node.type,
- state: node.state,
- "default": node.defaultVirtualHostNode,
- vhId: null,
- vhName: "N/A",
- vhType: "N/A",
- vhState: "N/A",
- connectionCount: "N/A",
- queueCount: "N/A",
- exchangeCount: "N/A"
- });
+ var node = that.brokerData.virtualhostnodes[i];
+ var nodeId = node.id;
+ if (!(nodeId in queryVirtualHostNodes))
+ {
+ virtualHostData.push({
+ id: nodeId,
+ name: node.name,
+ type: node.type,
+ state: node.state,
+ "default": node.defaultVirtualHostNode,
+ vhId: null,
+ vhName: "N/A",
+ vhType: "N/A",
+ vhState: "N/A",
+ connectionCount: "N/A",
+ queueCount: "N/A",
+ exchangeCount: "N/A"
+ });
+ }
}
}
util.flattenStatistics(that.brokerData);
@@ -969,7 +972,7 @@ define(["dojo/parser",
BrokerUpdater.prototype.toggleVirtualHostNodeNodeMenus = function (rowIndex)
{
var data = this.vhostsGrid.grid.selection.getSelected();
- var selected = data.length == 1;
+ var selected = data && data[0];
this.virtualHostNodeMenuButton.set("disabled", !selected);
this.virtualHostMenuButton.set("disabled", !selected || !data[0].vhId);
if (selected)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org