[pve-devel] [manager] Submit pool if non-empty in lxc CreateWizard

Andrew Neitsch andrew at neitsch.ca
Mon Jul 2 16:46:15 CEST 2018


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 at neitsch.ca>
---
 www/manager6/lxc/CreateWizard.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/www/manager6/lxc/CreateWizard.js b/www/manager6/lxc/CreateWizard.js
index a913ca0ccf6f..ea86c6aaa665 100644
--- a/www/manager6/lxc/CreateWizard.js
+++ b/www/manager6/lxc/CreateWizard.js
@@ -69,7 +69,6 @@ Ext.define('PVE.lxc.CreateWizard', {
 		    xtype: 'pvePoolSelector',
 		    fieldLabel: gettext('Resource Pool'),
 		    name: 'pool',
-		    submitValue: false,
 		    value: '',
 		    allowBlank: true
 		},
@@ -295,6 +294,10 @@ Ext.define('PVE.lxc.CreateWizard', {
 		delete kv.nodename;
 		delete kv.tmplstorage;
 
+		if (!kv.pool.length) {
+		    delete kv.pool;
+		}
+
 		if (!kv.password.length && kv['ssh-public-keys']) {
 		    delete kv.password;
 		}
-- 
2.13.0





More information about the pve-devel mailing list