diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-10 14:06:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 14:06:39 +0300 |
commit | 40e26cbf38a236f3c92e50dff619b1a29bd413de (patch) | |
tree | 450026b9cda50c8cafdf3a15ce07ed3bbccfbc3c /web/app/view/Report.js | |
parent | 78f8d278276f0826eb302a08213609b083570760 (diff) | |
parent | ee5af32f8a9bc1edd7af02dfe3f243ebfdfb8641 (diff) | |
download | trackermap-server-40e26cbf38a236f3c92e50dff619b1a29bd413de.tar.gz trackermap-server-40e26cbf38a236f3c92e50dff619b1a29bd413de.tar.bz2 trackermap-server-40e26cbf38a236f3c92e50dff619b1a29bd413de.zip |
Merge pull request #2197 from Abyss777/reports_web
Initial implementation Report API for web
Diffstat (limited to 'web/app/view/Report.js')
-rw-r--r-- | web/app/view/Report.js | 63 |
1 files changed, 21 insertions, 42 deletions
diff --git a/web/app/view/Report.js b/web/app/view/Report.js index 4261b9040..7bcfdcb52 100644 --- a/web/app/view/Report.js +++ b/web/app/view/Report.js @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 2016 Anton Tananaev (anton.tananaev@gmail.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,24 @@ Ext.define('Traccar.view.Report', { ], controller: 'report', - store: 'Positions', title: Strings.reportTitle, tbar: [{ xtype: 'tbtext', + html: Strings.sharedType + }, { + xtype: 'combobox', + reference: 'reportTypeField', + store: 'ReportTypes', + displayField: 'name', + valueField: 'key', + typeAhead: true, + listeners: { + change: 'onTypeChange' + } + }, '-', { + xtype: 'tbtext', html: Strings.reportDevice }, { xtype: 'combobox', @@ -69,7 +81,12 @@ Ext.define('Traccar.view.Report', { value: new Date() }, '-', { text: Strings.reportShow, - handler: 'onShowClick' + reference: 'showButton', + handler: 'onReportClick' + }, { + text: Strings.reportCsv, + reference: 'csvButton', + handler: 'onReportClick' }, { text: Strings.reportClear, handler: 'onClearClick' @@ -77,43 +94,5 @@ Ext.define('Traccar.view.Report', { listeners: { selectionchange: 'onSelectionChange' - }, - - columns: [{ - text: Strings.positionValid, - dataIndex: 'valid', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('valid') - }, { - text: Strings.positionFixTime, - dataIndex: 'fixTime', - flex: 1, - xtype: 'datecolumn', - renderer: Traccar.AttributeFormatter.getFormatter('fixTime') - }, { - text: Strings.positionLatitude, - dataIndex: 'latitude', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('latitude') - }, { - text: Strings.positionLongitude, - dataIndex: 'longitude', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('latitude') - }, { - text: Strings.positionAltitude, - dataIndex: 'altitude', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('altitude') - }, { - text: Strings.positionSpeed, - dataIndex: 'speed', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('speed') - }, { - text: Strings.positionAddress, - dataIndex: 'address', - flex: 1, - renderer: Traccar.AttributeFormatter.getFormatter('address') - }] + } }); |