fix #3593: add js input for affinity
Adds a textfield for the affinity value. Delete that affinity value when the textbox is empty. Signed-off-by: Daniel Bowder <daniel@bowdernet.com>
This commit is contained in:
parent
8e3d93725c
commit
9599d1f02e
@ -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: [
|
||||
|
Loading…
Reference in New Issue
Block a user