]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
rrd: only move legend to header if both exists
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 16:19:16 +0000 (18:19 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 4 Jun 2020 16:19:16 +0000 (18:19 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
panel/RRDChart.js

index f09d565a27b100116912f07fe42b3f4cdef8b911..cd241bba7a9dc564d748b350cdac6d0a114c4375 100644 (file)
@@ -122,8 +122,11 @@ Ext.define('Proxmox.widget.RRDChart', {
        me.axes[0].setTitle(axisTitle);
 
        me.updateHeader();
-       me.header.padding = '4 9 4';
-       me.header.add(me.legend);
+
+       if (me.header && me.legend) {
+           me.header.padding = '4 9 4';
+           me.header.add(me.legend);
+       }
 
        if (!me.noTool) {
            me.addTool({