From 6951f9618680bf7fee2c08410fa8f7086c8f1823 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=B6ppl?= Date: Mon, 7 Apr 2025 10:38:05 +0200 Subject: [PATCH] close #3181: ui: add formatted guest identifier to safe destroy dialog window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Link: https://lore.proxmox.com/20250407083806.63773-2-m.koeppl@proxmox.com --- src/window/SafeDestroy.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/window/SafeDestroy.js b/src/window/SafeDestroy.js index fad7897..1505870 100644 --- a/src/window/SafeDestroy.js +++ b/src/window/SafeDestroy.js @@ -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";