rrd: only move legend to header if both exists

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2020-06-04 18:19:16 +02:00
parent 335b5f3747
commit 0855ba611e

View File

@ -122,8 +122,11 @@ Ext.define('Proxmox.widget.RRDChart', {
me.axes[0].setTitle(axisTitle); me.axes[0].setTitle(axisTitle);
me.updateHeader(); 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) { if (!me.noTool) {
me.addTool({ me.addTool({