From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-gui] dashboard: implement columns browser setting
Date: Tue, 27 Feb 2024 11:38:25 +0100 [thread overview]
Message-ID: <20240227103825.2856866-1-d.csapak@proxmox.com> (raw)
like we do it e.g. for the node status
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
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.30.2
next reply other threads:[~2024-02-27 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 10:38 Dominik Csapak [this message]
2024-02-27 14:05 ` [pmg-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240227103825.2856866-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox