mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 16:52:58 -07:00
Add "player" to tables
* Also rename user platforms to user players * Fix other platform vs. player ambiguities
This commit is contained in:
parent
f1c4bf6249
commit
2616e14c83
15 changed files with 128 additions and 61 deletions
|
@ -1565,19 +1565,19 @@ a:hover .item-children-poster {
|
|||
top: 3px;
|
||||
left: 3px;
|
||||
}
|
||||
.user-platforms ul {
|
||||
.user-player ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
}
|
||||
.user-platforms-instance {
|
||||
.user-player-instance {
|
||||
float: left;
|
||||
width: 240px;
|
||||
height: 80px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
.user-platforms-instance li {
|
||||
.user-player-instance li {
|
||||
}
|
||||
.user-platforms-instance-box {
|
||||
.user-player-instance-box {
|
||||
float: left;
|
||||
width: 75px;
|
||||
border-radius: 3px;
|
||||
|
@ -1589,7 +1589,7 @@ a:hover .item-children-poster {
|
|||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
.user-platforms-instance-name {
|
||||
.user-player-instance-name {
|
||||
float: left;
|
||||
padding-top: 14px;
|
||||
color: #fff;
|
||||
|
@ -1602,7 +1602,7 @@ a:hover .item-children-poster {
|
|||
width: 140px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.user-platforms-instance-playcount h3 {
|
||||
.user-player-instance-playcount h3 {
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
color: #F9AA03;
|
||||
|
@ -1612,7 +1612,7 @@ a:hover .item-children-poster {
|
|||
margin: 0 5px 0 10px;
|
||||
float: left;
|
||||
}
|
||||
.user-platforms-instance-playcount p {
|
||||
.user-player-instance-playcount p {
|
||||
color: #aaa;
|
||||
font-size: 12px;
|
||||
float: left;
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
<th align='left' id="friendly_name">User</th>
|
||||
<th align='left' id="ip_address">IP Address</th>
|
||||
<th align='left' id="platform">Platform</th>
|
||||
<th align='left' id="device">Player</th>
|
||||
<th align='left' id="title">Title</th>
|
||||
<th align='left' id="started">Started</th>
|
||||
<th align='left' id="paused_counter">Paused</th>
|
||||
|
@ -84,7 +85,7 @@
|
|||
}
|
||||
}
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<th align='left' id="started">Started</th>
|
||||
<th align='left' id="stopped">Stopped</th>
|
||||
<th align='left' id="friendly_name">User</th>
|
||||
<th align='left' id="platform">Platform</th>
|
||||
<th align='left' id="player">Player</th>
|
||||
<th align='left' id="title">Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -333,6 +333,7 @@ DOCUMENTATION :: END
|
|||
<th align='left' id="friendly_name">User</th>
|
||||
<th align='left' id="ip_address">IP Address</th>
|
||||
<th align='left' id="platform">Platform</th>
|
||||
<th align='left' id="player">Player</th>
|
||||
<th align='left' id="title">Title</th>
|
||||
<th align='left' id="started">Started</th>
|
||||
<th align='left' id="paused_counter">Paused</th>
|
||||
|
@ -550,7 +551,7 @@ DOCUMENTATION :: END
|
|||
$(document).ready(function () {
|
||||
get_history();
|
||||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||
$(colvis.button()).appendTo('div.colvis-button-bar');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
|
|
@ -100,7 +100,18 @@ history_table_options = {
|
|||
},
|
||||
{
|
||||
"targets": [4],
|
||||
"data":"player",
|
||||
"data":"platform",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
}
|
||||
},
|
||||
"width": "8%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [5],
|
||||
"data": "player",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
var transcode_dec = '';
|
||||
|
@ -114,11 +125,11 @@ history_table_options = {
|
|||
$(td).html('<div><a href="#" data-target="#info-modal" data-toggle="modal"><div style="float: left;">' + transcode_dec + ' ' + cellData + '</div></a></div>');
|
||||
}
|
||||
},
|
||||
"width": "15%",
|
||||
"width": "12%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [5],
|
||||
"targets": [6],
|
||||
"data":"full_title",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
|
@ -145,7 +156,7 @@ history_table_options = {
|
|||
"width": "35%"
|
||||
},
|
||||
{
|
||||
"targets": [6],
|
||||
"targets": [7],
|
||||
"data":"started",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData === null) {
|
||||
|
@ -159,7 +170,7 @@ history_table_options = {
|
|||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [7],
|
||||
"targets": [8],
|
||||
"data":"paused_counter",
|
||||
"render": function (data, type, full) {
|
||||
if (data !== null) {
|
||||
|
@ -173,7 +184,7 @@ history_table_options = {
|
|||
"className": "no-wrap hidden-md hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [8],
|
||||
"targets": [9],
|
||||
"data":"stopped",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData === null) {
|
||||
|
@ -187,7 +198,7 @@ history_table_options = {
|
|||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [9],
|
||||
"targets": [10],
|
||||
"data":"duration",
|
||||
"render": function (data, type, full) {
|
||||
if (data !== null) {
|
||||
|
@ -201,7 +212,7 @@ history_table_options = {
|
|||
"className": "no-wrap hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [10],
|
||||
"targets": [11],
|
||||
"data": "watched_status",
|
||||
"render": function (data, type, full) {
|
||||
if (data == 1) {
|
||||
|
@ -462,6 +473,7 @@ function childTableFormat(rowData) {
|
|||
'<th align="left" id="friendly_name">User</th>' +
|
||||
'<th align="left" id="ip_address">IP Address</th>' +
|
||||
'<th align="left" id="platform">Platform</th>' +
|
||||
'<th align="left" id="platform">Player</th>' +
|
||||
'<th align="left" id="title">Title</th>' +
|
||||
'<th align="left" id="started">Started</th>' +
|
||||
'<th align="left" id="paused_counter">Paused</th>' +
|
||||
|
|
|
@ -67,13 +67,13 @@ sync_table_options = {
|
|||
},
|
||||
{
|
||||
"targets": [4],
|
||||
"data": "device_name",
|
||||
"className": "no-wrap hidden-xs"
|
||||
"data": "platform",
|
||||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [5],
|
||||
"data": "platform",
|
||||
"className": "no-wrap hidden-sm hidden-xs"
|
||||
"data": "device_name",
|
||||
"className": "no-wrap hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [6],
|
||||
|
|
|
@ -49,7 +49,18 @@ user_ip_table_options = {
|
|||
},
|
||||
{
|
||||
"targets": [2],
|
||||
"data":"platform",
|
||||
"data": "platform",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
}
|
||||
},
|
||||
"width": "15%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [3],
|
||||
"data":"player",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData) {
|
||||
var transcode_dec = '';
|
||||
|
@ -69,7 +80,7 @@ user_ip_table_options = {
|
|||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [3],
|
||||
"targets": [4],
|
||||
"data":"last_watched",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
|
@ -94,10 +105,11 @@ user_ip_table_options = {
|
|||
}
|
||||
}
|
||||
},
|
||||
"width": "30%",
|
||||
"className": "hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [4],
|
||||
"targets": [5],
|
||||
"data":"play_count",
|
||||
"searchable": false,
|
||||
"width": "10%"
|
||||
|
|
|
@ -64,7 +64,7 @@ users_list_table_options = {
|
|||
$(td).html(cellData);
|
||||
}
|
||||
},
|
||||
"width": "12%",
|
||||
"width": "10%",
|
||||
"className": "edit-user-control no-wrap"
|
||||
},
|
||||
{
|
||||
|
@ -78,7 +78,7 @@ users_list_table_options = {
|
|||
}
|
||||
},
|
||||
"searchable": false,
|
||||
"width": "12%",
|
||||
"width": "10%",
|
||||
"className": "no-wrap hidden-xs"
|
||||
},
|
||||
{
|
||||
|
@ -99,12 +99,25 @@ users_list_table_options = {
|
|||
$(td).html('n/a');
|
||||
}
|
||||
},
|
||||
"width": "12%",
|
||||
"width": "10%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control-ip"
|
||||
},
|
||||
{
|
||||
"targets": [5],
|
||||
"data":"platform",
|
||||
"data": "platform",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
$(td).html(cellData);
|
||||
} else {
|
||||
$(td).html('n/a');
|
||||
}
|
||||
},
|
||||
"width": "10%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [6],
|
||||
"data":"player",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData) {
|
||||
var transcode_dec = '';
|
||||
|
@ -120,11 +133,11 @@ users_list_table_options = {
|
|||
$(td).html('n/a');
|
||||
}
|
||||
},
|
||||
"width": "12%",
|
||||
"width": "15%",
|
||||
"className": "no-wrap hidden-md hidden-sm hidden-xs modal-control"
|
||||
},
|
||||
{
|
||||
"targets": [6],
|
||||
"targets": [7],
|
||||
"data":"last_watched",
|
||||
"createdCell": function (td, cellData, rowData, row, col) {
|
||||
if (cellData !== '') {
|
||||
|
@ -153,7 +166,7 @@ users_list_table_options = {
|
|||
"className": "hidden-sm hidden-xs"
|
||||
},
|
||||
{
|
||||
"targets": [7],
|
||||
"targets": [8],
|
||||
"data": "plays",
|
||||
"searchable": false,
|
||||
"width": "10%"
|
||||
|
|
|
@ -29,8 +29,8 @@
|
|||
<th align='left' id="username">Username</th>
|
||||
<th align='left' id="title">Title</th>
|
||||
<th align='left' id="type">Type</th>
|
||||
<th align='left' id="device">Device</th>
|
||||
<th align='left' id="platform">Platform</th>
|
||||
<th align='left' id="device">Device</th>
|
||||
<th align='left' id="size">Total Size</th>
|
||||
<th align='left' id="items">Total Items</th>
|
||||
<th align='left' id="converted">Converted</th>
|
||||
|
|
|
@ -85,11 +85,11 @@ from plexpy import helpers
|
|||
<div class="col-md-12">
|
||||
<div class="table-card-header">
|
||||
<div class="header-bar">
|
||||
<span><i class="fa fa-television"></i> Platform Stats</span>
|
||||
<span><i class="fa fa-television"></i> Player Stats</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-card-back">
|
||||
<div id="user-platform-stats" class="user-platforms">
|
||||
<div id="user-player-stats" class="user-player">
|
||||
<div class='muted'><i class="fa fa-refresh fa-spin"></i> Loading data...</div>
|
||||
<br>
|
||||
</div>
|
||||
|
@ -133,6 +133,7 @@ from plexpy import helpers
|
|||
<th align="left">Last Seen</th>
|
||||
<th align="left">IP Address</th>
|
||||
<th align="left">Last Platform</th>
|
||||
<th align="left">Last Player</th>
|
||||
<th align="left">Last Watched</th>
|
||||
<th align="left">Play Count</th>
|
||||
</tr>
|
||||
|
@ -170,6 +171,7 @@ from plexpy import helpers
|
|||
<th align='left' id="friendly_name">User</th>
|
||||
<th align='left' id="ip_address">IP Address</th>
|
||||
<th align='left' id="platform">Platform</th>
|
||||
<th align='left' id="player">Player</th>
|
||||
<th align='left' id="title">Title</th>
|
||||
<th align='left' id="started">Started</th>
|
||||
<th align='left' id="paused_counter">Paused</th>
|
||||
|
@ -207,8 +209,8 @@ from plexpy import helpers
|
|||
<th align='left' id="username">Username</th>
|
||||
<th align='left' id="sync_title">Title</th>
|
||||
<th align='left' id="type">Type</th>
|
||||
<th align='left' id="device">Device</th>
|
||||
<th align='left' id="sync_platform">Platform</th>
|
||||
<th align='left' id="device">Device</th>
|
||||
<th align='left' id="size">Total Size</th>
|
||||
<th align='left' id="items">Total Items</th>
|
||||
<th align='left' id="converted">Converted</th>
|
||||
|
@ -309,11 +311,11 @@ from plexpy import helpers
|
|||
|
||||
// Populate platform stats
|
||||
$.ajax({
|
||||
url: 'get_user_platform_stats',
|
||||
url: 'get_user_player_stats',
|
||||
async: true,
|
||||
data: { user_id: user_id, user: '${data['username']}' },
|
||||
complete: function(xhr, status) {
|
||||
$("#user-platform-stats").html(xhr.responseText);
|
||||
$("#user-player-stats").html(xhr.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -332,7 +334,7 @@ from plexpy import helpers
|
|||
history_table = $('#history_table').DataTable(history_table_options);
|
||||
history_table.column(2).visible(false);
|
||||
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 10] });
|
||||
var colvis = new $.fn.dataTable.ColVis(history_table, { buttonText: '<i class="fa fa-columns"></i> Select columns', buttonClass: 'btn btn-dark', exclude: [0, 11] });
|
||||
$(colvis.button()).appendTo('#button-bar-history');
|
||||
|
||||
clearSearchButton('history_table', history_table);
|
||||
|
|
|
@ -11,8 +11,9 @@ data[array_index] :: Usable parameters
|
|||
|
||||
== Global keys ==
|
||||
result_id Returns a unique identifier for the result.
|
||||
platform_name Returns the name of the platform.
|
||||
total_plays Returns the play count for the platform.
|
||||
player_name Returns the name of the player.
|
||||
platform_type Returns the name of the platform
|
||||
total_plays Returns the play count for the player.
|
||||
|
||||
DOCUMENTATION :: END
|
||||
</%doc>
|
||||
|
@ -20,13 +21,13 @@ DOCUMENTATION :: END
|
|||
% if data != None:
|
||||
% for a in data:
|
||||
<ul class="list-unstyled">
|
||||
<div class="user-platforms-instance">
|
||||
<div class="user-player-instance">
|
||||
<li>
|
||||
<span id="user-platform-image-${a['result_id']}"></span>
|
||||
<div class="user-platforms-instance-name">
|
||||
${a['platform_name']}
|
||||
<span id="user-player-image-${a['result_id']}"></span>
|
||||
<div class="user-player-instance-name">
|
||||
${a['player_name']}
|
||||
</div>
|
||||
<div class="user-platforms-instance-playcount">
|
||||
<div class="user-player-instance-playcount">
|
||||
<h3>${a['total_plays']}</h3>
|
||||
<p> plays</p>
|
||||
</div>
|
||||
|
@ -34,7 +35,7 @@ DOCUMENTATION :: END
|
|||
</div>
|
||||
</ul>
|
||||
<script>
|
||||
$("#user-platform-image-${a['result_id']}").html("<div class='user-platforms-instance-box' style='background-image: url(" + getPlatformImagePath('${a['platform_type']}') + ");'>");
|
||||
$("#user-player-image-${a['result_id']}").html("<div class='user-player-instance-box' style='background-image: url(" + getPlatformImagePath('${a['platform_type']}') + ");'>");
|
||||
</script>
|
||||
% endfor
|
||||
% else:
|
|
@ -29,6 +29,7 @@
|
|||
<th align="left" id="last_seen">Last Seen</th>
|
||||
<th align="left" id="last_known_ip">Last Known IP</th>
|
||||
<th align="left" id="last_platform">Last Platform</th>
|
||||
<th align="left" id="last_player">Last Player</th>
|
||||
<th align="left" id="last_watched">Last Watched</th>
|
||||
<th align="left" id="total_plays">Total Plays</th>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue