From a32c09e62d98be5c375b267d91eacddac1c610ba Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 11 Sep 2017 12:32:12 +0200 Subject: [PATCH] add RBL statistics --- js/Makefile | 1 + js/NavigationTree.js | 7 +++++++ js/RBLStatistics.js | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 js/RBLStatistics.js diff --git a/js/Makefile b/js/Makefile index 9d1cbf3..66f1b1d 100644 --- a/js/Makefile +++ b/js/Makefile @@ -60,6 +60,7 @@ JSSRC= \ VirusCharts.js \ SpamScoreDistribution.js \ GeneralMailStatistics.js \ + RBLStatistics.js \ DomainStatistics.js \ SenderStatistics.js \ ReceiverStatistics.js \ diff --git a/js/NavigationTree.js b/js/NavigationTree.js index e461a89..8aacfb9 100644 --- a/js/NavigationTree.js +++ b/js/NavigationTree.js @@ -142,6 +142,13 @@ Ext.define('PMG.store.NavigationStore', { border: false, leaf: true }, + { + text: gettext('RBL'), + iconCls: 'fa fa-line-chart', + path: 'pmgRBLStatistics', + border: false, + leaf: true + }, { text: gettext('Domain'), iconCls: 'fa fa-table', diff --git a/js/RBLStatistics.js b/js/RBLStatistics.js new file mode 100644 index 0000000..e19c41d --- /dev/null +++ b/js/RBLStatistics.js @@ -0,0 +1,33 @@ +Ext.define('PMG.RBLStatistics', { + extend: 'Ext.panel.Panel', + xtype: 'pmgRBLStatistics', + + scrollable: true, + + bodyPadding: '10 0 10 10', + + title: gettext('Statistics') + ': ' + gettext('RBL rejects'), + + tbar: [ { xtype: 'pmgStatTimeSelector' } ], + + items: [ + { + title: gettext('RBL rejects'), + xtype: 'proxmoxRRDChart', + legend: false, + fields: [ 'count' ], + fieldTitles: [ + gettext('RBL rejects'), + ], + store: { + type: 'pmgStatStore', + includeTimeSpan: true, + staturl: "/api2/json/statistics/rblcount", + fields: [ + { type: 'integer', name: 'count' }, + { type: 'date', dateFormat: 'timestamp', name: 'time' } + ] + } + } + ] +});