]> git.proxmox.com Git - pve-manager.git/blob - www/manager5/data/ObjectStore.js
update build infrastucture to be able to develop with Ext6
[pve-manager.git] / www / manager5 / data / ObjectStore.js
1 /* This store encapsulates data items which are organized as an Array of key-values Objects
2 * ie data[0] contains something like {key: "keyboard", value: "da"}
3 *
4 * Designed to work with the KeyValue model and the JsonObject data reader
5 */
6 Ext.define('PVE.data.ObjectStore', {
7 extend: 'PVE.data.UpdateStore',
8
9 constructor: function(config) {
10 var me = this;
11
12 config = config || {};
13
14 if (!config.storeid) {
15 config.storeid = 'pve-store-' + (++Ext.idSeed);
16 }
17
18 Ext.applyIf(config, {
19 model: 'KeyValue',
20 proxy: {
21 type: 'pve',
22 url: config.url,
23 extraParams: config.extraParams,
24 reader: {
25 type: 'jsonobject',
26 rows: config.rows,
27 readArray: config.readArray,
28 rootProperty: config.root || 'data'
29 }
30 }
31 });
32
33 me.callParent([config]);
34 }
35 });