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

Dominik Csapak d.csapak at proxmox.com
Thu Jul 13 08:52:26 CEST 2017


On 07/13/2017 06:41 AM, Dietmar Maurer wrote:
>> 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 {
>> --
>
> But we use rec afterwards:
>
> 		    if (rec.data.type === 'iscsi') {
>
> Above check would also help here?
>

but we have the following in between:

if (me.unused || !me.isCreate) {
	return;
}

so we only go further if we create a new mp,
in which case we can only choose an existing/valid storage?

as i already mentioned, this whole inputpanel needs to be
redone, the code is not well structured, has lots of side effects
and workarounds




More information about the pve-devel mailing list