diff options
-rw-r--r-- | web/DeviceView.js | 29 | ||||
-rw-r--r-- | web/Strings.js | 3 |
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' - }); |