public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Philipp Hufnagl <p.hufnagl@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v4 2/2] fix #474: ui: allow transfer from container/vms
Date: Thu, 10 Aug 2023 12:09:02 +0200	[thread overview]
Message-ID: <20230810100902.714456-3-p.hufnagl@proxmox.com> (raw)
In-Reply-To: <20230810100902.714456-1-p.hufnagl@proxmox.com>

A user can no see all vms/containers, even the ones that are already a
member of a pool. They can be transfered now after checking the newly
introduced "allow transfer" checkbox.

Signed-off-by: Philipp Hufnagl <p.hufnagl@proxmox.com>
---
 www/manager6/grid/PoolMembers.js | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMembers.js
index 6acb622d..224daca3 100644
--- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -1,7 +1,7 @@
 Ext.define('PVE.pool.AddVM', {
     extend: 'Proxmox.window.Edit',
     width: 600,
-    height: 400,
+    height: 420,
     isAdd: true,
     isCreate: true,
     initComponent: function() {
@@ -30,7 +30,7 @@ Ext.define('PVE.pool.AddVM', {
 	    ],
 	    filters: [
 		function(item) {
-		    return (item.data.type === 'lxc' || item.data.type === 'qemu') && item.data.pool === '';
+		    return (item.data.type === 'lxc' || item.data.type === 'qemu') &&item.data.pool !== me.pool;
 		},
 	    ],
 	});
@@ -63,6 +63,10 @@ Ext.define('PVE.pool.AddVM', {
 		    header: gettext('Node'),
 		    dataIndex: 'node',
 		},
+		{
+		    header: gettext('Pool'),
+		    dataIndex: 'pool',
+		},
 		{
 		    header: gettext('Status'),
 		    dataIndex: 'uptime',
@@ -85,9 +89,16 @@ 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],
+	    items: [vmsField, vmGrid, transfer],
 	});
 
 	me.callParent();
-- 
2.39.2





  parent reply	other threads:[~2023-08-10 10:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-10 10:09 [pve-devel] [PATCH manager v4 0/2] fix #474: " Philipp Hufnagl
2023-08-10 10:09 ` [pve-devel] [PATCH manager v4 1/2] fix #474: api: " Philipp Hufnagl
2023-08-10 10:09 ` Philipp Hufnagl [this message]
2023-08-14 10:36 ` [pve-devel] applied: [PATCH manager v4 0/2] fix #474: " Wolfgang Bumiller
2023-08-14 10:42   ` Dominik Csapak
2023-08-24 14:46     ` Thomas Lamprecht
2023-08-30 12:53       ` Philipp Hufnagl
2023-08-31 13:47         ` Thomas Lamprecht
2023-08-30 12:43     ` Philipp Hufnagl
2023-08-30 14:29       ` Dominik Csapak
2023-08-31  8:08         ` Philipp Hufnagl

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=20230810100902.714456-3-p.hufnagl@proxmox.com \
    --to=p.hufnagl@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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal