[pve-devel] [PATCH widget-toolkit v3 2/2] rrdchart: use reference for undo button
Dominik Csapak
d.csapak at proxmox.com
Mon Jul 21 13:43:05 CEST 2025
Reviewed-by: Dominik Csapak <d.csapak at proxmox.com>
On 7/15/25 16:31, Aaron Lauterer wrote:
> This makes targeting the undo button more stable in situations where it
> might not be the 0 indexed item in the tools.
>
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> src/panel/RRDChart.js | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/panel/RRDChart.js b/src/panel/RRDChart.js
> index 3b41ae6..f9a9b33 100644
> --- a/src/panel/RRDChart.js
> +++ b/src/panel/RRDChart.js
> @@ -152,7 +152,7 @@ Ext.define('Proxmox.widget.RRDChart', {
> return;
> }
> // if the undo button is disabled, disable our tool
> - let ourUndoZoomButton = chart.header.tools[0];
> + let ourUndoZoomButton = chart.lookupReference('undoButton');
> let undoButton = chart.interactions[0].getUndoButton();
> ourUndoZoomButton.setDisabled(undoButton.isDisabled());
> },
> @@ -269,6 +269,7 @@ Ext.define('Proxmox.widget.RRDChart', {
> me.addTool({
> type: 'minus',
> disabled: true,
> + reference: 'undoButton',
> tooltip: gettext('Undo Zoom'),
> handler: function () {
> let undoButton = me.interactions[0].getUndoButton();
More information about the pve-devel
mailing list