[pve-devel] [PATCH v4 14/14] implement API/CLI to get pending changes

Alexandre DERUMIER aderumier at odiso.com
Tue Nov 25 07:56:02 CET 2014


>>ExtJS always use arrays for datastores. We even have an extra helper class to convert 
>>object back into array suitable to Extjs datastores (ObjectStore, PVE.data.reader.JsonObject). 

Ah,ok ,didn't known. (currently /config api don't return an array, that why I thinked it was wrong)


>>As you see, Ext.data.Store works directly with arrays. So what exactly is the problem? 

I don't known why, but I can't fill the datastore with a simple model like

    Ext.define('pendingconf', {
        extend: "Ext.data.Model",
        fields: [ 'key', 'value', 'pending', 'delete' ],
        idProperty: 'key'
    });


But maybe this is because of (ObjectStore, PVE.data.reader.JsonObject) ?


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mardi 25 Novembre 2014 06:15:55 
Objet: RE: [pve-devel] [PATCH v4 14/14] implement API/CLI to get pending changes 


> But I don't known how to do, because it's return an array of object, and not an 
> object directly like for config api. 

ExtJS always use arrays for datastores. We even have an extra helper class to convert 
object back into array suitable to Extjs datastores (ObjectStore, PVE.data.reader.JsonObject). 

Here is a example for extjs: 

Ext.create('Ext.data.Store', { 
model: 'User', 
data : [ 
{firstName: 'Ed', lastName: 'Spencer'}, 
{firstName: 'Tommy', lastName: 'Maintz'}, 
{firstName: 'Aaron', lastName: 'Conran'}, 
{firstName: 'Jamie', lastName: 'Avins'} 
] 
}); 

As you see, Ext.data.Store works directly with arrays. So what exactly is the problem? 



More information about the pve-devel mailing list