]>
git.proxmox.com Git - pve-manager.git/blob - www/manager/qemu/ProcessorEdit.js
bec77d9eb26cb0974503b3136179632800ac3355
1 Ext
.define('PVE.qemu.ProcessorInputPanel', {
2 extend
: 'PVE.panel.InputPanel',
3 alias
: 'widget.PVE.qemu.ProcessorInputPanel',
5 onGetValues: function(values
) {
7 me
.cpu
.cputype
= values
['cputype'];
9 cpu
: PVE
.Parser
.printQemuCpu(me
.cpu
)
13 initComponent : function() {
23 fieldLabel
: gettext('Sockets'),
26 change: function(f
, value
) {
27 var sockets
= me
.down('field[name=sockets]').getValue();
28 var cores
= me
.down('field[name=cores]').getValue();
29 me
.down('field[name=totalcores]').setValue(sockets
*cores
);
39 fieldLabel
: gettext('Cores'),
42 change: function(f
, value
) {
43 var sockets
= me
.down('field[name=sockets]').getValue();
44 var cores
= me
.down('field[name=cores]').getValue();
45 me
.down('field[name=totalcores]').setValue(sockets
*cores
);
51 fieldLabel
: gettext('Enable numa'),
61 xtype
: 'CPUModelSelector',
64 fieldLabel
: gettext('Type')
67 xtype
: 'displayfield',
68 fieldLabel
: gettext('Total cores'),
79 Ext
.define('PVE.qemu.ProcessorEdit', {
80 extend
: 'PVE.window.Edit',
82 initComponent : function() {
85 var ipanel
= Ext
.create('PVE.qemu.ProcessorInputPanel')
88 subject
: gettext('Processors'),
95 success: function(response
, options
) {
96 var value
= response
.result
.data
['cpu'];
97 var cpu
= PVE
.Parser
.parseQemuCpu(value
);
99 me
.setValues({ cputype
: cpu
.cputype
});