From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 8D7691FF13A for ; Wed, 13 May 2026 15:16:23 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D3061E5CF; Wed, 13 May 2026 15:16:21 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 May 2026 15:16:14 +0200 Message-Id: Subject: Re: [PATCH manager v4] ui: ha: add disarm/re-arm button From: "Christoph Heiss" To: "Dominik Rusovac" X-Mailer: aerc 0.21.0 References: <20260513081123.1042628-1-d.rusovac@proxmox.com> In-Reply-To: <20260513081123.1042628-1-d.rusovac@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778678171309 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.075 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HEJMSZSA2F3FRZ2VTTGA62FFRDIAWLSL X-Message-ID-Hash: HEJMSZSA2F3FRZ2VTTGA62FFRDIAWLSL X-MailFrom: c.heiss@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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 [..] > 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 =3D this; > + let view =3D me.getView(); > + > + let warn =3D Ext.String.format( > + gettext("Are you sure you want to disarm HA with resourc= e mode '{0}'?"), > + menuItem.text, > + ); > + > + let details =3D > + 'While disarmed, HA does not protect your services. Fail= ures 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 + '

' + gettext(menuItem.details) + '
' + gettext(details), ^^^^^^^^^^^^^^^^^^^^^^^^^ `menuItem.details` is already the translated string, no? Since below definitions already wrap it accordingly.