From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 9FFD71FF16E for ; Mon, 29 Jul 2024 13:43:50 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 633FF1BEB0; Mon, 29 Jul 2024 13:43:49 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Mon, 29 Jul 2024 13:43:03 +0200 MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Theodor Fumics via pve-devel Precedence: list Cc: Theodor Fumics X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH manager v2] ui: pool: separate "Add Virtual Machine" menu into distinct options Content-Type: multipart/mixed; boundary="===============3924562976788187921==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============3924562976788187921== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: 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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 6DFC0C06E0 for ; Mon, 29 Jul 2024 13:43:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4768A1BE7C for ; Mon, 29 Jul 2024 13:43:17 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) (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 ; Mon, 29 Jul 2024 13:43:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1722253387; x=1722858187; i=theodor.fumics@gmx.net; bh=J0/7G3GnG0cNpO9i6rO2fhwNm5bWL4Y9h7AIBn8CEHQ=; 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=GL0FgwetCOp3iWs/9WDiWumPyRP7BI/w2tJINK+QzclZayE8eJL6NCuJIH3zfNSq zY764K4M3BL4o2ZTusAXBHRCCzJAtHRMcep4FUVRDzuIX0fk5IaZrihaoxbs8WJfh x5fFZ2ET5XJ9hnsbqIuamz1PLmiMRfNy583gGLkBocthSX4vvOwE/v6VLwfAxIEcs 7vXgagX/h5JG6YjhSw/bpGNYxai8Yzp14HWvB8x0JMORsGn8szyG7hZ5WitcOurnF /WpRKRB96Ok/yED+psNtnlFBhxGGzVRxw7gx6Pek4Vof4ry9Bns4rIHXpjQsfZCJa 2xxqhjgwzGQhcNg/HA== 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 1Mnpru-1rwNPd2kKw-00g8fP; Mon, 29 Jul 2024 13:43:07 +0200 From: Theodor Fumics To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2] ui: pool: separate "Add Virtual Machine" menu into distinct options Date: Mon, 29 Jul 2024 13:43:03 +0200 Message-Id: <20240729114303.137022-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:6/bWYpvuj+KJYZl+L0iFx2QHL+bggBApUvUjda23OUC9WKIT0sF B/OeST/bT/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PAM-LEVEL: Spam detection results: 0 AWL -0.001 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_H2 -0.001 Average reputation (+2) 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 =2D-- Notes: Changes from v1 -> v2 * adjusted line to fit within 100 characters as per style guide 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..78ccc2a4 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 item.data.type) && 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 --===============3924562976788187921== 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 --===============3924562976788187921==--