fix lxc crteate wizard
This commit is contained in:
parent
a3c6e04455
commit
f5bfe311d7
@ -160,20 +160,14 @@ Ext.define('PVE.lxc.CreateWizard', {
|
||||
]
|
||||
},
|
||||
{
|
||||
xtype: 'inputpanel',
|
||||
title: gettext('Resources'),
|
||||
items: [
|
||||
{
|
||||
xtype: 'pveLxcMemoryInputPanel',
|
||||
title: gettext('Memory'),
|
||||
insideWizard: true
|
||||
},
|
||||
{
|
||||
xtype: 'pveLxcCPUInputPanel',
|
||||
title: gettext('CPU'),
|
||||
insideWizard: true
|
||||
}
|
||||
]
|
||||
xtype: 'pveLxcCPUInputPanel',
|
||||
title: gettext('CPU'),
|
||||
insideWizard: true
|
||||
},
|
||||
{
|
||||
xtype: 'pveLxcMemoryInputPanel',
|
||||
title: gettext('Memory'),
|
||||
insideWizard: true
|
||||
},
|
||||
networkpanel,
|
||||
{
|
||||
|
@ -44,32 +44,35 @@ Ext.define('PVE.lxc.CPUInputPanel', {
|
||||
initComponent : function() {
|
||||
var me = this;
|
||||
|
||||
Ext.apply(me, {
|
||||
subject: gettext('CPU'),
|
||||
items: [
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'cpulimit',
|
||||
minValue: 0,
|
||||
value: '1',
|
||||
step: 1,
|
||||
fieldLabel: gettext('CPU limit'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'cpuunits',
|
||||
fieldLabel: gettext('CPU units'),
|
||||
value: 1024,
|
||||
minValue: 8,
|
||||
maxValue: 500000,
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
}
|
||||
]
|
||||
});
|
||||
var items = [
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'cpulimit',
|
||||
minValue: 0,
|
||||
value: '1',
|
||||
step: 1,
|
||||
fieldLabel: gettext('CPU limit'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'cpuunits',
|
||||
fieldLabel: gettext('CPU units'),
|
||||
value: 1024,
|
||||
minValue: 8,
|
||||
maxValue: 500000,
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
}
|
||||
];
|
||||
|
||||
if (me.insideWizard) {
|
||||
me.column1 = items;
|
||||
} else {
|
||||
me.items = items;
|
||||
}
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
||||
@ -83,34 +86,37 @@ Ext.define('PVE.lxc.MemoryInputPanel', {
|
||||
initComponent : function() {
|
||||
var me = this;
|
||||
|
||||
Ext.apply(me, {
|
||||
subject: gettext('Memory'),
|
||||
items: [
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'memory',
|
||||
minValue: 32,
|
||||
maxValue: 512*1024,
|
||||
value: '512',
|
||||
step: 32,
|
||||
fieldLabel: gettext('Memory (MB)'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'swap',
|
||||
minValue: 0,
|
||||
maxValue: 128*1024,
|
||||
value: '512',
|
||||
step: 32,
|
||||
fieldLabel: gettext('Swap (MB)'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
}
|
||||
]
|
||||
});
|
||||
var items = [
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'memory',
|
||||
minValue: 32,
|
||||
maxValue: 512*1024,
|
||||
value: '512',
|
||||
step: 32,
|
||||
fieldLabel: gettext('Memory (MB)'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype: 'numberfield',
|
||||
name: 'swap',
|
||||
minValue: 0,
|
||||
maxValue: 128*1024,
|
||||
value: '512',
|
||||
step: 32,
|
||||
fieldLabel: gettext('Swap (MB)'),
|
||||
labelWidth: labelWidth,
|
||||
allowBlank: false
|
||||
}
|
||||
];
|
||||
|
||||
if (me.insideWizard) {
|
||||
me.column1 = items;
|
||||
} else {
|
||||
me.items = items;
|
||||
}
|
||||
|
||||
me.callParent();
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user