mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update syslog.inc.php
This commit is contained in:
@@ -1,28 +1,27 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$common_output[] = '
|
||||||
$sql = "SELECT *, DATE_FORMAT(timestamp, '".$config['dateformat']['mysql']['compact']."') AS date from syslog ORDER BY timestamp DESC LIMIT 20";
|
<table id="sysloglog" class="table table-hover table-condensed table-striped">
|
||||||
|
<thead>
|
||||||
$syslog_output = '
|
<tr>
|
||||||
<div class="container-fluid">
|
<th data-column-id="datetime" data-order="desc">Datetime</th>
|
||||||
<div class="row">
|
<th data-column-id="hostname">Hostname</th>
|
||||||
<div class="col-md-12">
|
<th data-column-id="program">Program</th>
|
||||||
<div class="panel panel-default panel-condensed">
|
<th data-column-id="message">Message</th>
|
||||||
<div class="panel-heading">
|
</tr>
|
||||||
<strong>Syslog entries</strong>
|
</thead>
|
||||||
</div>
|
|
||||||
<table class="table table-hover table-condensed table-striped">';
|
|
||||||
|
|
||||||
foreach (dbFetchRows($sql) as $entry) {
|
|
||||||
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
|
|
||||||
include 'includes/print-syslog.inc.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
$syslog_output .= '
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
<script>
|
||||||
</div>
|
var syslog_grid = $("#syslog").bootgrid({
|
||||||
</div>
|
ajax: true,
|
||||||
</div>
|
post: function ()
|
||||||
|
{
|
||||||
|
return {
|
||||||
|
id: "syslog",
|
||||||
|
device: "' .mres($vars['device']) .'",
|
||||||
|
type: "' .mres($vars['type']) .'",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
url: "ajax_table.php"
|
||||||
|
});
|
||||||
|
</script>
|
||||||
';
|
';
|
||||||
|
|
||||||
$common_output[] = $syslog_output;
|
|
||||||
|
|||||||
Reference in New Issue
Block a user