mirror of
https://github.com/rembo10/headphones.git
synced 2026-03-20 03:39:26 +00:00
65 lines
2.0 KiB
HTML
65 lines
2.0 KiB
HTML
lossless<%inherit file="base.html"/>
|
|
<%!
|
|
from headphones import helpers
|
|
%>
|
|
|
|
<%def name="body()">
|
|
<div class="title">
|
|
<h1 class="clearfix"><img src="interfaces/default/images/icon_logs.png" alt="Logs"/>Logs</h1>
|
|
</div>
|
|
<table class="display" id="log_table">
|
|
<thead>
|
|
<tr>
|
|
<th id="timestamp">Timestamp</th>
|
|
<th id="level">Level</th>
|
|
<th id="message">Message</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</%def>
|
|
|
|
<%def name="headIncludes()">
|
|
<link rel="stylesheet" href="interfaces/default/css/data_table.css">
|
|
</%def>
|
|
|
|
<%def name="javascriptIncludes()">
|
|
<script src="js/libs/jquery.dataTables.min.js"></script>
|
|
<script>
|
|
$(document).ready(function() {
|
|
$('#log_table').dataTable( {
|
|
"bProcessing": true,
|
|
"bServerSide": true,
|
|
"sAjaxSource": 'getLog',
|
|
"sPaginationType": "full_numbers",
|
|
"bStateSave": true,
|
|
"oLanguage": {
|
|
"sLengthMenu":"Show _MENU_ lines per page",
|
|
"sEmptyTable": "No log information available",
|
|
"sInfo":"Showing _START_ to _END_ of _TOTAL_ lines",
|
|
"sInfoEmpty":"Showing 0 to 0 of 0 lines",
|
|
"sInfoFiltered":"(filtered from _MAX_ total lines)"},
|
|
"fnRowCallback": function (nRow, aData, iDisplayIndex, iDisplayIndexFull) {
|
|
if (aData[1] === "WARNING" || aData[1] === "ERROR")
|
|
{
|
|
$('td', nRow).closest('tr').addClass("gradeX");
|
|
}
|
|
else
|
|
{
|
|
$('td', nRow).closest('tr').addClass("gradeZ");
|
|
}
|
|
|
|
|
|
return nRow;
|
|
},
|
|
"fnServerData": function ( sSource, aoData, fnCallback ) {
|
|
/* Add some extra data to the sender */
|
|
$.getJSON( sSource, aoData, function (json) {
|
|
fnCallback(json)
|
|
} );
|
|
}
|
|
} );
|
|
} );
|
|
</script>
|
|
</%def> |