You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2020/03/05 14:51:49 UTC
[qpid-dispatch] branch master updated: DISPATCH-1588 Use
router.node.index to determine the correct value in the ingressHistogram
for an ingress router.
This is an automated email from the ASF dual-hosted git repository.
eallen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new cdc047f DISPATCH-1588 Use router.node.index to determine the correct value in the ingressHistogram for an ingress router.
cdc047f is described below
commit cdc047ff62c7c9ca0268fbc4c2b35fe5a9fd1ef3
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Thu Mar 5 09:49:28 2020 -0500
DISPATCH-1588 Use router.node.index to determine the correct value in the ingressHistogram for an ingress router.
---
console/react/src/chord/data.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/console/react/src/chord/data.js b/console/react/src/chord/data.js
index 014d40c..35689f3 100644
--- a/console/react/src/chord/data.js
+++ b/console/react/src/chord/data.js
@@ -104,17 +104,16 @@ class ChordData {
for (let nodeId in results) {
// get a map of router ids to index into ingressHistogram for the links for this router.
// each routers has a different order for the routers
- let ingressRouters = [];
let routerNode = results[nodeId]["router.node"];
if (!routerNode) {
continue;
}
- let idIndex = routerNode.attributeNames.indexOf("id");
// ingressRouters is an array of router names in the same order
// that the ingressHistogram values will be in
- for (let i = 0; i < routerNode.results.length; i++) {
- ingressRouters.push(routerNode.results[i][idIndex]);
- }
+ let ingressRouters = self.QDRService.utilities
+ .flattenAll(routerNode)
+ .sort((a, b) => (a.index < b.index ? -1 : a.index > b.index ? 1 : 0))
+ .map(n => n.id);
// the name of the router we are working on
let egressRouter = self.QDRService.utilities.nameFromId(nodeId);
// loop through the router links for this router looking for
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org