From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pve-devel-bounces@lists.proxmox.com>
Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68])
	by lore.proxmox.com (Postfix) with ESMTPS id 7BE8C1FF174
	for <inbox@lore.proxmox.com>; Mon, 29 Jul 2024 11:54:13 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id A70641A4B0;
	Mon, 29 Jul 2024 11:54:13 +0200 (CEST)
To: pve-devel@lists.proxmox.com
Date: Mon, 29 Jul 2024 11:53:14 +0200
MIME-Version: 1.0
Message-ID: <mailman.21.1722246852.302.pve-devel@lists.proxmox.com>
List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com>
List-Post: <mailto:pve-devel@lists.proxmox.com>
From: Theodor Fumics via pve-devel <pve-devel@lists.proxmox.com>
Precedence: list
Cc: Theodor Fumics <theodor.fumics@gmx.net>
X-Mailman-Version: 2.1.29
X-BeenThere: pve-devel@lists.proxmox.com
List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe>
List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, 
 <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe>
List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/>
Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help>
Subject: [pve-devel] [PATCH manager] ui: pool: separate "Add Virtual
 Machine" menu into distinct options
Content-Type: multipart/mixed; boundary="===============0658700205091947819=="
Errors-To: pve-devel-bounces@lists.proxmox.com
Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com>

--===============0658700205091947819==
Content-Type: message/rfc822
Content-Disposition: inline

Return-Path: <theodor.fumics@gmx.net>
X-Original-To: pve-devel@lists.proxmox.com
Delivered-To: pve-devel@lists.proxmox.com
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) server-digest SHA256)
	(No client certificate requested)
	by lists.proxmox.com (Postfix) with ESMTPS id 1D59BC0689
	for <pve-devel@lists.proxmox.com>; Mon, 29 Jul 2024 11:54:12 +0200 (CEST)
Received: from firstgate.proxmox.com (localhost [127.0.0.1])
	by firstgate.proxmox.com (Proxmox) with ESMTP id F2F0D1A42F
	for <pve-devel@lists.proxmox.com>; Mon, 29 Jul 2024 11:53:41 +0200 (CEST)
Received: from mout.gmx.net (mout.gmx.net [212.227.17.21])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256)
	(No client certificate requested)
	by firstgate.proxmox.com (Proxmox) with ESMTPS
	for <pve-devel@lists.proxmox.com>; Mon, 29 Jul 2024 11:53:40 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net;
	s=s31663417; t=1722246813; x=1722851613; i=theodor.fumics@gmx.net;
	bh=ch7mMFN1yI8vYueihsda0UR6juzPlu2xCi+V8k03TPw=;
	h=X-UI-Sender-Class:From:To:Cc:Subject:Date:Message-Id:
	 MIME-Version:Content-Transfer-Encoding:cc:
	 content-transfer-encoding:content-type:date:from:message-id:
	 mime-version:reply-to:subject:to;
	b=O3bnJWopFtugiONgLpxKn3jpoH3lsaCFoUz/Wu69WgZ8+w+MWpRhAtkjewgE+dUa
	 bVZ5H/pNvJoy69Y0EATMx1RtLz7m5bMLpmRToJ7oATDQbMVvRxPoiIG+w9S6nHwSm
	 IL4dAHTkkL1JBwsvcW90AiGcqhNF6FW3DmkDhseZjwY+eVP32LpYRCM1NuBpG10uH
	 4mJk1Bpp1SGXOvvunXqTgVF4rmPICjqvnUKv8TX7BEGg+AJ1CC+3iHa4YzEfo3m1F
	 qhidE14wpWb6znJFOTtaLcJrcckYynuUTQFzYBo6+M01jcxOVv0GKHCOx7xtvLuaL
	 9AvtymdAeQGZywzqrw==
X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a
Received: from praktikum3.proxmox.com ([94.136.29.99]) by mail.gmx.net
 (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id
 1Ma24y-1skNeD2u2e-00OBg3; Mon, 29 Jul 2024 11:53:33 +0200
From: Theodor Fumics <theodor.fumics@gmx.net>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager] ui: pool: separate "Add Virtual Machine" menu into distinct options
Date: Mon, 29 Jul 2024 11:53:14 +0200
Message-Id: <20240729095314.108158-1-theodor.fumics@gmx.net>
X-Mailer: git-send-email 2.39.2
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:aUVIU4n+JjSnytf4dcY8jYGh96HkmWuANXky87tiLoeyGYU9/o2
 eRDdmk32vfcb7Vr+FhWir5jh2WV8Of/ir7pstXDH9cpxD+ifl9zowACzn1aXFjaxLxxrS+1
 bHvS7Kg/LDfqseLQ0bCg8eFWPdrA8f6m5NvyLBiK8L174LKMR2tTJRP9y9RTfq4DRBpR5w2
 X8SfpfZc8FBj1pt3QVYhQ==
