[pve-devel] [PATCH manager 2/2] ui: use SafeDestroyResource window for removing resources

Michael Köppl m.koeppl at proxmox.com
Wed Sep 17 13:53:15 CEST 2025


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'),
                     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: [
-- 
2.47.3





More information about the pve-devel mailing list