From 3f8d6457837fabdd6590a334ca14eb31d9bbdc39 Mon Sep 17 00:00:00 2001 From: Dominik Csapak Date: Tue, 27 Feb 2024 11:38:25 +0100 Subject: [PATCH] dashboard: implement columns browser setting like we do it e.g. for the node status Signed-off-by: Dominik Csapak --- js/Dashboard.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/Dashboard.js b/js/Dashboard.js index 9c51734..b536cb2 100644 --- a/js/Dashboard.js +++ b/js/Dashboard.js @@ -186,9 +186,20 @@ Ext.define('PMG.Dashboard', { var sp = Ext.state.Manager.getProvider(); var hours = sp.get('dashboard-hours') || 12; me.setHours(hours, false); + + view.mon(sp, 'statechange', function(provider, key, value) { + if (key !== 'summarycolumns') { + return; + } + Proxmox.Utils.updateColumnWidth(view); + }); }, }, + listeners: { + resize: panel => Proxmox.Utils.updateColumnWidth(panel), + }, + viewModel: { data: { timespan: 300, // in seconds @@ -322,7 +333,7 @@ Ext.define('PMG.Dashboard', { bodyPadding: '20 0 0 20', defaults: { - columnWidth: 0.5, + columnWidth: 1, xtype: 'panel', margin: '0 20 20 0', }, -- 2.39.2