all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Bowder <daniel@bowdernet.com>
To: pve-devel@lists.proxmox.com
Cc: Daniel Bowder <daniel@bowdernet.com>
Subject: [pve-devel] [PATCH v2 pve-manager 4/4] fix #3593: add js input for affinity
Date: Thu, 30 Jun 2022 17:09:48 -0700	[thread overview]
Message-ID: <20220701000948.148496-5-daniel@bowdernet.com> (raw)
In-Reply-To: <20220701000948.148496-1-daniel@bowdernet.com>

Adds a textfield for the affinity value. Delete that affinity value
when the textbox is empty.

Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
---
 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




  parent reply	other threads:[~2022-07-01  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  0:09 [pve-devel] [PATCH SERIES v2 manager/docs/widget-toolkit/qemu-server 0/4] fix #3593 Daniel Bowder
2022-07-01  0:09 ` [pve-devel] [PATCH v2 qemu-server 1/4] fix #3593: add affinity to qemu Daniel Bowder
2022-07-01  0:09 ` [pve-devel] [PATCH v2 pve-docs 2/4] fix #3593: add affinity to docs Daniel Bowder
2022-07-01  0:09 ` [pve-devel] [PATCH v2 proxmox-widget-toolkit 3/4] fix #3593: add CpuSet type to js Daniel Bowder
2022-07-01  0:09 ` Daniel Bowder [this message]
2022-11-10  9:57 ` [pve-devel] applied-series: [PATCH SERIES v2 manager/docs/widget-toolkit/qemu-server 0/4] fix #3593 Wolfgang Bumiller

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=20220701000948.148496-5-daniel@bowdernet.com \
    --to=daniel@bowdernet.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal