diff options
author | Udo Walter | 2017-01-17 13:47:24 +0100 |
---|---|---|
committer | Udo Walter | 2017-01-17 13:47:24 +0100 |
commit | 4910fa0b9f5ca6b6063965cc516ced8d72f8be5b (patch) | |
tree | 7514244884661c4e7fc323d6d67587616237885b /modules-available/statistics_reporting/inc/getdata.inc.php | |
parent | [statistics_reporting] added cronjob for weekly report (diff) | |
download | slx-admin-4910fa0b9f5ca6b6063965cc516ced8d72f8be5b.tar.gz slx-admin-4910fa0b9f5ca6b6063965cc516ced8d72f8be5b.tar.xz slx-admin-4910fa0b9f5ca6b6063965cc516ced8d72f8be5b.zip |
[statistics_reporting] added vm name anonymization
Diffstat (limited to 'modules-available/statistics_reporting/inc/getdata.inc.php')
-rw-r--r-- | modules-available/statistics_reporting/inc/getdata.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules-available/statistics_reporting/inc/getdata.inc.php b/modules-available/statistics_reporting/inc/getdata.inc.php index 880256d6..cfb63658 100644 --- a/modules-available/statistics_reporting/inc/getdata.inc.php +++ b/modules-available/statistics_reporting/inc/getdata.inc.php @@ -84,11 +84,12 @@ class GetData // per vm - public static function perVM() { + public static function perVM($anonymize = false) { $res = Queries::getVMStatistics(self::$from, self::$to, self::$lowerTimeBound, self::$upperTimeBound); $data = array(); + $vm = $anonymize ? 'vmHash' : 'name'; while ($row = $res->fetch(PDO::FETCH_ASSOC)) { - $data[] = array('vm' => $row['name'], 'sessions' => $row['count']); + $data[] = array('vm' => $row[$vm], 'sessions' => $row['count']); } return $data; } |