diff options
author | Udo Walter | 2016-12-22 16:10:13 +0100 |
---|---|---|
committer | Udo Walter | 2016-12-22 16:10:13 +0100 |
commit | 2ab12fa0ce5fe4c916d5426e05656e61b4005b1e (patch) | |
tree | fb97affc5cb7a91b18ae847286af18e06a68e06c /modules-available/statistics_reporting/page.inc.php | |
parent | [statistics_reporting] performance improvements (diff) | |
download | slx-admin-2ab12fa0ce5fe4c916d5426e05656e61b4005b1e.tar.gz slx-admin-2ab12fa0ce5fe4c916d5426e05656e61b4005b1e.tar.xz slx-admin-2ab12fa0ce5fe4c916d5426e05656e61b4005b1e.zip |
[statistics_reporting] changed cutoffs
Diffstat (limited to 'modules-available/statistics_reporting/page.inc.php')
-rw-r--r-- | modules-available/statistics_reporting/page.inc.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index f0f56e87..a55ba33f 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -24,8 +24,7 @@ class Page_Statistics_Reporting extends Page { // timespan you want to see = Days selected * seconds per Day (86400) // default = 14 days - $cutOff = Request::get('cutoff', 14, 'int'); - $cutOffTimer = $cutOff * 86400; + $cutOff = Request::get('cutoff', 14, 'int') - 1; $lowerTimeBound = Request::get('lower', 0, 'int'); @@ -33,17 +32,17 @@ class Page_Statistics_Reporting extends Page // total time online, average time online, total number of logins - $res = StatisticReporting::getOverallStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getOverallStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $row = $res->fetch(PDO::FETCH_NUM); $data = array('time' => StatisticReporting::formatSeconds($row[0]), 'medianTime' => StatisticReporting::formatSeconds(StatisticReporting::calcMedian($row[1])), 'sessions' => $row[2], 'shortSessions' => $row[3]); //total time offline - $res = StatisticReporting::getTotalOfflineStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getTotalOfflineStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $row = $res->fetch(PDO::FETCH_NUM); $data = array_merge($data, array('totalOfftime' => StatisticReporting::formatSeconds($row[0]))); // per location - $res = StatisticReporting::getLocationStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getLocationStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $data[] = array('perLocation' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { $median = StatisticReporting::calcMedian(StatisticReporting::calcMedian($row[2])); @@ -52,7 +51,7 @@ class Page_Statistics_Reporting extends Page } // per client - $res = StatisticReporting::getClientStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getClientStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $data[] = array('perClient' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { $median = StatisticReporting::calcMedian(StatisticReporting::calcMedian($row[2])); @@ -62,14 +61,14 @@ class Page_Statistics_Reporting extends Page } // per user - $res = StatisticReporting::getUserStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getUserStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $data[] = array('perUser' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { $data['perUser'][] = array('user' => $row[0], 'sessions' => $row[1]); } // per vm - $res = StatisticReporting::getVMStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); + $res = StatisticReporting::getVMStatistics($cutOff, $lowerTimeBound, $upperTimeBound); $data[] = array('perVM' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { $data['perVM'][] = array('vm' => $row[0], 'sessions' => $row[1]); |