Submit pool if non-empty in lxc CreateWizard

The lxc CreateWizard ignores the pool setting. That makes creating
containers impossible for users who are restricted to using a pool. This
patch fixes that.

Signed-off-by: Andrew Neitsch <andrew@neitsch.ca>
This commit is contained in:
Andrew Neitsch 2018-07-02 07:46:15 -07:00 committed by Thomas Lamprecht
parent 9091a0eb12
commit 4998ae6f1f

View File

@ -69,7 +69,6 @@ Ext.define('PVE.lxc.CreateWizard', {
xtype: 'pvePoolSelector', xtype: 'pvePoolSelector',
fieldLabel: gettext('Resource Pool'), fieldLabel: gettext('Resource Pool'),
name: 'pool', name: 'pool',
submitValue: false,
value: '', value: '',
allowBlank: true allowBlank: true
}, },
@ -295,6 +294,10 @@ Ext.define('PVE.lxc.CreateWizard', {
delete kv.nodename; delete kv.nodename;
delete kv.tmplstorage; delete kv.tmplstorage;
if (!kv.pool.length) {
delete kv.pool;
}
if (!kv.password.length && kv['ssh-public-keys']) { if (!kv.password.length && kv['ssh-public-keys']) {
delete kv.password; delete kv.password;
} }