mirror of
https://github.com/rembo10/headphones.git
synced 2026-05-26 05:17:44 +01:00
Fixed bug with log page not displaying if non-utf8 characters
This commit is contained in:
+1
-1
@@ -190,7 +190,7 @@ table#log_table { background-color: white; }
|
||||
|
||||
table#log_table th#timestamp { text-align: left; min-width: 165px; }
|
||||
table#log_table th#level { text-align: left; min-width: 75px; }
|
||||
table#log_table th#message { text-align: left; min-width: 200px; }
|
||||
table#log_table th#message { text-align: left; min-width: 500px; }
|
||||
|
||||
table#upcoming_table th#albumart { text-align: center; min-width: 50px; }
|
||||
table#upcoming_table th#albumname { text-align: center; min-width: 200px; }
|
||||
|
||||
@@ -15,23 +15,18 @@
|
||||
<tbody>
|
||||
%for line in lineList:
|
||||
<%
|
||||
out_tuple = helpers.extract_logline(line)
|
||||
timestamp, message, level, threadname = line
|
||||
|
||||
if level == 'WARNING' or level == 'ERROR':
|
||||
grade = 'X'
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
%if out_tuple:
|
||||
<%
|
||||
if out_tuple[1] == 'DEBUG':
|
||||
continue
|
||||
elif out_tuple[1] == 'WARNING' or out_tuple[1] == 'ERROR':
|
||||
grade = 'X'
|
||||
else:
|
||||
grade = 'Z'
|
||||
%>
|
||||
<tr class="grade${grade}">
|
||||
<td id="timestamp">${out_tuple[0]}</td>
|
||||
<td id="level">${out_tuple[1]}</td>
|
||||
<td id="message">${out_tuple[3].decode('utf-8')}</td>
|
||||
<td id="timestamp">${timestamp}</td>
|
||||
<td id="level">${level}</td>
|
||||
<td id="message">${message}</td>
|
||||
</tr>
|
||||
%endif
|
||||
%endfor
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user