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 939AB78F13 for ; Fri, 1 Jul 2022 02:10:39 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 84A163A57 for ; Fri, 1 Jul 2022 02:10:09 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 1 Jul 2022 02:10:05 +0200 (CEST) Received: by mail-pl1-x62c.google.com with SMTP id b2so806523plx.7 for ; Thu, 30 Jun 2022 17:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bowdernet.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D5Ru/j4U60Sc/u2plyJPuNRzhZSmThXt3dhmcr6FwYs=; b=XWcr3t6I9M9DYilvbshFZ8Ai49vFKCilm3Q0rlGZvtszgmLq8YhYuLMBcDpL/we1z+ e0lYlCueZq+qlnMcMAo4qNlUVqs+Tg99oUuVN0STa3POsRr4kPapYqdTqI1NMAW/bU8X feM943YgDRqaMB+Cz+R8zaxza1rs1cNb4HlfAA9POH/4FrInqc3pl1MV49FxrnoCfoOv qPLVbywS01IDiULxC337AhBtWmzcO2h6ELBFMQniMzEtg7lwXniaJTk60ifaaay/S66D LbUHX+TmBLhagOry9xRjkNUAi7TVrsdWralKR4adUIoCrI/cMHIDOra1BPjHdsuo4Hc8 48NA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D5Ru/j4U60Sc/u2plyJPuNRzhZSmThXt3dhmcr6FwYs=; b=bVaPlIAsTUEkWN9CSsZmA/GQRfRPvcD7d98MysAJgAnBjgKpk0ZVP3ycVB5dI5e4e4 xedeDeYiHMJ+eqTDomwi72jvgzv9b9G2zuQ/gZPrV6er5V0lLW+jR/g2c6yNNyXNrX5w 98UtOnq2yWPTgydxKS5f+ahmq0DGeMbMn8gVL1oMaWDGmjyYJdfSik8WPEZ6bDHGTUzr eZ8yvp3wLPKh5h5R2w8xrEfOTrflm4iwXhP0ZgukriGH+SrSEvaS4ESiDIppDoTvsSrK 8gpjlCyDOr0tEAjHwI7yY0VRuf2oKWfA6mHXi1Z3X8tzpDTCCpPbq8Z9fNHZ30nWNC/Y uVtw== X-Gm-Message-State: AJIora8d8qIfDSvFXIQbED1b0vhFCHjW6OicMf5A3fKwbulj4VEKtJ0w sYFHWONDpEGXk0pyPXMBL6GO1Elv8OE3Bj7L X-Google-Smtp-Source: AGRyM1tOw6NHAVccuIACuCnTmU+QkNSrYhFO8uEPuQpB3uKj3m0f5oYcAWp4fRTr6JKUMwDeSRSeBw== X-Received: by 2002:a17:902:cec9:b0:16a:644a:6019 with SMTP id d9-20020a170902cec900b0016a644a6019mr16559213plg.82.1656634197999; Thu, 30 Jun 2022 17:09:57 -0700 (PDT) Received: from localhost.localdomain (c-24-19-168-226.hsd1.wa.comcast.net. [24.19.168.226]) by smtp.gmail.com with ESMTPSA id g6-20020a631106000000b004114aad90ebsm7296066pgl.49.2022.06.30.17.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jun 2022 17:09:57 -0700 (PDT) From: Daniel Bowder To: pve-devel@lists.proxmox.com Cc: Daniel Bowder Date: Thu, 30 Jun 2022 17:09:48 -0700 Message-Id: <20220701000948.148496-5-daniel@bowdernet.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220701000948.148496-1-daniel@bowdernet.com> References: <20220701000948.148496-1-daniel@bowdernet.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.028 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 RCVD_IN_DNSWL_NONE -0.0001 Sender listed at https://www.dnswl.org/, no trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record T_SCC_BODY_TEXT_LINE -0.01 - Subject: [pve-devel] [PATCH v2 pve-manager 4/4] fix #3593: add js input for affinity 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: Fri, 01 Jul 2022 00:10:39 -0000 Adds a textfield for the affinity value. Delete that affinity value when the textbox is empty. Signed-off-by: Daniel Bowder --- www/manager6/qemu/ProcessorEdit.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/www/manager6/qemu/ProcessorEdit.js b/www/manager6/qemu/ProcessorEdit.js index 1bed2877..42c919f2 100644 --- a/www/manager6/qemu/ProcessorEdit.js +++ b/www/manager6/qemu/ProcessorEdit.js @@ -27,6 +27,17 @@ Ext.define('PVE.qemu.ProcessorInputPanel', { values.delete = values.delete.join(','); } + if (values.affinity === undefined || + values.affinity === null || + values.affinity === '') { + if (values.delete.length > 0) { + values.delete = values.delete + ",affinity"; + } else { + values.delete = "affinity"; + } + delete values.affinity; + } + PVE.Utils.delete_if_default(values, 'cpulimit', '0', 0); PVE.Utils.delete_if_default(values, 'cpuunits', '1024', 0); @@ -180,6 +191,18 @@ Ext.define('PVE.qemu.ProcessorInputPanel', { allowBlank: true, emptyText: gettext('unlimited'), }, + { + xtype: 'textfield', + name: 'affinity', + vtype: 'CpuSet', + value: '', + fieldLabel: gettext('CPU affinity'), + allowBlank: true, + emptyText: gettext("all cores"), + bind: { + value: '{affinity}', + }, + }, ], advancedColumn2: [ -- 2.36.1