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

Michael Köppl m.koeppl at proxmox.com
Tue Sep 23 10:56:16 CEST 2025


On Tue Sep 23, 2025 at 9:50 AM CEST, Daniel Kral wrote:
> 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.
>

Will fix in v2, thanks!

>>                      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: [
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel





More information about the pve-devel mailing list