[pve-devel] [PATCH manager v3 5/5] fix #4474: ui: guest stop: offer to overrule active shutdown tasks

Thomas Lamprecht t.lamprecht at proxmox.com
Sun Apr 21 10:28:24 CEST 2024


Am 19/04/2024 um 12:17 schrieb Dominik Csapak:
> nit: imho a short high level description why we extend the messagebox instead
> of e.g. our edit/safedestroy window would be nice
> 
> also maybe we could rewrite this a bit more generic so that the safedestroy
> window users could this instead? (not necessary for now though)
> 

Yeah, I'd do the following:
- create a new proxmoxPrompt / Proxmox.window.Prompt that is a generic variant
  of the SafeDestroy button, allowing to override the confirm button text, API
  call HTTP method, adding extra items both inside the message container and
  below that, providing basic plumbing to easily integrate extra validation
  to allow confirmation and infra to show (various) hints. As both are things
  that are quite common in prompts (at least should be) it's IMO worth it to
  have native support for that functionality directly in such a general widget
  even if a widget that extends from this could add it themselves.
 

- move over SafeDestroy to this new widget as base, it probably should be one
  or two dozens lines of (mostly declarative) code then.

FWIW, I started the first part here, but it's still pretty bare bones, and I'm
not sure if I get around to finish it, especially with good polishing, in the
near future so just come to me if you, or someone else, want's to continue on
this. IMO this would be something quite worth doing, as our prompts are pretty
rough, often lacking even conveying the basic implications of (destructive)
actions, and having a good component that makes it easy to show hints or add
extra (non-intrusive) confirmation validation could help here.




More information about the pve-devel mailing list