[pve-devel] [PATCH manager 3/3] check if storage is in the selector

Dominik Csapak d.csapak at proxmox.com
Tue Jul 11 14:39:20 CEST 2017


when having an lxc mountpoint/rootfs on a storage which does not
allow the 'rootfs' content (e.g. somebody disabled it after creating
a container there), trying to edit the mp/rootfs broke the gui

now we check if the record exists

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
this is also a very rough and simple workaround,
but again, this whole component needs to be reworked
 www/manager6/lxc/ResourceEdit.js | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/www/manager6/lxc/ResourceEdit.js b/www/manager6/lxc/ResourceEdit.js
index c2e1f181..9efb5116 100644
--- a/www/manager6/lxc/ResourceEdit.js
+++ b/www/manager6/lxc/ResourceEdit.js
@@ -400,8 +400,9 @@ Ext.define('PVE.lxc.MountPointInputPanel', {
 			return;
 		    }
 		    var rec = f.store.getById(value);
-		    if (rec.data.type === 'zfs' ||
-		        rec.data.type === 'zfspool') {
+		    if (rec &&
+			(rec.data.type === 'zfs' ||
+		        rec.data.type === 'zfspool')) {
 			me.quota.setDisabled(true);
 			me.quota.setValue(false);
 		    } else {
-- 
2.11.0





More information about the pve-devel mailing list