]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #474: ui: allow transfer from container/vms
authorPhilipp Hufnagl <p.hufnagl@proxmox.com>
Thu, 10 Aug 2023 10:09:02 +0000 (12:09 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 14 Aug 2023 10:26:30 +0000 (12:26 +0200)
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

index 6acb622d678e55db59e16976b47ae8da55ec7846..224daca3422847423d894007b3b24d99115deb6c 100644 (file)
@@ -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();