我定义了以下模型:
Ext.define('itfm.application.model.SystemHealth', {
extend: 'Ext.data.Model',
fields: [
{name: 'module', type: 'systemModule'},
{name: 'status', type: 'SystemModuleStatus'},
{name: 'lastRun', type: 'long'},
{name: 'lastSuccessfulRun', type: 'long'},
{name: 'nextRun' , type: 'long'},
{name: 'numberOfMinutes', type :'int'},
{name: 'moduleIdentifier' , type : 'string'},
{name: 'duration' , type: 'long'}
]
});
我希望从服务器收到的数据是:
{
"moduleStatusList": [
{
"module": 2,
"status": 0,
"lastRun": 1373368689143,
"lastSuccessfulRun": 1373368689143,
"nextRun": 1373378686392,
"numberOfMinutes": 159
}
]
}
我正在添加商店:
Ext.define('itfm.application.store.SystemHealth',
{ extend: 'Ext.data.Store', proxy: { autoLoad: true, type: 'rest', reader: { type: 'json' }, api: { read: 'rest/system-health' } } })