X-Spam-Flag: NO
UI-OutboundReport: notjunk:1;M01:P0:yUdAl74NBM0=;rxDHUeeZhUm7FZGaPUruxlcuCZs
 U15s+Xfq6VrdPs4zSpiAtF8I6JxVZXeKwGh5ikJfCGAr4ek5552AC7Wr0WsIGNIr0LueZQZYG
 OT/LOWBODtAbXmGEmkxjmdHVs3L0WgMZuTOwre6iHJHJnxQcXu+GlxReukV2fkTVkx7wDK08K
 M1pm9Lg8fyE0w3FWtSIjwCfqshR5JQPjVD7WqBwL/TIFkMeHiCbatIq8wfJjjaduk+73/BAHq
 lAW2FDeDgmgwus/oBX8x87x7K+C8NIcTPIv7i1UdeC1MPu7/V1+9xTV9SEZwdC74Uq3jRfF66
 sls815eQBEtJWnScYh6nYPNZ8+rrNCT6mbXBAhKW1CuK2lPtAWQTKcktXEzSuFFSCw9aB6aiM
 NVUIsOO1XV/em8yydj9hg05xl7EpPcxTEx9Wq6A75A8E8ZmlPLHmdyRyTBAxUDuIMwXHimWMi
 S4EtMqUiQncw2FUjRrCg9QJnng2u811cup/xFwWNGLYUaE9W/VL21WBXqVxs4Jnn5oBtNmMWl
 AFJ1eLrvp2Hg6tR2kh5KAZg5FIDod12NJ6PzAc0PVylRlKh3mm12f9PIU8bijM5HYPO7ZMDhM
 x9XnG34aUcQHH3iz6+1Qydwj/31RHvy/wdLmnYFeAwbtEFwxkhVqx7ap8e4bKi9vzoo3HngZB
 0MvAciaW2wMup85LDmKCBHN4YEYD1Fgkb7C789HNxDjrO7TucDahZLVOSktfLTpPnnWFP+J80
 LQ1wXTWTYeMlJ+y6I/jHFVCZxLrRR8/SxkqCACH54xJv9255WxV4sft+hEAcHIfZpASXdpnHD
 X70K8rjiRM8+xt79+n8u1zCg==
X-SPAM-LEVEL: Spam detection results:  0
	AWL                     0.010 Adjusted score from AWL reputation of From: address
	BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
	DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid
	DKIM_VALID               -0.1 Message has at least one valid DKIM or DK signature
	DKIM_VALID_AU            -0.1 Message has a valid DKIM or DK signature from author's domain
	DKIM_VALID_EF            -0.1 Message has a valid DKIM or DK signature from envelope-from domain
	DMARC_PASS               -0.1 DMARC pass policy
	FREEMAIL_FROM           0.001 Sender email is commonly abused enduser mail provider
	RCVD_IN_DNSWL_LOW        -0.7 Sender listed at https://www.dnswl.org/, low trust
	RCVD_IN_MSPIKE_H3       -0.01 Good reputation (+3)
	RCVD_IN_MSPIKE_WL       -0.01 Mailspike good senders
	SPF_HELO_NONE           0.001 SPF: HELO does not publish an SPF Record
	SPF_PASS               -0.001 SPF: sender matches SPF record

Split the "Add Virtual Machine" menu into separate options
for Virtual Machines and Containers to reduce confusion.
This change follows feedback from a user in [1], who had difficulty
finding the container option.

[1] https://forum.proxmox.com/threads/how-to-add-containers-to-a-resource-=
pool.151946/

Signed-off-by: Theodor Fumics <theodor.fumics@gmx.net>
=2D--
 www/manager6/grid/PoolMembers.js | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/www/manager6/grid/PoolMembers.js b/www/manager6/grid/PoolMemb=
ers.js
index 75f20cab..417e5d3d 100644
=2D-- a/www/manager6/grid/PoolMembers.js
+++ b/www/manager6/grid/PoolMembers.js
@@ -1,4 +1,4 @@
-Ext.define('PVE.pool.AddVM', {
+Ext.define('PVE.pool.AddGuest', {
     extend: 'Proxmox.window.Edit',

     width: 640,
@@ -37,7 +37,7 @@ Ext.define('PVE.pool.AddVM', {
 	    ],
 	    filters: [
 		function(item) {
-		    return (item.data.type =3D=3D=3D 'lxc' || item.data.type =3D=3D=3D =
'qemu') &&item.data.pool !=3D=3D me.pool;
+		    return (me.type =3D=3D=3D 'qemu' ? item.data.type =3D=3D=3D 'qemu' =
: item.data.type =3D=3D=3D 'lxc') && item.data.pool !=3D=3D me.pool;
 		},
 	    ],
 	});
@@ -84,15 +84,11 @@ Ext.define('PVE.pool.AddVM', {
 		    dataIndex: 'name',
 		    flex: 1,
 		},
-		{
-		    header: gettext('Type'),
-		    dataIndex: 'type',
-		},
 	    ],
 	});

 	Ext.apply(me, {
-	    subject: gettext('Virtual Machine'),
+	    subject: gettext(me.type =3D=3D=3D 'qemu' ? 'Virtual Machine' : 'LXC=
 Container'),
 	    items: [
 		vmsField,
 		vmGrid,
@@ -228,16 +224,25 @@ Ext.define('PVE.grid.PoolMembers', {
 			items: [
 			    {
 				text: gettext('Virtual Machine'),
-				iconCls: 'pve-itype-icon-qemu',
+				iconCls: 'fa fa-fw fa-desktop',
+				handler: function() {
+				    var win =3D Ext.create('PVE.pool.AddGuest', { pool: me.pool, type=
: 'qemu' });
+				    win.on('destroy', reload);
+				    win.show();
+				},
+			    },
+			    {
+				text: gettext('Container'),
+				iconCls: 'fa fa-fw fa-cube',
 				handler: function() {
-				    var win =3D Ext.create('PVE.pool.AddVM', { pool: me.pool });
+				    var win =3D Ext.create('PVE.pool.AddGuest', { pool: me.pool, type=
: 'lxc' });
 				    win.on('destroy', reload);
 				    win.show();
 				},
 			    },
 			    {
 				text: gettext('Storage'),
-				iconCls: 'pve-itype-icon-storage',
+				iconCls: 'fa fa-fw fa-hdd-o',
 				handler: function() {
 				    var win =3D Ext.create('PVE.pool.AddStorage', { pool: me.pool });
 				    win.on('destroy', reload);
=2D-
2.39.2



--===============0658700205091947819==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

--===============0658700205091947819==--