2014-03-10 05:18:05 +00:00
|
|
|
#import sickbeard
|
|
|
|
#from sickbeard import classes
|
|
|
|
#from sickbeard.common import *
|
|
|
|
#from sickbeard.logger import reverseNames
|
2015-05-07 00:36:40 +00:00
|
|
|
##
|
|
|
|
#set global $header = 'Log File'
|
|
|
|
#set global $title = 'Logs'
|
|
|
|
#set global $sbPath = '..'
|
|
|
|
#set global $topmenu = 'errorlogs'
|
|
|
|
##
|
2014-03-10 05:18:05 +00:00
|
|
|
#import os.path
|
2015-05-07 00:36:40 +00:00
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_top.tmpl')
|
2014-10-21 19:09:01 +00:00
|
|
|
|
2015-05-07 00:36:40 +00:00
|
|
|
#if $varExists('header')
|
2014-03-10 05:18:05 +00:00
|
|
|
<h1 class="header">$header</h1>
|
|
|
|
#else
|
|
|
|
<h1 class="title">$title</h1>
|
|
|
|
#end if
|
2014-10-21 19:09:01 +00:00
|
|
|
|
2015-05-07 00:36:40 +00:00
|
|
|
<div class="h2footer pull-right">Minimum logging level to display:
|
|
|
|
<select name="minLevel" id="minLevel" class="form-control form-control-inline input-sm">
|
2014-03-10 05:18:05 +00:00
|
|
|
#set $levels = $reverseNames.keys()
|
2015-05-07 00:36:40 +00:00
|
|
|
#set void = $levels.sort(lambda x,y: cmp($reverseNames[$x], $reverseNames[$y]))
|
|
|
|
#for $level in $levels
|
|
|
|
<option value="$reverseNames[$level]" #if $minLevel == $reverseNames[$level] then 'selected="selected"' else ''#>$level.title()</option>
|
2014-03-10 05:18:05 +00:00
|
|
|
#end for
|
2015-05-07 00:36:40 +00:00
|
|
|
</select>
|
2014-03-10 05:18:05 +00:00
|
|
|
</div>
|
2015-05-07 00:36:40 +00:00
|
|
|
|
|
|
|
<div class="align-left" style="margin:30px 0"><pre>
|
|
|
|
#echo $logLines
|
|
|
|
</pre></div>
|
2014-03-10 05:18:05 +00:00
|
|
|
|
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
<!--
|
2015-05-07 00:36:40 +00:00
|
|
|
\$(document).ready(function(){
|
|
|
|
\$('#minLevel').change(function(){
|
|
|
|
window.location.href = '$sbRoot/errorlogs/viewlog/?minLevel=' + \$(this).val()
|
|
|
|
});
|
|
|
|
|
|
|
|
window.setInterval('location.reload(true)', 600000); // Refresh every 10 minutes
|
|
|
|
});
|
2014-03-10 05:18:05 +00:00
|
|
|
//-->
|
|
|
|
</script>
|
|
|
|
|
2015-05-07 00:36:40 +00:00
|
|
|
#include $os.path.join($sickbeard.PROG_DIR, 'gui/slick/interfaces/default/inc_bottom.tmpl')
|