From: "Christoph Heiss" <c.heiss@proxmox.com>
To: "Dominik Rusovac" <d.rusovac@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [PATCH manager v4] ui: ha: add disarm/re-arm button
Date: Wed, 13 May 2026 15:16:14 +0200 [thread overview]
Message-ID: <DIHKSH1D4NEW.188U8WGFU1FB4@proxmox.com> (raw)
In-Reply-To: <20260513081123.1042628-1-d.rusovac@proxmox.com>
On Wed May 13, 2026 at 10:11 AM CEST, Dominik Rusovac wrote:
> The button to disarm HA in either of the resource modes ('freeze' or
> 'ignore') is disabled as long as HA is disarmed. Analogously, the button
> to arm HA is disabled as long as HA is not disarmed.
>
> For feedback, after clicking either of the buttons, icon spins as long as
> (dis)arming process has not changed the armed-state of HA.
>
> The icons ('unlink' and 'link') are chosen to emphasize that "Disarm HA"
> and "Arm HA" are complements. There may be more suitable pairs of icons
> though.
Just a suggestion, no hard feelings, looking at the icons, maybe some
other suitable icon pairs could also be:
- 'pause-circle-o' and 'play-circle-o' or
- 'lock' and 'unlock-alt'?
Didn't review *too* closely besides my two inline comments.
Tested it though, works as advertised.
Tested-by: Christoph Heiss <c.heiss@proxmox.com>
[..]
> index b0b0feb9..86df8b31 100644
> --- a/www/manager6/ha/Status.js
> +++ b/www/manager6/ha/Status.js
> @@ -8,6 +8,113 @@ Ext.define('PVE.ha.Status', {
> align: 'stretch',
> },
>
> + viewModel: {
> + data: {
> + haDisarmed: false,
> + },
> + },
> +
> + controller: {
> + xclass: 'Ext.app.ViewController',
> +
> + handleDisarmButton: function (menuItem) {
> + let me = this;
> + let view = me.getView();
> +
> + let warn = Ext.String.format(
> + gettext("Are you sure you want to disarm HA with resource mode '{0}'?"),
> + menuItem.text,
> + );
> +
> + let details =
> + 'While disarmed, HA does not protect your services. Failures during this period are not automatically recovered.';
This won't get picked up by `xgettext`, needs to be wrapped in
`gettext()` directly.
> +
> + Ext.Msg.confirm(
> + gettext('Confirm'),
> + warn + '<br><br>' + gettext(menuItem.details) + '<br><br>' + gettext(details),
^^^^^^^^^^^^^^^^^^^^^^^^^
`menuItem.details` is already the translated string, no?
Since below definitions already wrap it accordingly.
next prev parent reply other threads:[~2026-05-13 13:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 8:11 [PATCH manager v4] ui: ha: add disarm/re-arm button Dominik Rusovac
2026-05-13 13:16 ` Christoph Heiss [this message]
2026-05-13 13:58 ` Dominik Rusovac
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=DIHKSH1D4NEW.188U8WGFU1FB4@proxmox.com \
--to=c.heiss@proxmox.com \
--cc=d.rusovac@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