[pve-devel] [PATCH manager 2/2] ui: use SafeDestroyResource window for removing resources
Daniel Kral
d.kral at proxmox.com
Tue Sep 23 09:50:38 CEST 2025
On Wed Sep 17, 2025 at 1:53 PM CEST, Michael Köppl wrote:
> This allows users to additionally choose whether they want to purge
> referenced rules that only include the resource that is to be deleted.
>
> Signed-off-by: Michael Köppl <m.koeppl at proxmox.com>
> ---
> www/manager6/ha/Resources.js | 17 +++++++++++++----
> 1 file changed, 13 insertions(+), 4 deletions(-)
>
> diff --git a/www/manager6/ha/Resources.js b/www/manager6/ha/Resources.js
> index 65897bed2..8bac671d5 100644
> --- a/www/manager6/ha/Resources.js
> +++ b/www/manager6/ha/Resources.js
> @@ -74,12 +74,21 @@ Ext.define('PVE.ha.ResourcesView', {
> handler: run_editor,
> },
> {
> - xtype: 'proxmoxStdRemoveButton',
> + xtype: 'proxmoxButton',
> + text: gettext('Remove'),
With the change from 'proxmoxStdRemoveButton' to 'proxmoxButton' this
should have a `disabled: true`, otherwise it will be enabled even though
the user hasn't select any HA resource.
> selModel: sm,
> - getUrl: function (rec) {
> - return `/cluster/ha/resources/${rec.get('sid')}`;
> + itemId: 'removeBtn',
> + handler: function (btn, e, rec) {
> + Ext.create('PVE.window.SafeDestroyResource', {
> + url: `/cluster/ha/resources/${rec.data.sid}`,
> + item: {
> + id: rec.data.sid,
> + formattedIdentifier: rec.data.sid,
> + },
> + taskName: 'Remove resource',
> + apiCallDone: () => me.rstore.load(),
> + }).show();
> },
> - callback: () => me.rstore.load(),
> },
> ],
> columns: [
More information about the pve-devel
mailing list