Commit 8940f76f authored by ale's avatar ale

add log template

parent 9fc45c59
{% from "_macros.html" import render_log %}
{%- from "_macros.html" import render_log -%}
<!doctype html>
<html>
<head>
<title>A/I Log Search</title>
<link href="/static/favicon.ico" type="image/x-icon" rel="shortcut icon">
<style type="text/css">
#searchForm input {
font-size: 16px;
}
pre {
word-wrap: break-word;
}
.log:hover {
background-color: #eef;
}
.ts {
color: #666;
}
.host {
font-weight: bold;
}
a.attr {
color: blue;
text-decoration: none;
}
a.attr:hover {
text-decoration: underline;
}
a.lf {
color: #009;
}
a.lf:hover {
text-decoration: underline;
}
#resultDiv {
font-size: 85%;
padding-bottom: 3px;
}
#resultInfo {
padding-left: 30px;
padding-right: 30px;
}
#resultDiv a {
color: blue;
}
#logsDiv {
border-top: 1px solid #666;
padding-top: 3px;
}
#header {
padding-right: 40px;
background: url(/static/rstar32.gif) no-repeat top right;
}
#serverError {
color: red;
}
</style>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/lens.js"></script>
<link rel="stylesheet" type="text/css" href="/static/lens2.css">
<script type="text/javascript" src="/static/strftime.min.js"></script>
<script type="text/javascript" src="/static/jquery.min.js"></script>
<script type="text/javascript" src="/static/lens2.js"></script>
<script type="text/javascript">
var lens_instance;
$(document).ready(function() {
lens_instance = lens.Lens();
$('#queryField').focus();
$('#searchForm').submit(lens.doSearch);
lens.restoreState();
{%- if query -%}
lens.doSearch();
{%- endif -%}
$('#searchForm').submit(
function() {
lens_instance.search($('#queryField').value());
return false;
});
});
</script>
......@@ -80,27 +35,34 @@ $(document).ready(function() {
<span id="loading" style="display:none;">
<img src="/static/spinner.gif" border="0">
</span>
<span id="serverError" style="display:none;"></span>
<span id="error" style="display:none;"></span>
</form>
</div>
<div id="resultDiv">
<!-- Note that the time-based navigation logic is reversed,
since we retrieve results in timestamp-descending order. -->
<span id="nextResults" style="display:none;">
<a onclick="lens.nextPage();">&lt;-- Previous</a>
<span id="log_pagination_prev" style="display:none;">
&lt;-- Previous
</span>
<span id="moreResults" style="display:none;">
<a onclick="lens.getMoreResults();">&lt;-- Back in time some more...</a>
</span>
<span id="resultInfo"></span>
<span id="prevResults" style="display:none;">
<a onclick="lens.prevPage();">Next --&gt;</a>
<span id="log_pagination_title"></span>
<span id="log_pagination_next" style="display:none;">
Next --&gt;
</span>
</div>
</div>
<div id="logsDiv">
<pre id="logs">
</pre>
<div id="log_viewer">
</div>
<div id="log_template" style="display:none;">
<div id="log">
<span class="timestamp">${lens.util.timestampToString(log.timestamp)}</span>
<span class="host">${log.host}</span>
<span class="facility">${log.facility}</span>.<span class="severity"
>${log.severity}</span>
<span class="msg">{{html lens.util.replaceAttrsInMsg(log)}}</span>
</div>
</div>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment