diff --git a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-tree-processor.ts b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-tree-processor.ts index 64862b3..5749ae2 100644 --- a/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-tree-processor.ts +++ b/artemis-console-extension/artemis-extension/packages/artemis-console-plugin/src/artemis-tree-processor.ts @@ -90,9 +90,9 @@ function findBrokers(children: MBeanNode[] | undefined): MBeanNode[] { } const brokers: MBeanNode[] = [] for (const c of children) { - if (c.id.endsWith('-folder')) { - if (oldBrokers.has(c.name)) { - const oldBrokerNode = oldBrokers.get(c.name)! + if (oldBrokers.has(c.name)) { + const oldBrokerNode = oldBrokers.get(c.name)! + if (c.id.endsWith('-folder')) { const newBrokerNode = new MBeanNode(null, `Broker ${c.name}`, true) newBrokerNode.icon = c.icon newBrokerNode.expandedIcon = c.expandedIcon @@ -107,6 +107,14 @@ function findBrokers(children: MBeanNode[] | undefined): MBeanNode[] { newBrokerNode.adopt(c) }) brokers.push(newBrokerNode) + } else { + // the broker doesn't have children at all, but we still need the node + const newBrokerNode = new MBeanNode(null, `Broker ${c.name}`, false) + newBrokerNode.icon = c.icon + newBrokerNode.objectName = oldBrokerNode.objectName + newBrokerNode.mbean = oldBrokerNode.mbean + newBrokerNode.propertyList = oldBrokerNode.propertyList + brokers.push(newBrokerNode) } } }