mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-03 18:29:32 +01:00
Added artist page and log page, fixed some css, added logline parse to helpers
This commit is contained in:
56
data/interfaces/default/logs.html
Normal file
56
data/interfaces/default/logs.html
Normal file
@@ -0,0 +1,56 @@
|
||||
<%inherit file="base.html"/>
|
||||
|
||||
<%def name="body()">
|
||||
<table class="display" id="log_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th id="timestamp">Timestamp</th>
|
||||
<th id="level">Level</th>
|
||||
<th id="thread">Thread</th>
|
||||
<th id="message">Message</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
%for line in lineList:
|
||||
<%
|
||||
from headphones import helpers
|
||||
timestamp, level, thread, message = helpers.extract_logline(line)
|
||||
%>
|
||||
%if timestamp and level and thread and message:
|
||||
<tr>
|
||||
<td id="timestamp">${timestamp}</td>
|
||||
<td id="level">${level}</td>
|
||||
<td id="thread">${thread}</td>
|
||||
<td id="message">${message.decode('utf-8')}</td>
|
||||
</tr>
|
||||
%endif
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
</%def>
|
||||
|
||||
<%def name="headerIncludes()">
|
||||
<link rel="stylesheet" href="css/data_table.css">
|
||||
</%def>
|
||||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||
<script>
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('#log_table').dataTable(
|
||||
{
|
||||
"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)"},
|
||||
"bStateSave": true,
|
||||
"iDisplayLength": 100,
|
||||
"sPaginationType": "full_numbers",
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</%def>
|
||||
Reference in New Issue
Block a user