gui: add system panel to the vm creation wizard
for this we have to adapt the scsiController logic slightly, so that the ostype change sets the viewmodel, which in turn changes the bound fields (one one the system tab, and the displayfield on the hd tab) Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
4446b5caab
commit
cf7ed2b571
@ -6,7 +6,10 @@ Ext.define('PVE.qemu.CreateWizard', {
|
||||
|
||||
viewModel: {
|
||||
data: {
|
||||
nodename: ''
|
||||
nodename: '',
|
||||
current: {
|
||||
scsihw: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -70,14 +73,6 @@ Ext.define('PVE.qemu.CreateWizard', {
|
||||
defaultValue: 0,
|
||||
deleteDefaultValue: true,
|
||||
fieldLabel: gettext('Start at boot')
|
||||
},
|
||||
{
|
||||
xtype: 'proxmoxcheckbox',
|
||||
name: 'agent',
|
||||
uncheckedValue: 0,
|
||||
defaultValue: 0,
|
||||
deleteDefaultValue: true,
|
||||
fieldLabel: gettext('Qemu Agent')
|
||||
}
|
||||
],
|
||||
advancedColumn2: [
|
||||
@ -154,6 +149,12 @@ Ext.define('PVE.qemu.CreateWizard', {
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
xtype: 'pveQemuSystemPanel',
|
||||
title: gettext('System'),
|
||||
isCreate: true,
|
||||
insideWizard: true
|
||||
},
|
||||
{
|
||||
xtype: 'pveQemuHDInputPanel',
|
||||
bind: {
|
||||
|
@ -106,10 +106,6 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
delete me.drive.cache;
|
||||
}
|
||||
|
||||
if (values.scsihw) {
|
||||
params.scsihw = values.scsihw;
|
||||
}
|
||||
|
||||
var names = ['mbps_rd', 'mbps_wr', 'iops_rd', 'iops_wr'];
|
||||
Ext.Array.each(names, function(name) {
|
||||
if (values[name]) {
|
||||
@ -210,12 +206,13 @@ Ext.define('PVE.qemu.HDInputPanel', {
|
||||
me.column1.push(me.bussel);
|
||||
|
||||
me.scsiController = Ext.create('Ext.form.field.Display', {
|
||||
name: 'scsihw',
|
||||
fieldLabel: gettext('SCSI Controller'),
|
||||
reference: 'scsiController',
|
||||
bind: me.insideWizard ? {
|
||||
value: '{current.scsihw}'
|
||||
} : undefined,
|
||||
renderer: PVE.Utils.render_scsihw,
|
||||
// do not change a VM wide option after creation
|
||||
submitValue: me.insideWizard,
|
||||
submitValue: false,
|
||||
hidden: true
|
||||
});
|
||||
me.column1.push(me.scsiController);
|
||||
|
@ -27,7 +27,8 @@ Ext.define('PVE.qemu.OSTypeInputPanel', {
|
||||
|
||||
me.setWidget('pveBusSelector', targetValues.busType);
|
||||
me.setWidget('pveNetworkCardSelector', targetValues.networkCard);
|
||||
me.setWidget('field[name=scsihw]', targetValues.scsihw);
|
||||
var scsihw = targetValues.scsihw || '__default__';
|
||||
this.getViewModel().set('current.scsihw', scsihw);
|
||||
},
|
||||
setWidget: function(widget, newValue) {
|
||||
// changing a widget is safe only if ComponentQuery.query returns us
|
||||
|
Loading…
x
Reference in New Issue
Block a user