From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by lists.proxmox.com (Postfix) with ESMTPS id 08142AF05
for ; Fri, 8 Sep 2023 15:00:43 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
by firstgate.proxmox.com (Proxmox) with ESMTP id CE84512243
for ; Fri, 8 Sep 2023 15:00:12 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com
[94.136.29.106])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by firstgate.proxmox.com (Proxmox) with ESMTPS
for ; Fri, 8 Sep 2023 15:00:11 +0200 (CEST)
Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 2465A43280
for ; Fri, 8 Sep 2023 15:00:11 +0200 (CEST)
Message-ID:
Date: Fri, 8 Sep 2023 15:00:10 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: pve-devel@lists.proxmox.com
References: <20230908115647.238386-1-p.hufnagl@proxmox.com>
From: Philipp Hufnagl
In-Reply-To: <20230908115647.238386-1-p.hufnagl@proxmox.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-SPAM-LEVEL: Spam detection results: 0
AWL -0.004 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
Subject: Re: [pve-devel] [PATCH manager v2] ui: improve user experience for
vm/container transfer between pools
X-BeenThere: pve-devel@lists.proxmox.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Proxmox VE development discussion
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
X-List-Received-Date: Fri, 08 Sep 2023 13:00:43 -0000
Please dont merge. It appers i made an error at testing
On 9/8/23 13:56, Philipp Hufnagl wrote:
> After the implementation of fix #474, it has been suggested that
> instead of requiring the user to click a checkbox allowing migration,
> it should be allowed automatically and and a warning should be displayed
>
> Further it has been discussed to rename the feature from "transfer" to
> "migrate". However and API change would break already implemented usage
> and so it has been decided to call it (for now) transfer everywhere to
>
> Signed-off-by: Philipp Hufnagl
>
> modified: www/manager6/grid/PoolMembers.js
> ---
> www/manager6/grid/PoolMembers.js | 26 +++++++++++++++++++-------
> 1 file changed, 19 insertions(+), 7 deletions(-)
>
> diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
> index 224daca3..607042e8 100644
> --- a/www/manager6/grid/PoolMembers.js
> +++ b/www/manager6/grid/PoolMembers.js
> @@ -4,7 +4,11 @@ Ext.define('PVE.pool.AddVM', {
> height: 420,
> isAdd: true,
> isCreate: true,
> + extraRequestParams: {
> + transfer: 1,
> + }
> initComponent: function() {
> +
> var me = this;
>
> if (!me.pool) {
> @@ -35,6 +39,13 @@ Ext.define('PVE.pool.AddVM', {
> ],
> });
>
> + let transferWarning = Ext.create('Ext.form.field.Display', {
> + userCls: 'pmx-hint',
> + value: gettext('Virtual guests are removed from current pools'),
> + hidden: true,
> + });
> +
> +
> var vmGrid = Ext.create('widget.grid', {
> store: vmStore,
> border: true,
> @@ -46,9 +57,15 @@ Ext.define('PVE.pool.AddVM', {
> listeners: {
> selectionchange: function(model, selected, opts) {
> var selectedVms = [];
> + var isTransfer = false;
> selected.forEach(function(vm) {
> selectedVms.push(vm.data.vmid);
> + if (vm.data.pool?.length) {
> + isTransfer = true;
> + }
> });
> + transfer.setValue(isTransfer);
> + transferWarning.setHidden(!isTransfer);
> vmsField.setValue(selectedVms);
> },
> },
> @@ -90,15 +107,10 @@ Ext.define('PVE.pool.AddVM', {
> ],
> });
>
> - let transfer = Ext.create('Ext.form.field.Checkbox', {
> - name: 'transfer',
> - boxLabel: gettext('Allow Transfer'),
> - inputValue: 1,
> - value: 0,
> - });
> +
> Ext.apply(me, {
> subject: gettext('Virtual Machine'),
> - items: [vmsField, vmGrid, transfer],
> + items: [vmsField, vmGrid, transferWarning, transfer],
> });
>
> me.callParent();