2020-03-13 20:58:37 +01:00
|
|
|
@extends('poller.index')
|
|
|
|
|
|
|
|
@section('title', __('Poller Log'))
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
@parent
|
|
|
|
|
|
|
|
<table id="poll-log" class="table table-condensed table-hover table-striped">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th data-column-id="hostname">@lang('Hostname')</th>
|
|
|
|
<th data-column-id="last_polled">@lang('Last Polled')</th>
|
|
|
|
<th data-column-id="poller_group">@lang('Poller Group')</th>
|
2020-03-22 13:29:31 -05:00
|
|
|
<th data-column-id="last_polled_timetaken" data-order="desc">@lang('Polling Duration') (@lang('Seconds'))</th>
|
2020-03-13 20:58:37 +01:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</table>
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('scripts')
|
|
|
|
<script>
|
|
|
|
searchbar = "<div id=\"\{\{ctx.id\}\}\" class=\"\{\{css.header\}\}\"><div class=\"row\">"+
|
|
|
|
"<div class=\"col-sm-8 actionBar\"><span class=\"pull-left\">"+
|
2020-03-22 13:29:31 -05:00
|
|
|
"<a href='{{ route('poller.log') }}' class='btn btn-primary btn-sm @if($filter == 'unpolled') 'active' @endif'>All devices</a> "+
|
|
|
|
"<a href='{{ route('poller.log') }}?filter=unpolled' class='btn btn-danger btn-sm @if($filter == 'unpolled') 'active' @endif'>Unpolled devices</a>"+
|
2020-03-13 20:58:37 +01:00
|
|
|
"</div><div class=\"col-sm-4 actionBar\"><p class=\"\{\{css.search\}\}\"></p><p class=\"\{\{css.actions\}\}\"></p></div>";
|
|
|
|
|
|
|
|
var grid = $("#poll-log").bootgrid({
|
|
|
|
ajax: true,
|
|
|
|
rowCount: [50, 100, 250, -1],
|
|
|
|
columnSelection: false,
|
|
|
|
templates: {
|
|
|
|
header: searchbar
|
|
|
|
},
|
|
|
|
post: function ()
|
|
|
|
{
|
|
|
|
return {
|
|
|
|
id: "poll-log",
|
|
|
|
type: "{{ $filter }}"
|
|
|
|
};
|
|
|
|
},
|
|
|
|
url: "ajax_table.php"
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
@endsection
|