aboutsummaryrefslogtreecommitdiff
path: root/web/DeviceView.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-04-25 13:54:42 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-04-25 13:54:42 +1200
commit6a0f2db76a2a60679183b98720a0e48d76778d26 (patch)
tree66a79f1fe157c3c657fced22cbb117436ef2c7c6 /web/DeviceView.js
parenta84599dc192056639baaed4c529c8f106a499e28 (diff)
downloadtrackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.tar.gz
trackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.tar.bz2
trackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.zip
Show devices in web interface
Diffstat (limited to 'web/DeviceView.js')
-rw-r--r--web/DeviceView.js29
1 files changed, 27 insertions, 2 deletions
diff --git a/web/DeviceView.js b/web/DeviceView.js
index 6d475e406..a99e20fd4 100644
--- a/web/DeviceView.js
+++ b/web/DeviceView.js
@@ -15,8 +15,33 @@
*/
Ext.define('DeviceView', {
- extend: 'Ext.form.Panel',
+ extend: 'Ext.grid.Panel',
xtype: 'device-view',
- title: Strings.device_title
+ title: Strings.device_title,
+
+ store: {
+ proxy: {
+ type: 'ajax',
+ url: '/api/device',
+ reader: {
+ type: 'json',
+ rootProperty: 'data'
+ }
+ },
+ autoLoad: true,
+
+ fields:[
+ 'id',
+ 'name',
+ 'unique_id',
+ 'position_id',
+ 'data_id'
+ ]
+ },
+
+ columns: [
+ { text: Strings.device_name, dataIndex: 'name', flex: 1 },
+ { text: Strings.device_identifier, dataIndex: 'unique_id', flex: 1 }
+ ]
});