From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager 1/3] ui: de-stackify RRD memory graphs
Date: Mon, 4 Aug 2025 13:28:40 +0200 [thread overview]
Message-ID: <20250804112842.904286-1-d.csapak@proxmox.com> (raw)
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
highly confusing if y-axis does not matches the metric and "jumps" if
metrics get toggled via the legend.
Keep the 'host memory' in vm graphs as a line, as otherwise the
overlapping colors make the graph also confusing, and keep it's
'hidden by default' logic.
While at it, use title case for the legend.
Originally-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/data/model/RRDModels.js | 28 ----------------------------
www/manager6/node/Summary.js | 12 +++---------
www/manager6/panel/GuestSummary.js | 20 +++++++++-----------
3 files changed, 12 insertions(+), 48 deletions(-)
diff --git a/www/manager6/data/model/RRDModels.js b/www/manager6/data/model/RRDModels.js
index cc5d31d2..362f9740 100644
--- a/www/manager6/data/model/RRDModels.js
+++ b/www/manager6/data/model/RRDModels.js
@@ -33,25 +33,6 @@ Ext.define('pve-rrd-node', {
'pressurememorysome',
'pressurememoryfull',
{ type: 'date', dateFormat: 'timestamp', name: 'time' },
- {
- name: 'memfree-capped',
- calculate: function (data) {
- if (data.memtotal >= 0 && data.memused >= 0 && data.memtotal >= data.memused) {
- return data.memtotal - data.memused;
- }
- return null;
- },
- },
- {
- name: 'memused-sub-arcsize',
- calculate: function (data) {
- let arcsize = data.arcsize ?? 0; // pre pve9 nodes don't report any arcsize
- if (data.memused >= 0 && arcsize >= 0 && data.memused >= arcsize) {
- return data.memused - arcsize;
- }
- return null;
- },
- },
],
});
@@ -82,15 +63,6 @@ Ext.define('pve-rrd-guest', {
'pressurememorysome',
'pressurememoryfull',
{ type: 'date', dateFormat: 'timestamp', name: 'time' },
- {
- name: 'memfree-capped',
- calculate: function (data) {
- if (data.maxmem >= 0 && data.mem >= 0 && data.maxmem >= data.mem) {
- return data.maxmem - data.mem;
- }
- return null;
- },
- },
],
});
diff --git a/www/manager6/node/Summary.js b/www/manager6/node/Summary.js
index 9a3f84a4..c7a33c51 100644
--- a/www/manager6/node/Summary.js
+++ b/www/manager6/node/Summary.js
@@ -177,18 +177,12 @@ Ext.define('PVE.node.Summary', {
{
xtype: 'proxmoxRRDChart',
title: gettext('Memory usage'),
- fields: [
- {
- type: 'area',
- yField: ['memused-sub-arcsize', 'arcsize', 'memfree-capped'],
- title: [gettext('Used'), gettext('ZFS ARC'), gettext('Free')],
- },
- ],
- colors: ['#115fa6', '#7c7474', '#94ae0a'],
+ fields: ['memtotal', 'memused', 'arcsize'],
+ fieldTitles: [gettext('Total'), gettext('Used'), gettext('ZFS ARC')],
+ colors: ['#94ae0a', '#115fa6', '#7c7474'],
unit: 'bytes',
powerOfTwo: true,
store: rrdstore,
- stacked: true,
},
{
xtype: 'proxmoxRRDChart',
diff --git a/www/manager6/panel/GuestSummary.js b/www/manager6/panel/GuestSummary.js
index f46006b4..9a9ced38 100644
--- a/www/manager6/panel/GuestSummary.js
+++ b/www/manager6/panel/GuestSummary.js
@@ -33,19 +33,16 @@ Ext.define('PVE.guest.Summary', {
let hideMemhostStateKey = 'pve-vm-hide-memhost';
let sp = Ext.state.Manager.getProvider();
- let memoryFields = [
- {
- type: 'area',
- yField: ['mem', 'memfree-capped'],
- title: [gettext('Used'), gettext('Free')],
- },
- ];
+ let memoryStats = {
+ fields: ['maxmem', 'mem'],
+ fieldTitles: [gettext('Total'), gettext('Used')],
+ };
if (type === 'qemu') {
- memoryFields.push({
+ memoryStats.fields.push({
type: 'line',
fill: false,
yField: 'memhost',
- title: gettext('Host memory usage'),
+ title: gettext('Host Memory Usage'),
hidden: sp.get(hideMemhostStateKey, true),
style: {
lineWidth: 2.5,
@@ -106,8 +103,9 @@ Ext.define('PVE.guest.Summary', {
xtype: 'proxmoxRRDChart',
title: gettext('Memory Usage'),
pveSelNode: me.pveSelNode,
- fields: memoryFields,
- colors: ['#115fa6', '#94ae0a', '#c4c0c0'],
+ fields: memoryStats.fields,
+ fieldTitles: memoryStats.fieldTitles,
+ colors: ['#94ae0a', '#115fa6', '#c4c0c0'],
unit: 'bytes',
powerOfTwo: true,
store: rrdstore,
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-08-04 11:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-04 11:28 Dominik Csapak [this message]
2025-08-04 11:28 ` [pve-devel] [RFC PATCH pve-manager 2/3] ui: node memory RRD: add more infos to the tooltips Dominik Csapak
2025-08-04 11:28 ` [pve-devel] [RFC PATCH pve-manager 3/3] ui: node memory RRD: add 'Available' graph Dominik Csapak
2025-08-04 12:43 ` [pve-devel] applied-series: [PATCH pve-manager 1/3] ui: de-stackify RRD memory graphs 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=20250804112842.904286-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.