From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: "Proxmox VE development discussion" <pve-devel@lists.proxmox.com>,
"Michael Köppl" <m.koeppl@proxmox.com>
Subject: Re: [pve-devel] [PATCH widget-toolkit v2 1/1] close #3181: ui: add formatted guest identifier to safe destroy dialog window
Date: Fri, 4 Apr 2025 17:04:57 +0200 [thread overview]
Message-ID: <cd57bb19-16a5-4085-abc9-a8dd1f6d0b36@proxmox.com> (raw)
In-Reply-To: <20250331133154.148713-2-m.koeppl@proxmox.com>
Am 31.03.25 um 15:31 schrieb Michael Köppl:
> 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>
> ---
> src/window/SafeDestroy.js | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
does not applies as is on my side here, might need a rebase or other
patches are missing?
>
> diff --git a/src/window/SafeDestroy.js b/src/window/SafeDestroy.js
> index c058465..a19747d 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,
> @@ -187,9 +188,13 @@ Ext.define('Proxmox.window.SafeDestroy', {
> }
>
> let taskName = me.getTaskName();
> + let formattedIdentifier = me.getItem().formattedIdentifier;
> if (Ext.isDefined(taskName)) {
> me.lookupReference('messageCmp').setHtml(
> - Proxmox.Utils.format_task_description(taskName, itemId),
> + Proxmox.Utils.format_task_description(
> + taskName,
> + formattedIdentifier ? formattedIdentifier : itemId,
FWIW you could also use the nullish coalescing (??) operator instead
of a ternary and avoid the intermediate variable, e.g.:
me.getItem().formattedIdentifier ?? itemId,
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-04-04 15:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 13:31 [pve-devel] [PATCH manager/widget-toolkit v2 0/2] close #3181: ui: display guest name in confirm dialogs Michael Köppl
2025-03-31 13:31 ` [pve-devel] [PATCH widget-toolkit v2 1/1] close #3181: ui: add formatted guest identifier to safe destroy dialog window Michael Köppl
2025-04-04 15:04 ` Thomas Lamprecht [this message]
2025-04-07 8:42 ` Michael Köppl
2025-03-31 13:31 ` [pve-devel] [PATCH manager v2 1/1] close #3181: ui: display guest name in confirm dialogs Michael Köppl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd57bb19-16a5-4085-abc9-a8dd1f6d0b36@proxmox.com \
--to=t.lamprecht@proxmox.com \
--cc=m.koeppl@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal