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

Dietmar Maurer dietmar at proxmox.com
Tue Nov 25 06:15:55 CET 2014


> 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