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 3BBD71FF13A for ; Wed, 13 May 2026 15:59:02 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 9A36C10368; Wed, 13 May 2026 15:58:59 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 13 May 2026 15:58:25 +0200 Message-Id: To: "Christoph Heiss" Subject: Re: [PATCH manager v4] ui: ha: add disarm/re-arm button From: "Dominik Rusovac" X-Mailer: aerc 0.20.0 References: <20260513081123.1042628-1-d.rusovac@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1778680702576 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.334 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: FPQSJQ46TNF7CBAVJ2LMJ3HWTXYFWO3U X-Message-ID-Hash: FPQSJQ46TNF7CBAVJ2LMJ3HWTXYFWO3U X-MailFrom: d.rusovac@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: thx for taking the time will send a v5 On Wed May 13, 2026 at 3:16 PM CEST, Christoph Heiss wrote: > 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 a= s >> (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'? nice suggestions, thx!=20 no hard feelings on my side either. we can definitely go for=20 either of your suggestions. what do the others think? > > 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 resour= ce mode '{0}'?"), >> + menuItem.text, >> + ); >> + >> + let details =3D >> + 'While disarmed, HA does not protect your services. Fai= lures during this period are not automatically recovered.'; > > This won't get picked up by `xgettext`, needs to be wrapped in > `gettext()` directly. > ack, thx! >> + >> + 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. true, sloppiness on my side=20 ack, thx for the heads up