mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
* Added Recent Graylog Entries to Device Overview (WIP) * Improved "Recent Graylog" entries on device overview (WIP) Added $config['graylog']['device-page']['rowCount'] to set maximum rows shown in "Recent Graylog" on device overview (Default: 10) Added $config['graylog']['device-page']['maxLevel'] to set the maximum message level shown in "Recent Graylog" on device overview (Default: 7, validates value to be >= 0 and <= 7) * Fixed code styling issue * Added Log Level filter to Graylog widget Added Log Level filter to Graylog pages (device pages and graylog overview) * Added documentation for new configuration options * Removed unneccesary (and already commented) using Renamed "maxLevel" to "loglevel" as suggested by a colleague * Added doc for $config['graylog']['loglevel'] * Removed includes/html/print-graylog.inc.php and inlined it in includes/html/pages/device/overview/graylog.inc.php Removed comma in json object in resources/views/widgets/graylog.blade.php Replaced translation strings in resources/views/widgets/settings/graylog.blade.php with existing translation strings * log level -> minimum log level * Use Config::get() default functionality * Oops
41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<div class="table-responsive">
|
|
<table id="graylog-{{ $id }}" class="table table-hover table-condensed graylog">
|
|
<thead>
|
|
<tr>
|
|
<th data-column-id="severity" data-sortable="false"></th>
|
|
<th data-column-id="timestamp" data-formatter="browserTime">@lang('Timestamp')</th>
|
|
<th data-column-id="level" data-sortable="false">@lang('Level')</th>
|
|
<th data-column-id="source">@lang('Source')</th>
|
|
<th data-column-id="message" data-sortable="false">@lang('Message')</th>
|
|
<th data-column-id="facility" data-sortable="false">@lang('Facility')</th>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
|
|
<script>
|
|
$("#graylog-{{ $id }}").bootgrid({
|
|
ajax: true,
|
|
rowCount: ['{{ $limit }}', 25,50,100,250,-1],
|
|
formatters: {
|
|
"browserTime": function(column, row) {
|
|
@config('graylog.timezone')
|
|
return row.timestamp;
|
|
@else
|
|
return moment.parseZone(row.timestamp).local().format("YYYY-MM-DD HH:MM:SS");
|
|
@endconfig
|
|
}
|
|
},
|
|
post: function ()
|
|
{
|
|
return {
|
|
stream: "{{ $stream }}",
|
|
device: "{{ $device }}",
|
|
range: "{{ $range }}",
|
|
loglevel: "{{ $loglevel }}"
|
|
};
|
|
},
|
|
url: "{{ url('/ajax/table/graylog') }}"
|
|
});
|
|
</script>
|