mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-04 19:04:19 +00:00
close #3181: ui: add formatted guest identifier to safe destroy dialog window
Adds a formatted guest identifier (e.g. "VMID (VM name)") to the SafeDestroy window. The formatted identifier is only used if it is explicitly set by the caller. Otherwise, the VMID is used, avoiding changes in behavior for other components. Signed-off-by: Michael Köppl <m.koeppl@proxmox.com> Link: https://lore.proxmox.com/20250407083806.63773-2-m.koeppl@proxmox.com
This commit is contained in:
parent
56d9fa815b
commit
6951f96186
@ -26,6 +26,7 @@ Ext.define('Proxmox.window.SafeDestroy', {
|
||||
config: {
|
||||
item: {
|
||||
id: undefined,
|
||||
formattedIdentifier: undefined,
|
||||
},
|
||||
url: undefined,
|
||||
note: undefined,
|
||||
@ -189,7 +190,12 @@ Ext.define('Proxmox.window.SafeDestroy', {
|
||||
let taskName = me.getTaskName();
|
||||
if (Ext.isDefined(taskName)) {
|
||||
me.lookupReference('messageCmp').setHtml(
|
||||
Ext.htmlEncode(Proxmox.Utils.format_task_description(taskName, itemId)),
|
||||
Ext.htmlEncode(
|
||||
Proxmox.Utils.format_task_description(
|
||||
taskName,
|
||||
me.getItem().formattedIdentifier ?? itemId,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
throw "no task name specified";
|
||||
|
Loading…
Reference in New Issue
Block a user