[pve-devel] [PATCH proxmox-widget-toolkit 1/1] RRDChart: fix title lookup for object series

Dominik Csapak d.csapak at proxmox.com
Mon Aug 4 15:29:27 CEST 2025


when we give a field(series) as an object instead of a string, we have
to lookup the title from the object. The code was designed to do this,
but accidentally always used the first entry in the 'fields' array
to lookup the title if the field was not a plain string one.

to fix this, simply check if the field is the one we're looking for

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this is necessary for the next patch to have correct tooltips

 src/panel/RRDChart.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
index c81e2e7..148015c 100644
--- a/src/panel/RRDChart.js
+++ b/src/panel/RRDChart.js
@@ -136,7 +136,7 @@ Ext.define('Proxmox.widget.RRDChart', {
                                 prefix = field.title[field.yField.indexOf(item.field)];
                                 break;
                             }
-                        } else if (field.title) {
+                        } else if (field.yField === item.field && field.title) {
                             prefix = field.title;
                             break;
                         }
-- 
2.39.5





More information about the pve-devel mailing list