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 2757E9A74
for ; Tue, 5 Sep 2023 15:51:36 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
by firstgate.proxmox.com (Proxmox) with ESMTP id 0A1771A37D
for ; Tue, 5 Sep 2023 15:51:36 +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 ; Tue, 5 Sep 2023 15:51:35 +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 43EE04221F
for ; Tue, 5 Sep 2023 15:51:35 +0200 (CEST)
From: Philipp Hufnagl
To: pve-devel@lists.proxmox.com
Date: Tue, 5 Sep 2023 15:51:22 +0200
Message-Id: <20230905135122.2145462-1-p.hufnagl@proxmox.com>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
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: [pve-devel] [PATCH manager] ui: improve vm/container migration user
experience
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: Tue, 05 Sep 2023 13:51:36 -0000
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
avoid confusion
Signed-off-by: Philipp Hufnagl
---
www/manager6/grid/PoolMembers.js | 29 ++++++++++++++++++++++-------
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
index 224daca3..d6fa0278 100644
--- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -35,6 +35,20 @@ Ext.define('PVE.pool.AddVM', {
],
});
+ let transferWarning = Ext.create('Ext.form.field.Display', {
+ userCls: 'pmx-hint',
+ value: gettext('One or more vms or container will be removed from their old pool'),
+ hidden: true,
+ });
+
+ let transfer = Ext.create('Ext.form.field.Checkbox', {
+ name: 'transfer',
+ boxLabel: gettext('Allow Transfer'),
+ inputValue: 1,
+ hidden: true,
+ value: 0,
+ });
+
var vmGrid = Ext.create('widget.grid', {
store: vmStore,
border: true,
@@ -46,9 +60,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 !== '') {
+ isTransfer = true;
+ }
});
+ transfer.setValue(isTransfer);
+ transferWarning.setHidden(!isTransfer);
vmsField.setValue(selectedVms);
},
},
@@ -90,15 +110,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();
--
2.39.2