* [pve-devel] [PATCH pve-manager] fix #5302: ui: vm cpu affinity displayed in hardware overview
@ 2024-10-14 12:26 Timothy Nicholson
2024-10-14 12:38 ` Dominik Csapak
0 siblings, 1 reply; 2+ messages in thread
From: Timothy Nicholson @ 2024-10-14 12:26 UTC (permalink / raw)
To: pve-devel
Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
---
www/manager6/qemu/HardwareView.js | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
index 86d5f4cf..b607265a 100644
--- a/www/manager6/qemu/HardwareView.js
+++ b/www/manager6/qemu/HardwareView.js
@@ -103,7 +103,7 @@ Ext.define('PVE.qemu.HardwareView', {
tdCls: 'pve-itype-icon-cpu',
group: 3,
defaultValue: '1',
- multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'],
+ multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits', 'affinity'],
renderer: function(value, metaData, record, rowIndex, colIndex, store, pending) {
var sockets = me.getObjectValue('sockets', 1, pending);
var model = me.getObjectValue('cpu', undefined, pending);
@@ -112,6 +112,7 @@ Ext.define('PVE.qemu.HardwareView', {
var vcpus = me.getObjectValue('vcpus', undefined, pending);
var cpulimit = me.getObjectValue('cpulimit', undefined, pending);
var cpuunits = me.getObjectValue('cpuunits', undefined, pending);
+ var cpuaffinity = me.getObjectValue('affinity', undefined, pending);
let res = Ext.String.format(
'{0} ({1} sockets, {2} cores)', sockets * cores, sockets, cores);
@@ -131,7 +132,10 @@ Ext.define('PVE.qemu.HardwareView', {
if (cpuunits) {
res += ' [cpuunits=' + cpuunits +']';
}
-
+ if (cpuaffinity) {
+ res += ' [cpuaffinity=' + cpuaffinity + ']';
+ }
+
return res;
},
},
@@ -214,6 +218,9 @@ Ext.define('PVE.qemu.HardwareView', {
ostype: {
visible: false,
},
+ affinity: {
+ visible: false,
+ },
};
PVE.Utils.forEachBus(undefined, function(type, id) {
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [pve-devel] [PATCH pve-manager] fix #5302: ui: vm cpu affinity displayed in hardware overview
2024-10-14 12:26 [pve-devel] [PATCH pve-manager] fix #5302: ui: vm cpu affinity displayed in hardware overview Timothy Nicholson
@ 2024-10-14 12:38 ` Dominik Csapak
0 siblings, 0 replies; 2+ messages in thread
From: Dominik Csapak @ 2024-10-14 12:38 UTC (permalink / raw)
To: Proxmox VE development discussion, Timothy Nicholson
Hi,
Looks mostly good to me, aside from the indentation (as mentioned off-list)
so please send a v2 with the indentation fixed,
thanks
On 10/14/24 14:26, Timothy Nicholson wrote:
> Signed-off-by: Timothy Nicholson <t.nicholson@proxmox.com>
> ---
> www/manager6/qemu/HardwareView.js | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/www/manager6/qemu/HardwareView.js b/www/manager6/qemu/HardwareView.js
> index 86d5f4cf..b607265a 100644
> --- a/www/manager6/qemu/HardwareView.js
> +++ b/www/manager6/qemu/HardwareView.js
> @@ -103,7 +103,7 @@ Ext.define('PVE.qemu.HardwareView', {
> tdCls: 'pve-itype-icon-cpu',
> group: 3,
> defaultValue: '1',
> - multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits'],
> + multiKey: ['sockets', 'cpu', 'cores', 'numa', 'vcpus', 'cpulimit', 'cpuunits', 'affinity'],
> renderer: function(value, metaData, record, rowIndex, colIndex, store, pending) {
> var sockets = me.getObjectValue('sockets', 1, pending);
> var model = me.getObjectValue('cpu', undefined, pending);
> @@ -112,6 +112,7 @@ Ext.define('PVE.qemu.HardwareView', {
> var vcpus = me.getObjectValue('vcpus', undefined, pending);
> var cpulimit = me.getObjectValue('cpulimit', undefined, pending);
> var cpuunits = me.getObjectValue('cpuunits', undefined, pending);
> + var cpuaffinity = me.getObjectValue('affinity', undefined, pending);
>
> let res = Ext.String.format(
> '{0} ({1} sockets, {2} cores)', sockets * cores, sockets, cores);
> @@ -131,7 +132,10 @@ Ext.define('PVE.qemu.HardwareView', {
> if (cpuunits) {
> res += ' [cpuunits=' + cpuunits +']';
> }
> -
> + if (cpuaffinity) {
> + res += ' [cpuaffinity=' + cpuaffinity + ']';
> + }
> +
> return res;
> },
> },
> @@ -214,6 +218,9 @@ Ext.define('PVE.qemu.HardwareView', {
> ostype: {
> visible: false,
> },
> + affinity: {
> + visible: false,
> + },
> };
>
> PVE.Utils.forEachBus(undefined, function(type, id) {
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-14 12:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 12:26 [pve-devel] [PATCH pve-manager] fix #5302: ui: vm cpu affinity displayed in hardware overview Timothy Nicholson
2024-10-14 12:38 ` Dominik Csapak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox