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 2019/06/14 17:38:47 UTC
[qpid-dispatch] branch master updated: DISPATCH-1365 - Fix delayed
deliveries table in console
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 4eea5a7 DISPATCH-1365 - Fix delayed deliveries table in console
4eea5a7 is described below
commit 4eea5a7be230e7a40b9c2478cf9eee74c8ede449
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Fri Jun 14 13:38:33 2019 -0400
DISPATCH-1365 - Fix delayed deliveries table in console
---
.../plugin/js/qdrDelayedDeliveriesController.js | 31 +++++++++++++++-------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/console/stand-alone/plugin/js/qdrDelayedDeliveriesController.js b/console/stand-alone/plugin/js/qdrDelayedDeliveriesController.js
index 62dada6..4681afc 100644
--- a/console/stand-alone/plugin/js/qdrDelayedDeliveriesController.js
+++ b/console/stand-alone/plugin/js/qdrDelayedDeliveriesController.js
@@ -72,7 +72,7 @@ export class DelayedDeliveriesController {
noUnselect: true
};
- // get info for all addresses
+ // get info for all links
var allLinkInfo = function(link, callback) {
let nodes = {};
// gets called each node/entity response
@@ -110,31 +110,44 @@ export class DelayedDeliveriesController {
link,
["deliveriesDelayed1Sec", "deliveriesDelayed10Sec"],
rates,
- "delayed",
- 10
+ link.name,
+ 12 // average over 12 snapshots (each snapshot is 5 seconds apart)
);
- link.deliveriesDelayed1SecRate = Math.max(
+ link.deliveriesDelayed1SecRate = Math.round(
delayedRates.deliveriesDelayed1Sec,
- 0
+ 1
);
- link.deliveriesDelayed10SecRate = Math.max(
+ link.deliveriesDelayed10SecRate = Math.round(
delayedRates.deliveriesDelayed10Sec,
- 0
+ 1
);
+ /* The killConnection event handler (in qdrOverview.js) expects
+ a row object with a routerId and the identity of a connection.
+ Here we set those attributes so that when killConnection is
+ called, it will kill the link's connection
+ */
+ link.routerId = node;
+ link.identity = link.connectionId;
+
links.push(link);
}
});
}
if (links.length === 0) return;
// update the grid's data
- /*
links = links.filter(function(link) {
return (
link.deliveriesDelayed1SecRate > 0 ||
link.deliveriesDelayed10SecRate > 0
);
});
- */
+ links.sort((a, b) => {
+ if (a.deliveriesDelayed1SecRate > b.deliveriesDelayed1SecRate)
+ return -1;
+ else if (a.deliveriesDelayed1SecRate < b.deliveriesDelayed1SecRate)
+ return 1;
+ else return 0;
+ });
// take top 5 records
links.splice(5);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org