[pve-devel] [PATCH manager 3/7] ui: dc/ACMEClusterView: use a diff/update store combo for the grids

Dominik Csapak d.csapak at proxmox.com
Thu May 7 13:38:07 CEST 2020



On 5/7/20 1:08 PM, Thomas Lamprecht wrote:
> On 5/7/20 10:27 AM, Dominik Csapak wrote:
>> so that they are get automatically reloaded with the default interval (3seconds)
>>
>> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
>> ---
>> this patch needs the widget-toolkit patches applied
>> we can of course leave those out, and to it manually in initComponent,
>> but this is a pattern we often use and maybe we can remove more manually
>> crated rstore/diffstore combos in other places
> 
> hmm, I now get a short glitch off "No accounts configured" shown when adding
> a second or removing a second account.

yes i see that, but its only tangentially related to this patch.
we load the wrong store on 'reload' (the diff instead of the 
updatestore; which does not work)
can send a v2 of this or a follow-up, up to you

also noticed that on account removal we need to show a 
taskprogress/viewer since it is not synchronous

> 
> Semi-related, if an account with "default" already exists it would be great
> if the emptyText gets dropped and the field gets required, as a second account
> with "default" cannot be added anyway, but rather minor nit..

ok sounds reasonable

> 
>>
>>   www/manager6/dc/ACMEClusterView.js | 24 +++++++++++++++++++-----
>>   1 file changed, 19 insertions(+), 5 deletions(-)
>>
>> diff --git a/www/manager6/dc/ACMEClusterView.js b/www/manager6/dc/ACMEClusterView.js
>> index 228d1cf9..00db8e9f 100644
>> --- a/www/manager6/dc/ACMEClusterView.js
>> +++ b/www/manager6/dc/ACMEClusterView.js
>> @@ -90,8 +90,15 @@ Ext.define('PVE.dc.ACMEAccountView', {
>>       },
>>   
>>       store: {
>> -	model: 'pve-acme-accounts',
>> -	autoLoad: true,
>> +	type: 'diff',
>> +	autoDestroy: true,
>> +	autoDestroyRstore: true,
>> +	rstore: {
>> +	    type: 'update',
>> +	    storeid: 'pve-acme-accounts',
>> +	    model: 'pve-acme-accounts',
>> +	    autoStart: true,
>> +	},
>>   	sorters: 'name',
>>       },
>>   });
>> @@ -179,9 +186,16 @@ Ext.define('PVE.dc.ACMEPluginView', {
>>       },
>>   
>>       store: {
>> -	model: 'pve-acme-plugins',
>> -	autoLoad: true,
>> -	filters: item => !!item.data.api,
>> +	type: 'diff',
>> +	autoDestroy: true,
>> +	autoDestroyRstore: true,
>> +	rstore: {
>> +	    type: 'update',
>> +	    storeid: 'pve-acme-plugins',
>> +	    model: 'pve-acme-plugins',
>> +	    autoStart: true,
>> +	    filters: item => !!item.data.api,
>> +	},
>>   	sorters: 'plugin',
>>       },
>>   });
>>
> 




More information about the pve-devel mailing list