2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00
fhem-mirror/fhem/www/frontend/app/store/TableDataStore.js
johannnes e9ec74a1f1 initial upload of new Javascript Frontend based on ExtJS (by Johannes)
- contains ExtJS Library 4.1.1a, together with css and images
  - is related to the module 93_DbLog.pm, which holds some functions used by the frontend

git-svn-id: https://svn.fhem.de/fhem/trunk@2767 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2013-02-19 18:54:42 +00:00

30 lines
1.0 KiB
JavaScript

/**
* Store for the TableData from Database
*/
Ext.define('FHEM.store.TableDataStore', {
extend: 'Ext.data.Store',
model: 'FHEM.model.TableDataModel',
buffered: true,
trailingBufferZone: 200,
leadingBufferZone: 200,
//remoteGroup: true,
pageSize: 200,
proxy: {
type: 'ajax',
method: 'POST',
url: '../../../fhem?cmd=get+' + FHEM.dblogname + '+-+webchart+""+""+""+getTableData+""+""+""+0+100&XHR=1',
reader: {
type: 'json',
root: 'data',
totalProperty: 'totalCount'
}
},
autoLoad: true,
listeners: {
beforeprefetch: function(store, operation) {
//override stores url to contain start and limit params in our needed notation
store.proxy.url = '../../../fhem?cmd=get+' + FHEM.dblogname + '+-+webchart+""+""+""';
store.proxy.url += '+getTableData+""+""+""+' + operation.start +'+' + operation.limit +'&XHR=1';
}
}
});