blob: 8b59003881652ac4f54990042717045b0c7b896b (
plain) (
tree)
|
|
<h1>{{lang_clientLog}}</h1>
<style type="text/css">
.selectize-dropdown {
max-width: 500px;
}
</style>
<form method="post" action="?do=SysLog{{#machineuuid}}&machineuuid={{machineuuid}}{{/machineuuid}}">
<input type="hidden" name="token" value="{{token}}">
<div class="pull-left">
<label for="filterstring">{{lang_filter}}</label>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-sm-1">
<div class="checkbox">
<input id="notbox" type="checkbox" name="not" {{#not}}checked="checked"{{/not}}>
<label for="notbox">{{lang_not}}</label>
</div>
</div>
<div class="col-sm-11">
<div class="input-group">
<input id="filterstring" placeholder="id" value="{{filter}}" name="filter">
<span style="padding-bottom: 5px;" class="input-group-btn">
<button class="btn btn-primary" type="submit">{{lang_applyFilter}}</button>
</span>
</div>
</div>
</div>
</form>
{{{pagenav}}}
<table class="table table-striped table-condensed">
<thead>
<th width="1"></th>
<th class="text-center">{{lang_when}}</th>
<th class="text-center">{{lang_client}}</th>
<th class="text-center">{{lang_event}}</th>
<th width="1">{{lang_details}}</th>
</thead>
<tbody>
{{#list}}
<tr>
<td><span class="type-button glyphicon {{icon}}" title="{{logtypeid}}"></span></td>
<td class="text-center" nowrap="nowrap">{{date}}</td>
<td class="text-left">{{clientip}}</td>
<td>{{description}}</td>
<td class="text-center">{{#extra}}
<a class="btn btn-default btn-xs" onclick="$('#details-body').html($('#extra-{{logid}}').html())"
data-toggle="modal" data-target="#myModal">»</a>
<div class="hidden" id="extra-{{logid}}">{{extra}}</div>
{{/extra}}</td>
</tr>
{{/list}}
</tbody>
</table>
{{{pagenav}}}
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span
class="sr-only">Close</span></button>
<h4 class="modal-title" id="myModalLabel">{{lang_details}}</h4>
</div>
<div class="modal-body">
<pre id="details-body"></pre>
</div>
</div>
</div>
</div>
<script type="application/javascript"><!--
document.addEventListener('DOMContentLoaded', function () {
function renderOption(item, escape) {
return '<div><div class="pull-right badge">' + escape(item.counter) + '</div>' + escape(item.logtypeid) + '</div>';
}
function renderSelected(item, escape) {
return '<div>' + escape(item.logtypeid) + '</div>';
}
var opts = {{{types}}} || [];
var $box = $('#filterstring').selectize({
options: opts,
plugins: ["remove_button"],
valueField: 'logtypeid',
searchField: "logtypeid",
openOnFocus: true,
create: true,
render: {option: renderOption, item: renderSelected},
maxItems: null,
highlight: false
});
var inst = $box[0].selectize;
$('.type-button').click(function() {
inst.addOption({logtypeid: this.title, counter: ''});
inst.addItem(this.title, true);
});
});
//--></script>
|