[pmg-devel] applied: [PATCH gui 4/4] dashboard: show ten of the current top receiver

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Feb 26 17:28:53 CET 2024


not only five, as with the higher panels we already got enough space,
as one row needs roughly 24 px, lower top/bottom padding a bit to get
~242 of space, fitting ten entries nicely.

The performance aspect should not matter much, getting five or ten
entries from a DB like PostgreSQL is really not costing much,
especially as with the count query in use the hard work has already
been done anyway.

Makes the top-receiver panel look a bit more coherent compared to the
node info one beside it.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---
 js/Dashboard.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/js/Dashboard.js b/js/Dashboard.js
index d03510e..9c51734 100644
--- a/js/Dashboard.js
+++ b/js/Dashboard.js
@@ -283,6 +283,7 @@ Ext.define('PMG.Dashboard', {
 		    url: '/api2/json/statistics/recentreceivers',
 		    extraParams: {
 			hours: '{hours}',
+			limit: 10, // make this also configurable?
 		    },
 		},
 		fields: [
@@ -427,7 +428,7 @@ Ext.define('PMG.Dashboard', {
 	    iconCls: 'fa fa-list',
 	    title: gettext('Top Receivers'),
 
-	    bodyPadding: '20 20 20 20',
+	    bodyPadding: '10 10 10 10',
 	    layout: {
 		type: 'vbox',
 		pack: 'center',
-- 
2.39.2





More information about the pmg-devel mailing list