aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/StatisticsController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 18:53:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2016-10-08 18:53:12 +1300
commit401ee249a4c7b0de5eeaf32d1cbee4fd0d82a7a8 (patch)
treefcc70bbaa11e4e0b683134496007bdafc1110598 /web/app/view/StatisticsController.js
parent4966403aab46912dd29b8385b6050e95c47c295f (diff)
downloadtrackermap-web-401ee249a4c7b0de5eeaf32d1cbee4fd0d82a7a8.tar.gz
trackermap-web-401ee249a4c7b0de5eeaf32d1cbee4fd0d82a7a8.tar.bz2
trackermap-web-401ee249a4c7b0de5eeaf32d1cbee4fd0d82a7a8.zip
Implement statistics report view
Diffstat (limited to 'web/app/view/StatisticsController.js')
-rw-r--r--web/app/view/StatisticsController.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/web/app/view/StatisticsController.js b/web/app/view/StatisticsController.js
new file mode 100644
index 00000000..339d8e95
--- /dev/null
+++ b/web/app/view/StatisticsController.js
@@ -0,0 +1,29 @@
+/*
+ * Copyright 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+Ext.define('Traccar.view.StatisticsController', {
+ extend: 'Ext.app.ViewController',
+ alias: 'controller.statistics',
+
+ onShowClick: function () {
+ Ext.getStore('Statistics').load({
+ params: {
+ from: this.lookupReference('fromDateField').getValue().toISOString(),
+ to: this.lookupReference('toDateField').getValue().toISOString()
+ }
+ });
+ }
+});