diff options
author | Udo Walter | 2016-12-23 17:24:05 +0100 |
---|---|---|
committer | Udo Walter | 2016-12-23 17:24:05 +0100 |
commit | 8c9c28df0401f0bc89ab1cfc05332e6e1727d0d3 (patch) | |
tree | e8150dc5aa84fadecc05190a2ab0017ae7c3b569 /modules-available/statistics_reporting/templates | |
parent | [statistics_reporting] replaced empty location string (diff) | |
download | slx-admin-8c9c28df0401f0bc89ab1cfc05332e6e1727d0d3.tar.gz slx-admin-8c9c28df0401f0bc89ab1cfc05332e6e1727d0d3.tar.xz slx-admin-8c9c28df0401f0bc89ab1cfc05332e6e1727d0d3.zip |
[statistics_reporting] added location column in client table
Diffstat (limited to 'modules-available/statistics_reporting/templates')
-rw-r--r-- | modules-available/statistics_reporting/templates/_page.html | 4 | ||||
-rw-r--r-- | modules-available/statistics_reporting/templates/columnChooser.html | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/modules-available/statistics_reporting/templates/_page.html b/modules-available/statistics_reporting/templates/_page.html index d2aaecde..fbdde6d5 100644 --- a/modules-available/statistics_reporting/templates/_page.html +++ b/modules-available/statistics_reporting/templates/_page.html @@ -41,7 +41,7 @@ <tbody> {{#perLocation}} <tr> - <td class="text-left">{{location}}</td> + <td class="locationName text-left">{{location}}</td> <td data-sort-value="{{timeInSeconds}}" class="text-left column-totaltime">{{time}}</td> <td data-sort-value="{{medianTimeInSeconds}}" class="text-left column-mediantime">{{medianTime}}</td> <td class="text-left column-sessions">{{sessions}}</td> @@ -59,6 +59,7 @@ <thead> <tr> <th data-sort="string" class="text-left col-md-4">{{lang_hostname}}</th> + <th data-sort="string" class="text-left column-location">{{lang_location}}</th> <th data-sort="int" data-sort-default="desc" class="text-left column-totaltime">{{lang_totalTime}}</th> <th data-sort="int" data-sort-default="desc" class="text-left column-mediantime">{{lang_medianSessionLength}}</th> <th data-sort="int" data-sort-default="desc" class="text-left column-sessions">{{lang_sessions}}</th> @@ -72,6 +73,7 @@ {{#perClient}} <tr> <td class="text-left">{{hostname}}</td> + <td class="text-left column-location"><a class="locationLink" href="#">{{locationName}}</a></td> <td data-sort-value="{{timeInSeconds}}" class="text-left column-totaltime">{{time}}</td> <td data-sort-value="{{medianTimeInSeconds}}" class="text-left column-mediantime">{{medianTime}}</td> <td class="text-left column-sessions">{{sessions}}</td> diff --git a/modules-available/statistics_reporting/templates/columnChooser.html b/modules-available/statistics_reporting/templates/columnChooser.html index 49c9a75d..06cd6770 100644 --- a/modules-available/statistics_reporting/templates/columnChooser.html +++ b/modules-available/statistics_reporting/templates/columnChooser.html @@ -24,6 +24,7 @@ <button id="applybound" type="button" class="btn btn-sm btn-primary" onclick="reloadPage()">{{lang_apply}}</button> </div> <div class="col-md-12 buttonbar"> + <button id="button-location" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('location')">{{lang_location}}</button> <button id="button-totaltime" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('totaltime')">{{lang_totalTime}}</button> <button id="button-mediantime" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('mediantime')">{{lang_medianSessionLength}}</button> <button id="button-sessions" type="button" class="column-toggle btn btn-primary" onclick="toggleButton('sessions')">{{lang_sessions}}</button> @@ -69,9 +70,20 @@ var arrow = data.direction === dir.ASC ? "down" : "up"; th.eq(data.column).append(' <span class="arrow glyphicon glyphicon-chevron-'+arrow+'"></span>'); }); + + $(".locationLink").click(function(e) { + e.preventDefault(); + $('#select-table').val('perlocation'); + chooseTable('perlocation'); + var target = $(".locationName:contains('"+$(this).text()+"'):first"); + $(window).scrollTop(target.offset().top - $(window).height()/2); + target.parent().css( "background-color", "#f8ff99" ); + return false; + }); }); function chooseTable(v) { + $("tr").removeAttr('style'); $("[id^=table-]").hide(); $('#table-'+v).show(); $("[id^=button-]").hide(); |