2018-12-09 20:23:51 +00:00
|
|
|
<html lang="en">
|
2017-11-22 04:01:26 +00:00
|
|
|
<head>
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<script src="{{base_url}}static/jquery/jquery-latest.min.js"></script>
|
|
|
|
<script src="{{base_url}}static/semantic/semantic.min.js"></script>
|
|
|
|
<script src="{{base_url}}static/jquery/tablesort.js"></script>
|
|
|
|
<link rel="stylesheet" href="{{base_url}}static/semantic/semantic.min.css">
|
|
|
|
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
background-color: #272727;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body>
|
2017-11-22 15:37:50 +00:00
|
|
|
<div id='logs_loader' class="ui page dimmer">
|
2018-10-17 03:25:04 +00:00
|
|
|
<div id="loader_text" class="ui indeterminate text loader">Loading...</div>
|
2017-11-22 15:37:50 +00:00
|
|
|
</div>
|
2017-11-22 04:01:26 +00:00
|
|
|
<div class="content">
|
|
|
|
<table class="ui very basic selectable table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="collapsing"></th>
|
|
|
|
<th>Message</th>
|
|
|
|
<th class="collapsing">Time</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
%import time
|
|
|
|
%import datetime
|
|
|
|
%import pretty
|
|
|
|
%for log in logs:
|
|
|
|
%line = []
|
|
|
|
%line = log.split('|')
|
2018-01-01 14:53:49 +00:00
|
|
|
<tr class='log' data-message="\\
|
|
|
|
%try:
|
2018-10-25 10:06:33 +00:00
|
|
|
{{line[3]}}\\
|
2018-01-01 14:53:49 +00:00
|
|
|
%except:
|
|
|
|
\\
|
|
|
|
%end
|
|
|
|
" data-exception="\\
|
2018-01-01 14:51:09 +00:00
|
|
|
%try:
|
2018-10-25 10:06:33 +00:00
|
|
|
{{line[4]}}\\
|
2018-01-01 14:51:09 +00:00
|
|
|
%except:
|
|
|
|
\\
|
|
|
|
%end
|
|
|
|
">
|
2017-11-22 04:01:26 +00:00
|
|
|
<td class="collapsing"><i class="\\
|
2018-01-01 15:03:00 +00:00
|
|
|
%try:
|
2018-10-25 10:06:33 +00:00
|
|
|
%if line[1] == 'INFO ':
|
2018-01-01 15:03:00 +00:00
|
|
|
blue info circle icon \\
|
2018-10-25 10:06:33 +00:00
|
|
|
%elif line[1] == 'WARNING ':
|
2018-01-01 15:03:00 +00:00
|
|
|
yellow warning circle icon \\
|
2018-10-25 10:06:33 +00:00
|
|
|
%elif line[1] == 'ERROR ':
|
2018-01-01 15:03:00 +00:00
|
|
|
red bug icon \\
|
2018-10-25 10:06:33 +00:00
|
|
|
%elif line[1] == 'DEBUG ':
|
|
|
|
bug icon \\
|
2018-01-01 15:03:00 +00:00
|
|
|
%end
|
|
|
|
%except:
|
|
|
|
%pass
|
|
|
|
%end
|
|
|
|
"></i></td>
|
2018-01-01 14:59:50 +00:00
|
|
|
<td>\\
|
|
|
|
%try:
|
2018-10-25 10:06:33 +00:00
|
|
|
{{line[3]}}\\
|
2018-01-01 14:59:50 +00:00
|
|
|
%except:
|
|
|
|
\\
|
|
|
|
%end
|
|
|
|
</td>
|
|
|
|
<td title="\\
|
|
|
|
%try:
|
|
|
|
{{line[0]}}" class="collapsing">{{pretty.date(int(time.mktime(datetime.datetime.strptime(line[0], "%d/%m/%Y %H:%M:%S").timetuple())))}}</td>
|
|
|
|
%except:
|
|
|
|
" class="collapsing"></td>
|
|
|
|
%end
|
2017-11-22 04:01:26 +00:00
|
|
|
</tr>
|
|
|
|
%end
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2018-01-17 15:25:37 +00:00
|
|
|
<div id="modal" class="ui small modal">
|
2017-11-22 04:01:26 +00:00
|
|
|
<i class="close icon"></i>
|
|
|
|
<div class="header">
|
|
|
|
<div>Details</div>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
Message
|
|
|
|
<div id='message' class="ui segment">
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
Exception
|
|
|
|
<div id='exception' class="ui segment">
|
|
|
|
<p></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="actions">
|
|
|
|
<button class="ui cancel button" >Close</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
$('.modal')
|
|
|
|
.modal({
|
|
|
|
autofocus: false
|
2018-12-09 20:23:51 +00:00
|
|
|
});
|
2017-11-22 04:01:26 +00:00
|
|
|
|
2018-12-09 20:23:51 +00:00
|
|
|
$('.log').on('click', function(){
|
2017-11-22 04:01:26 +00:00
|
|
|
$("#message").html($(this).data("message"));
|
2018-12-09 20:23:51 +00:00
|
|
|
let exception = $(this).data("exception");
|
2018-07-11 19:15:47 +00:00
|
|
|
exception = exception.replace(/'/g,"");
|
2018-12-09 20:23:51 +00:00
|
|
|
exception = exception.replace(/\\n\s\s\s\s/g, "\\n  ");
|
2018-07-11 19:15:47 +00:00
|
|
|
exception = exception.replace(/\\n\s\s/g, "\\n ");
|
2018-12-09 20:23:51 +00:00
|
|
|
exception = exception.replace(/\\n/g, "<br />");
|
2018-07-11 19:15:47 +00:00
|
|
|
$("#exception").html(exception);
|
2018-01-17 15:25:37 +00:00
|
|
|
$('#modal').modal('show');
|
2018-12-09 20:23:51 +00:00
|
|
|
});
|
2017-11-22 04:01:26 +00:00
|
|
|
</script>
|