From 3a2dae96362b1187ae4b9d89904d23b6a7da87cb Mon Sep 17 00:00:00 2001 From: Udo Walter Date: Thu, 22 Dec 2016 15:08:36 +0100 Subject: [statistics_reporting] added short sessions to ui --- .../lang/de/template-tags.json | 3 ++- .../lang/en/template-tags.json | 3 ++- .../statistics_reporting/page.inc.php | 10 ++++----- .../statistics_reporting/templates/_page.html | 26 +++++++++++++--------- .../templates/columnChooser.html | 3 ++- 5 files changed, 27 insertions(+), 18 deletions(-) (limited to 'modules-available/statistics_reporting') diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json index c5494205..68b68250 100644 --- a/modules-available/statistics_reporting/lang/de/template-tags.json +++ b/modules-available/statistics_reporting/lang/de/template-tags.json @@ -3,7 +3,8 @@ "lang_countLogins": "Anzahl Logins", "lang_client": "Client", "lang_vm": "VM", - "lang_totalLogins": "Gesamt Logins", + "lang_sessions": "Sitzungen \u2265 60s", + "lang_shortSessions": "Sitzungen < 60s", "lang_overallOfftime": "Insgesamte Zeit Offline", "lang_totalOffTime": "Gesamtzeit Offline", "lang_clientLogout": "Letzter VM Logout", diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json index de91621f..b9e0c61d 100644 --- a/modules-available/statistics_reporting/lang/en/template-tags.json +++ b/modules-available/statistics_reporting/lang/en/template-tags.json @@ -3,7 +3,8 @@ "lang_countLogins": "Number of Logins", "lang_client": "Client", "lang_vm": "VM", - "lang_totalLogins": "Total Logins", + "lang_sessions": "Sessions \u2265 60s", + "lang_shortSessions": "Sessions < 60s", "lang_overallOfftime": "Overall time offline", "lang_totalOffTime": "Total Time Offline", "lang_clientLogout": "Last VM Logout", diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php index de13cdb3..f0f56e87 100644 --- a/modules-available/statistics_reporting/page.inc.php +++ b/modules-available/statistics_reporting/page.inc.php @@ -35,7 +35,7 @@ class Page_Statistics_Reporting extends Page // total time online, average time online, total number of logins $res = StatisticReporting::getOverallStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); $row = $res->fetch(PDO::FETCH_NUM); - $data = array('time' => StatisticReporting::formatSeconds($row[0]), 'medianTime' => StatisticReporting::formatSeconds(StatisticReporting::calcMedian($row[1])), 'totalLogins' => $row[2], 'shortSessions' => $row[3]); + $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); @@ -48,7 +48,7 @@ class Page_Statistics_Reporting extends Page while ($row = $res->fetch(PDO::FETCH_NUM)) { $median = StatisticReporting::calcMedian(StatisticReporting::calcMedian($row[2])); $data['perLocation'][] = array('location' => $row[0], 'time' => StatisticReporting::formatSeconds($row[1]), 'timeInSeconds' => $row[1], - 'medianTime' => StatisticReporting::formatSeconds($median), 'medianTimeInSeconds' => $median, 'offTime' => StatisticReporting::formatSeconds($row[3]), 'offlineTimeInSeconds' => $row[3], 'loginCount' => $row[4], 'shortSessions' => $row[5]); + 'medianTime' => StatisticReporting::formatSeconds($median), 'medianTimeInSeconds' => $median, 'offTime' => StatisticReporting::formatSeconds($row[3]), 'offlineTimeInSeconds' => $row[3], 'sessions' => $row[4], 'shortSessions' => $row[5]); } // per client @@ -57,7 +57,7 @@ class Page_Statistics_Reporting extends Page while ($row = $res->fetch(PDO::FETCH_NUM)) { $median = StatisticReporting::calcMedian(StatisticReporting::calcMedian($row[2])); $data['perClient'][] = array('hostname' => $row[0], 'time' => StatisticReporting::formatSeconds($row[1]), 'timeInSeconds' => $row[1], - 'medianTime' => StatisticReporting::formatSeconds($median), 'medianTimeInSeconds' => $median, 'offTime' => StatisticReporting::formatSeconds($row[3]), 'offlineTimeInSeconds' => $row[3], 'loginCount' => $row[4], + 'medianTime' => StatisticReporting::formatSeconds($median), 'medianTimeInSeconds' => $median, 'offTime' => StatisticReporting::formatSeconds($row[3]), 'offlineTimeInSeconds' => $row[3], 'sessions' => $row[4], 'lastLogout' => date(DATE_RSS,$row[5]), 'lastLogoutUnixtime' => $row[5], 'lastStart' => date(DATE_RSS,$row[6]), 'lastStartUnixtime' => $row[6], 'shortSessions' => $row[7]); } @@ -65,14 +65,14 @@ class Page_Statistics_Reporting extends Page $res = StatisticReporting::getUserStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); $data[] = array('perUser' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { - $data['perUser'][] = array('user' => $row[0], 'loginCount' => $row[1]); + $data['perUser'][] = array('user' => $row[0], 'sessions' => $row[1]); } // per vm $res = StatisticReporting::getVMStatistics($cutOffTimer, $lowerTimeBound, $upperTimeBound); $data[] = array('perVM' => array()); while ($row = $res->fetch(PDO::FETCH_NUM)) { - $data['perVM'][] = array('vm' => $row[0], 'loginCount' => $row[1]); + $data['perVM'][] = array('vm' => $row[0], 'sessions' => $row[1]); } Render::addTemplate('columnChooser'); diff --git a/modules-available/statistics_reporting/templates/_page.html b/modules-available/statistics_reporting/templates/_page.html index 7cfb424c..d2aaecde 100644 --- a/modules-available/statistics_reporting/templates/_page.html +++ b/modules-available/statistics_reporting/templates/_page.html @@ -7,7 +7,8 @@ {{lang_totalTime}} {{lang_medianSessionLength}} - {{lang_totalLogins}} + {{lang_sessions}} + {{lang_shortSessions}} {{lang_overallOfftime}} @@ -16,7 +17,8 @@ {{lang_total}} {{time}} {{medianTime}} - {{totalLogins}} + {{sessions}} + {{shortSessions}} {{totalOfftime}} @@ -31,7 +33,8 @@ {{lang_location}} {{lang_totalTime}} {{lang_medianSessionLength}} - {{lang_totalLogins}} + {{lang_sessions}} + {{lang_shortSessions}} {{lang_totalOffTime}} @@ -41,7 +44,8 @@ {{location}} {{time}} {{medianTime}} - {{loginCount}} + {{sessions}} + {{shortSessions}} {{offTime}} {{/perLocation}} @@ -57,7 +61,8 @@ {{lang_hostname}} {{lang_totalTime}} {{lang_medianSessionLength}} - {{lang_totalLogins}} + {{lang_sessions}} + {{lang_shortSessions}} {{lang_totalOffTime}} {{lang_clientLogout}} {{lang_clientStart}} @@ -69,7 +74,8 @@ {{hostname}} {{time}} {{medianTime}} - {{loginCount}} + {{sessions}} + {{shortSessions}} {{offTime}} {{lastLogout}} {{lastStart}} @@ -85,14 +91,14 @@ {{lang_user}} - {{lang_totalLogins}} + {{lang_sessions}} {{#perUser}} {{user}} - {{loginCount}} + {{sessions}} {{/perUser}} @@ -105,14 +111,14 @@ {{lang_vm}} - {{lang_totalLogins}} + {{lang_sessions}} {{#perVM}} {{vm}} - {{loginCount}} + {{sessions}} {{/perVM}} diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html index d79f542b..49c9a75d 100644 --- a/modules-available/statistics_reporting/templates/columnChooser.html +++ b/modules-available/statistics_reporting/templates/columnChooser.html @@ -26,7 +26,8 @@
- + + -- cgit v1.2.3-55-g7522