aboutsummaryrefslogtreecommitdiff
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
parenta84599dc192056639baaed4c529c8f106a499e28 (diff)
downloadtrackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.tar.gz
trackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.tar.bz2
trackermap-server-6a0f2db76a2a60679183b98720a0e48d76778d26.zip
Show devices in web interface
-rw-r--r--web/DeviceView.js29
-rw-r--r--web/Strings.js3
2 files changed, 29 insertions, 3 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 }
+ ]
});
diff --git a/web/Strings.js b/web/Strings.js
index 6d210f75b..d853a8f00 100644
--- a/web/Strings.js
+++ b/web/Strings.js
@@ -25,7 +25,8 @@ Ext.define('Strings', {
login_failed: 'Incorrect user name or password.',
device_title: 'Devices',
+ device_name: 'Name',
+ device_identifier: 'Identifier',
map_title: 'Map'
-
});