From b87930137acf88936fb541f53ab4dab1697e4d03 Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Mon, 28 Nov 2016 18:27:32 +0100
Subject: new ui
---
modules-available/statistics_reporting/style.css | 3 +++
1 file changed, 3 insertions(+)
create mode 100644 modules-available/statistics_reporting/style.css
(limited to 'modules-available/statistics_reporting/style.css')
diff --git a/modules-available/statistics_reporting/style.css b/modules-available/statistics_reporting/style.css
new file mode 100644
index 00000000..f0ee4fd3
--- /dev/null
+++ b/modules-available/statistics_reporting/style.css
@@ -0,0 +1,3 @@
+.top-row {
+ margin-bottom: 20px;
+}
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From 5f9bdcdc785e465d12e29e7bf85aed41dfd3b086 Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Mon, 5 Dec 2016 15:17:55 +0100
Subject: [statistics_reporting] added sorting indicators
---
modules-available/statistics_reporting/style.css | 4 ++
.../templates/columnChooser.html | 49 ++++++++++++++--------
2 files changed, 36 insertions(+), 17 deletions(-)
(limited to 'modules-available/statistics_reporting/style.css')
diff --git a/modules-available/statistics_reporting/style.css b/modules-available/statistics_reporting/style.css
index f0ee4fd3..6cb6de51 100644
--- a/modules-available/statistics_reporting/style.css
+++ b/modules-available/statistics_reporting/style.css
@@ -1,3 +1,7 @@
.top-row {
margin-bottom: 20px;
+}
+
+.buttonbar button {
+ margin-bottom: 4px;
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 62e20a4a..ccc82a50 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -1,21 +1,21 @@
@@ -24,23 +24,38 @@
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From f616a8cc375c2228def671800be40fac2072b27b Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Tue, 20 Dec 2016 14:49:17 +0100
Subject: [statistics_reporting] added time bounds slider
---
modules-available/statistics_reporting/config.json | 2 +-
.../inc/statisticreporting.inc.php | 119 +++++++++++++++++----
.../lang/de/template-tags.json | 3 +-
.../lang/en/template-tags.json | 7 +-
modules-available/statistics_reporting/style.css | 24 ++++-
.../templates/columnChooser.html | 52 ++++++++-
6 files changed, 175 insertions(+), 32 deletions(-)
(limited to 'modules-available/statistics_reporting/style.css')
diff --git a/modules-available/statistics_reporting/config.json b/modules-available/statistics_reporting/config.json
index 8115acf2..1a9c7fe7 100644
--- a/modules-available/statistics_reporting/config.json
+++ b/modules-available/statistics_reporting/config.json
@@ -1,4 +1,4 @@
{
"category": "main.content",
- "dependencies": [ "js_stupidtable"]
+ "dependencies": [ "js_stupidtable", "js_jqueryui" ]
}
diff --git a/modules-available/statistics_reporting/inc/statisticreporting.inc.php b/modules-available/statistics_reporting/inc/statisticreporting.inc.php
index 69a4d516..7652bbdc 100644
--- a/modules-available/statistics_reporting/inc/statisticreporting.inc.php
+++ b/modules-available/statistics_reporting/inc/statisticreporting.inc.php
@@ -7,14 +7,16 @@ class StatisticReporting
public static function getClientStatistics($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) {
$queryTime = time() - $cutOffTimeInSeconds;
$res = Database::simpleQuery("SELECT t1.name, timeSum, avgTime, offlineSum, loginCount, lastLogout, lastStart FROM (
- SELECT machine.hostname AS 'name', machine.machineuuid AS 'uuid', SUM(CAST(statistic.data AS UNSIGNED)) AS 'timeSum', AVG(CAST(statistic.data AS UNSIGNED)) AS 'avgTime', COUNT(*) AS 'loginCount', MAX(statistic.dateline + (statistic.data *1)) AS 'lastLogout'
- FROM statistic INNER JOIN machine ON statistic.machineuuid = machine.machineuuid
- WHERE typeid = '~session-length' AND dateline>=$queryTime AND ((FROM_UNIXTIME(dateline+statistic.data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))
+ SELECT machine.hostname AS 'name', machine.machineuuid AS 'uuid', SUM(CAST(sessionTable.length AS UNSIGNED)) AS 'timeSum', AVG(CAST(sessionTable.length AS UNSIGNED)) AS 'avgTime', COUNT(*) AS 'loginCount', MAX(sessionTable.dateline + sessionTable.data) AS 'lastLogout'
+ FROM ".self::getBoundedTableQueryString('~session-length', $lowerTimeBound, $upperTimeBound)." sessionTable
+ INNER JOIN machine ON sessionTable.machineuuid = machine.machineuuid
+ WHERE sessionTable.dateline>=$queryTime
GROUP BY machine.machineuuid
) t1 INNER JOIN (
- SELECT machine.hostname AS 'name', machine.machineuuid AS 'uuid', SUM(CAST(statistic.data AS UNSIGNED)) AS 'offlineSum', MAX(statistic.dateline) AS 'lastStart'
- FROM statistic INNER JOIN machine ON statistic.machineuuid = machine.machineuuid
- WHERE typeid = '~offline-length' AND dateline>=$queryTime AND ((FROM_UNIXTIME(dateline+statistic.data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))
+ SELECT machine.hostname AS 'name', machine.machineuuid AS 'uuid', SUM(CAST(offlineTable.length AS UNSIGNED)) AS 'offlineSum', MAX(offlineTable.dateline) AS 'lastStart'
+ FROM ".self::getBoundedTableQueryString('~offline-length', $lowerTimeBound, $upperTimeBound)." offlineTable
+ INNER JOIN machine ON offlineTable.machineuuid = machine.machineuuid
+ WHERE offlineTable.dateline>=$queryTime
GROUP BY machine.machineuuid
) t2 ON t1.uuid = t2.uuid");
return $res;
@@ -22,17 +24,20 @@ class StatisticReporting
public static function getLocationStatistics($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) {
$queryTime = time() - $cutOffTimeInSeconds;
+
$res = Database::simpleQuery("SELECT t1.locName, timeSum, avgTime, offlineSum, loginCount FROM (
- SELECT location.locationname AS 'locName', SUM(CAST(statistic.data AS UNSIGNED)) AS 'timeSum', AVG(CAST(statistic.data AS UNSIGNED)) AS 'avgTime', COUNT(*) AS 'loginCount'
- FROM statistic INNER JOIN machine ON statistic.machineuuid = machine.machineuuid
- INNER JOIN location ON machine.locationid = location.locationid
- WHERE statistic.typeid = '~session-length' AND dateline>=$queryTime AND ((FROM_UNIXTIME(dateline+statistic.data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))
+ SELECT location.locationname AS 'locName', SUM(CAST(sessionTable.length AS UNSIGNED)) AS 'timeSum', AVG(CAST(sessionTable.length AS UNSIGNED)) AS 'avgTime', COUNT(sessionTable.length) AS 'loginCount'
+ FROM ".self::getBoundedTableQueryString('~session-length', $lowerTimeBound, $upperTimeBound)." sessionTable
+ INNER JOIN machine ON sessionTable.machineuuid = machine.machineuuid
+ INNER JOIN location ON machine.locationid = location.locationid
+ WHERE sessionTable.dateline >= $queryTime
GROUP By location.locationname
) t1 INNER JOIN (
- SELECT location.locationname AS 'locName', SUM(CAST(statistic.data AS UNSIGNED)) AS 'offlineSum'
- FROM statistic INNER JOIN machine ON statistic.machineuuid = machine.machineuuid
- INNER JOIN location ON machine.locationid = location.locationid
- WHERE statistic.typeid = '~offline-length' AND dateline>=$queryTime AND ((FROM_UNIXTIME(dateline+statistic.data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))
+ SELECT location.locationname AS 'locName', SUM(CAST(offlineTable.length AS UNSIGNED)) AS 'offlineSum'
+ FROM ".self::getBoundedTableQueryString('~offline-length', $lowerTimeBound, $upperTimeBound)." offlineTable
+ INNER JOIN machine ON offlineTable.machineuuid = machine.machineuuid
+ INNER JOIN location ON machine.locationid = location.locationid
+ WHERE offlineTable.dateline >= $queryTime
GROUP By location.locationname
) t2 ON t1.locName = t2.locName");
return $res;
@@ -57,18 +62,17 @@ class StatisticReporting
// AND(betweenBounds OR
upper but begins in bound )
public static function getOverallStatistics ($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) {
$queryTime = time() - $cutOffTimeInSeconds;
- $res = Database::simpleQuery("SELECT SUM(CAST(data AS UNSIGNED)), AVG(CAST(data AS UNSIGNED)), COUNT(*) FROM statistic WHERE typeid = '~session-length' AND dateline>=$queryTime
- AND (((FROM_UNIXTIME(dateline+data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))
- )
-
- ");
+ $res = Database::simpleQuery("SELECT SUM(CAST(sessionTable.length AS UNSIGNED)), AVG(CAST(sessionTable.length AS UNSIGNED)), COUNT(*)
+ FROM ".self::getBoundedTableQueryString('~session-length', $lowerTimeBound, $upperTimeBound)." sessionTable
+ WHERE sessionTable.dateline>=$queryTime");
return $res;
}
public static function getTotalOfflineStatistics($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) {
$queryTime = time() - $cutOffTimeInSeconds;
- $res = Database::simpleQuery("SELECT SUM(CAST(data AS UNSIGNED)) FROM statistic WHERE typeid='~offline-length' AND dateline>=$queryTime
- AND ((FROM_UNIXTIME(dateline+data, '%H')*1 >= $lowerTimeBound) AND (FROM_UNIXTIME(dateline, '%H')*1 < $upperTimeBound))");
+ $res = Database::simpleQuery("SELECT SUM(CAST(offlineTable.length AS UNSIGNED))
+ FROM ".self::getBoundedTableQueryString('~offline-length', $lowerTimeBound, $upperTimeBound)." offlineTable
+ WHERE offlineTable.dateline>=$queryTime");
return $res;
}
@@ -77,4 +81,75 @@ class StatisticReporting
return intdiv($seconds, 3600*24).'d '.intdiv($seconds%(3600*24), 3600).'h '.intdiv($seconds%3600, 60).'m '.($seconds%60).'s';
}
-}
\ No newline at end of file
+
+ private static function getBoundedTableQueryString($typeid, $lowerTimeBound, $upperTimeBound)
+ {
+ $lowerFormat = "'%y-%m-%d $lowerTimeBound:00:00'";
+ $upperFormat = "'%y-%m-%d ".($upperTimeBound-1).":59:59'";
+ $queryString = "
+ select
+
+ @startLower := UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $lowerFormat)),
+ @startUpper := UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $upperFormat)),
+ @endLower := UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $lowerFormat)),
+ @endUpper := UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $upperFormat)),
+
+ (CAST(data AS SIGNED)
+ - IF(
+ dateline > @startUpper,
+ UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $lowerFormat) + INTERVAL 1 DAY) - dateline,
+ IF(
+ dateline < @startLower,
+ @startLower - dateline,
+ 0
+ )
+ )
+ - IF(
+ dateline+data > @endUpper,
+ dateline+data - (@endUpper + 1),
+ IF(
+ dateline+data < @endLower,
+ dateline+data - (UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $upperFormat) - INTERVAL 1 DAY) + 1),
+ 0
+ )
+ )
+ - ( TO_DAYS(FROM_UNIXTIME(dateline+data, '%y-%m-%d')) - TO_DAYS(FROM_UNIXTIME(dateline, '%y-%m-%d'))
+ - 2
+ + IF(dateline <= @startUpper, 1, 0)
+ + IF(dateline+data >= @endLower, 1, 0)
+ ) * ((24 - ($upperTimeBound - $lowerTimeBound)) * 3600)
+
+ - IF(
+ @leftBound := IF(dateline <= @startUpper, @startUpper, UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $upperFormat) + INTERVAL 1 DAY))
+ < @rightBound := IF(dateline+data >= @endLower, @endLower, UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $lowerFormat) - INTERVAL 1 DAY)),
+ IF(
+ @timeDiff := (
+ (date_format(from_unixtime(@leftBound), '%H') -
+ date_format(convert_tz(from_unixtime(@leftBound), @@session.time_zone, '+00:00'), '%H') + 24) % 24
+ -
+ (date_format(from_unixtime(@rightBound), '%H') -
+ date_format(convert_tz(from_unixtime(@rightBound), @@session.time_zone, '+00:00'), '%H') + 24) % 24) = 1
+ AND ($lowerTimeBound >= 2 OR $upperTimeBound <= 2),
+ 3600,
+ IF(@timeDiff = -1 AND ($lowerTimeBound >= 3 OR $upperTimeBound <= 3), -3600, 0)
+ ),
+ 0
+ )
+
+ ) as 'length',
+ dateline,
+ data,
+ machineuuid
+
+ from statistic
+ where typeid = '$typeid' and (
+ (UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $lowerFormat)) <= dateline and dateline <= UNIX_TIMESTAMP(FROM_UNIXTIME(dateline, $upperFormat))) or
+ (UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $lowerFormat)) <= dateline+data and dateline+data <= UNIX_TIMESTAMP(FROM_UNIXTIME(dateline+data, $upperFormat)))
+ )
+ ";
+ return "(".$queryString.")";
+ }
+
+
+}
+
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index 521b0607..f2500db0 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -24,5 +24,6 @@
"lang_last7": "Letzten 7 Tage",
"lang_last14": "Letzten 14 Tage",
"lang_last30": "Letzten 30 Tage",
- "lang_last90": "Letzten 90 Tage"
+ "lang_last90": "Letzten 90 Tage",
+ "lang_apply": "Anwenden"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json
index c3900e31..8fa97719 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -5,7 +5,7 @@
"lang_vm": "VM",
"lang_totalLogins": "Total Logins",
"lang_overallOfftime": "Overall time offline",
- "lang_totalOffTime": "Total time offline",
+ "lang_totalOffTime": "Total Time Offline",
"lang_clientLogout": "Last VM Logout",
"lang_clientStart": "Last Client Boot",
"lang_room": "Room",
@@ -18,11 +18,12 @@
"lang_hostname": "Client Name",
"lang_location": "Location",
"lang_avgSessionLength": "Average Session Length",
- "lang_totalTime": "Gesamte Zeit",
+ "lang_totalTime": "Total Time",
"lang_last1": "Last 24 hours",
"lang_last2": "Last 48 hours",
"lang_last7": "Last 7 days",
"lang_last14": "Last 14 days",
"lang_last30": "Last 30 days",
- "lang_last90": "Last 90 days"
+ "lang_last90": "Last 90 days",
+ "lang_apply": "Apply"
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/style.css b/modules-available/statistics_reporting/style.css
index b0875a7d..d7fa7a2f 100644
--- a/modules-available/statistics_reporting/style.css
+++ b/modules-available/statistics_reporting/style.css
@@ -2,7 +2,7 @@
margin-bottom: 10px;
}
-.top-row select, .top-row .btn-group {
+.top-row > * {
margin-right: 10px;
margin-bottom: 10px;
}
@@ -13,4 +13,26 @@
.buttonbar {
margin-bottom: 20px;
+}
+
+#slider {
+ display: inline-block;
+ width: 160px;
+ margin-left: 20px;
+ margin-bottom: 3px;
+ margin-right: 20px;
+}
+
+#lower-handle, #upper-handle {
+ width: 3em;
+ height: 1.6em;
+ top: 50%;
+ margin-top: -.8em;
+ margin-left: -1.5em;
+ text-align: center;
+ line-height: 1.6em;
+}
+
+#applybound {
+ display: none;
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 9e6f51d2..319f9702 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -8,7 +8,7 @@
-
@@ -30,7 +36,30 @@
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From 9cd078d34d5f3172e8e770fce3c3ec7d6445a460 Mon Sep 17 00:00:00 2001
From: Udo Walter
Date: Mon, 16 Jan 2017 18:59:46 +0100
Subject: [statistics_reporting] added ui to disable the reporting
---
.../lang/de/template-tags.json | 4 +-
.../lang/en/template-tags.json | 4 +-
.../statistics_reporting/page.inc.php | 45 ++++++++++++++-------
modules-available/statistics_reporting/style.css | 4 ++
.../templates/columnChooser.html | 46 +++++++++++++++++++++-
5 files changed, 85 insertions(+), 18 deletions(-)
(limited to 'modules-available/statistics_reporting/style.css')
diff --git a/modules-available/statistics_reporting/lang/de/template-tags.json b/modules-available/statistics_reporting/lang/de/template-tags.json
index 7dcec880..73c39e1e 100644
--- a/modules-available/statistics_reporting/lang/de/template-tags.json
+++ b/modules-available/statistics_reporting/lang/de/template-tags.json
@@ -28,5 +28,7 @@
"lang_last30": "Letzten 30 Tage",
"lang_last90": "Letzten 90 Tage",
"lang_apply": "Anwenden",
- "lang_notassigned": "NICHT ZUGEWIESEN"
+ "lang_save": "Speichern",
+ "lang_notassigned": "NICHT ZUGEWIESEN",
+ "lang_reportingDescription": "Helfen Sie uns bwLehrpool, durch das wöchentliche, automatische Verschicken eines anonymisierten Statistikberichts, zu verbessern."
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/lang/en/template-tags.json b/modules-available/statistics_reporting/lang/en/template-tags.json
index 366a10de..90d59b38 100644
--- a/modules-available/statistics_reporting/lang/en/template-tags.json
+++ b/modules-available/statistics_reporting/lang/en/template-tags.json
@@ -28,5 +28,7 @@
"lang_last30": "Last 30 days",
"lang_last90": "Last 90 days",
"lang_apply": "Apply",
- "lang_notassigned": "NOT ASSIGNED"
+ "lang_save": "Save",
+ "lang_notassigned": "NOT ASSIGNED",
+ "lang_reportingDescription": "Help us improve bwLehrpool by automatically sending an anonymized statistics report once per week."
}
\ No newline at end of file
diff --git a/modules-available/statistics_reporting/page.inc.php b/modules-available/statistics_reporting/page.inc.php
index 941bf12f..1428848a 100644
--- a/modules-available/statistics_reporting/page.inc.php
+++ b/modules-available/statistics_reporting/page.inc.php
@@ -4,6 +4,8 @@
class Page_Statistics_Reporting extends Page
{
+ private $action = false;
+
/**
* Called before any page rendering happens - early hook to check parameters etc.
*/
@@ -15,6 +17,8 @@ class Page_Statistics_Reporting extends Page
Message::addError('main.no-permission');
Util::redirect('?do=Main'); // does not return
}
+
+ $this->action = Request::any('action', 'show', 'string');
}
/**
@@ -22,20 +26,31 @@ class Page_Statistics_Reporting extends Page
*/
protected function doRender()
{
- // timespan you want to see = Days selected * seconds per Day (86400)
- // default = 14 days
- GetData::$from = strtotime("- ".(Request::get('cutoff', 14, 'int') - 1)." days 00:00:00");
- GetData::$to = time();
- GetData::$lowerTimeBound = Request::get('lower', 0, 'int');
- GetData::$upperTimeBound = Request::get('upper', 24, 'int');
-
- $data = array_merge(GetData::total(), array('perLocation' => array(), 'perClient' => array(), 'perUser' => array(), 'perVM' => array()));
- $data['perLocation'] = GetData::perLocation();
- $data['perClient'] = GetData::perClient();
- $data['perUser'] = GetData::perUser();
- $data['perVM'] = GetData::perVM();
-
- Render::addTemplate('columnChooser');
- Render::addTemplate('_page', $data);
+ if ($this->action === 'show') {
+ // timespan you want to see. default = last 7 days
+ GetData::$from = strtotime("- " . (Request::get('cutoff', 14, 'int') - 1) . " days 00:00:00");
+ GetData::$to = time();
+ GetData::$lowerTimeBound = Request::get('lower', 0, 'int');
+ GetData::$upperTimeBound = Request::get('upper', 24, 'int');
+
+ $data = array_merge(GetData::total(), array('perLocation' => array(), 'perClient' => array(), 'perUser' => array(), 'perVM' => array()));
+ $data['perLocation'] = GetData::perLocation();
+ $data['perClient'] = GetData::perClient();
+ $data['perUser'] = GetData::perUser();
+ $data['perVM'] = GetData::perVM();
+
+ Render::addTemplate('columnChooser');
+ Render::addTemplate('_page', $data);
+ }
+ }
+
+ protected function doAjax()
+ {
+ $this->action = Request::any('action', false, 'string');
+ if ($this->action === 'setReporting') {
+ Property::set("reportingStatus", Request::get('reporting', "on", 'string'));
+ } elseif ($this->action === 'getReporting') {
+ echo Property::get("reportingStatus", "on");
+ }
}
}
diff --git a/modules-available/statistics_reporting/style.css b/modules-available/statistics_reporting/style.css
index d7fa7a2f..4f314b14 100644
--- a/modules-available/statistics_reporting/style.css
+++ b/modules-available/statistics_reporting/style.css
@@ -7,6 +7,10 @@
margin-bottom: 10px;
}
+.top-row #button-settings {
+ margin-right: 0;
+}
+
.buttonbar button {
margin-bottom: 4px;
}
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 09551fc1..47fef2a5 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -22,6 +22,7 @@
+
@@ -37,6 +38,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
cgit v1.2.3-55-g7522
From c53f811e83b6cf7124e2d5f26554276436f3b7cd Mon Sep 17 00:00:00 2001
From: Simon Rettberg
Date: Wed, 1 Feb 2017 15:58:19 +0100
Subject: [statistics_reporting] Show hand-cursor for sortable columns
---
modules-available/statistics_reporting/style.css | 6 +-
.../statistics_reporting/templates/_page.html | 238 ++++++++++-----------
.../templates/columnChooser.html | 3 +-
3 files changed, 112 insertions(+), 135 deletions(-)
(limited to 'modules-available/statistics_reporting/style.css')
diff --git a/modules-available/statistics_reporting/style.css b/modules-available/statistics_reporting/style.css
index 4f314b14..81dc74b0 100644
--- a/modules-available/statistics_reporting/style.css
+++ b/modules-available/statistics_reporting/style.css
@@ -37,6 +37,6 @@
line-height: 1.6em;
}
-#applybound {
- display: none;
-}
\ No newline at end of file
+th[data-sort] {
+ cursor: pointer;
+}
diff --git a/modules-available/statistics_reporting/templates/_page.html b/modules-available/statistics_reporting/templates/_page.html
index 39726d51..1f4ac52c 100644
--- a/modules-available/statistics_reporting/templates/_page.html
+++ b/modules-available/statistics_reporting/templates/_page.html
@@ -1,133 +1,111 @@
-
-
-
-
-
-
- |
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_overallOfftime}} |
-
-
-
-
- {{lang_total}} |
- {{time_s}} |
- {{medianTime_s}} |
- {{sessions}} |
- {{shortSessions}} |
- {{totalOfftime_s}} |
-
-
-
-
-
-
-
-
-
-
- {{lang_location}} |
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_totalOffTime}} |
-
-
-
- {{#perLocation}}
-
- {{location}} |
- {{time_s}} |
- {{medianTime_s}} |
- {{sessions}} |
- {{shortSessions}} |
- {{offTime_s}} |
-
- {{/perLocation}}
-
-
-
-
-
-
-
-
-
- {{lang_hostname}} |
- {{lang_location}} |
- {{lang_totalTime}} |
- {{lang_medianSessionLength}} |
- {{lang_longSessions}} |
- {{lang_shortSessions}} |
- {{lang_totalOffTime}} |
- {{lang_clientLogout}} |
- {{lang_clientStart}} |
-
-
-
- {{#perClient}}
-
- {{hostname}} |
- {{location}} |
- {{time_s}} |
- {{medianTime_s}} |
- {{sessions}} |
- {{shortSessions}} |
- {{offTime_s}} |
- {{lastLogout_s}} |
- {{lastStart_s}} |
-
- {{/perClient}}
-
-
-
-
-
-
-
-
-
- {{lang_user}} |
- {{lang_sessions}} |
-
-
-
- {{#perUser}}
-
- {{user}} |
- {{sessions}} |
-
- {{/perUser}}
-
-
-
-
-
-
-
-
-
- {{lang_vm}} |
- {{lang_sessions}} |
-
-
-
- {{#perVM}}
-
- {{vm}} |
- {{sessions}} |
-
- {{/perVM}}
-
-
-
-
-
+
+
+
+ |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_overallOfftime}} |
+
+
+
+
+ {{lang_total}} |
+ {{time_s}} |
+ {{medianTime_s}} |
+ {{sessions}} |
+ {{shortSessions}} |
+ {{totalOfftime_s}} |
+
+
+
+
+
+
+ {{lang_location}} |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_totalOffTime}} |
+
+
+
+ {{#perLocation}}
+
+ {{location}} |
+ {{time_s}} |
+ {{medianTime_s}} |
+ {{sessions}} |
+ {{shortSessions}} |
+ {{offTime_s}} |
+
+ {{/perLocation}}
+
+
+
+
+
+ {{lang_hostname}} |
+ {{lang_location}} |
+ {{lang_totalTime}} |
+ {{lang_medianSessionLength}} |
+ {{lang_longSessions}} |
+ {{lang_shortSessions}} |
+ {{lang_totalOffTime}} |
+ {{lang_clientLogout}} |
+ {{lang_clientStart}} |
+
+
+
+ {{#perClient}}
+
+ {{hostname}} |
+ {{location}} |
+ {{time_s}} |
+ {{medianTime_s}} |
+ {{sessions}} |
+ {{shortSessions}} |
+ {{offTime_s}} |
+ {{lastLogout_s}} |
+ {{lastStart_s}} |
+
+ {{/perClient}}
+
+
+
+
+
+ {{lang_user}} |
+ {{lang_sessions}} |
+
+
+
+ {{#perUser}}
+
+ {{user}} |
+ {{sessions}} |
+
+ {{/perUser}}
+
+
+
+
+
+ {{lang_vm}} |
+ {{lang_sessions}} |
+
+
+
+ {{#perVM}}
+
+ {{vm}} |
+ {{sessions}} |
+
+ {{/perVM}}
+
+
diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html
index 86903583..c51250bd 100644
--- a/modules-available/statistics_reporting/templates/columnChooser.html
+++ b/modules-available/statistics_reporting/templates/columnChooser.html
@@ -21,7 +21,7 @@
-
+
@@ -38,7 +38,6 @@
-