mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-16 02:02:58 -07:00
125 lines
4.9 KiB
HTML
125 lines
4.9 KiB
HTML
<%inherit file="base.html"/>
|
|
<%!
|
|
from plexpy import helpers
|
|
%>
|
|
|
|
<%def name="headIncludes()">
|
|
<link rel="stylesheet" href="interfaces/default/css/plexwatch-tables.css">
|
|
</%def>
|
|
|
|
<%def name="body()">
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
<div class="wellheader-bg">
|
|
<div class="dashboard-wellheader-no-chevron">
|
|
<h2><i class="fa fa-group"></i> Users</h2>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class='container-fluid'>
|
|
<div class='row-fluid'>
|
|
<div class='span12'>
|
|
<div class='wellbg'>
|
|
<table id="usersTable" class="display" width="100%">
|
|
<thead>
|
|
<tr>
|
|
<th align="right" id="avatar"></th>
|
|
<th align="left" id="username"><i class='fa fa-sort'></i> User </th>
|
|
<th align="left" id="last_seen"><i class='fa fa-sort'></i> Last Seen </th>
|
|
<th align="left" id="last_known_ip"><i class='fa fa-sort'></i> Last Known IP </th>
|
|
<th align="left" id="total_plays"><i class='fa fa-sort'></i> Total Plays</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<footer></footer>
|
|
</div>
|
|
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script src="interfaces/default/js/jquery.dataTables.min.js"></script>
|
|
<script src="interfaces/default/js/jquery.dataTables.bootstrap.pagination.integration.js"></script>
|
|
<script src="interfaces/default/js/moment-with-locale.js"></script>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
var oTable = $('#usersTable').dataTable({
|
|
"language": {
|
|
"search": "Search: ",
|
|
"lengthMenu":"Show _MENU_ entries per page",
|
|
"info":"Showing _START_ to _END_ of _TOTAL_ entries",
|
|
"infoEmpty":"Showing 0 to 0 of 0 entries",
|
|
"infoFiltered":"(filtered from _MAX_ total entries)",
|
|
"emptyTable": "No data in table",
|
|
},
|
|
"destroy": true,
|
|
"processing": false,
|
|
"serverSide": true,
|
|
"pageLength": 10,
|
|
"order": [ 0, 'asc'],
|
|
"ajax": {
|
|
"url": "get_user_list"
|
|
},
|
|
"bLengthChange": true,
|
|
"bInfo": true,
|
|
"bAutoWidth": true,
|
|
"aaSorting": [[ 0, "asc" ]],
|
|
"bStateSave": true,
|
|
"bSortClasses": true,
|
|
"sPaginationType": "bootstrap",
|
|
"columnDefs": [
|
|
{
|
|
"targets": [0],
|
|
"data": null,
|
|
"createdCell": function (td, cellData, rowData, row, col) {
|
|
if (rowData['user_thumb'] === '') {
|
|
$(td).html('<img src="interfaces/default/images/gravatar-default-80x80.png" alt="User Logo"/>');
|
|
} else {
|
|
$(td).html('<img src="' + rowData['user_thumb'] + '" alt="User Logo"/>');
|
|
}
|
|
},
|
|
"orderable": false,
|
|
"className": "users-poster-face",
|
|
"width": "40px"
|
|
},
|
|
{
|
|
"targets": [1],
|
|
"data": "user"
|
|
},
|
|
{
|
|
"targets": [2],
|
|
"data": "time",
|
|
"render": function ( data, type, full ) {
|
|
return moment(data, "X").fromNow();
|
|
}
|
|
},
|
|
{
|
|
"targets": [3],
|
|
"data": "ip_address"
|
|
},
|
|
{
|
|
"targets": [4],
|
|
"data": "plays"
|
|
}
|
|
],
|
|
"drawCallback": function (settings) {
|
|
// Jump to top of page
|
|
$('html,body').scrollTop(0);
|
|
$('#ajaxMsg').addClass('success').fadeOut();
|
|
},
|
|
"preDrawCallback": function(settings) {
|
|
$('#ajaxMsg').html("<div class='msg'><span class='ui-icon ui-icon-check'></span>Fetching rows...</div>");
|
|
$('#ajaxMsg').addClass('success').fadeIn();
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
</%def>
|