mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
only show syslog on device overview when enable_syslog=1
git-svn-id: http://www.observium.org/svn/observer/trunk@2727 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -59,15 +59,18 @@ if ($services['total'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
### FIXME - split this into overview/syslog.inc.php?
|
### FIXME - split this into overview/syslog.inc.php?
|
||||||
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
|
if ($config['enable_syslog'])
|
||||||
if (count($syslog))
|
|
||||||
{
|
{
|
||||||
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
$syslog = dbFetchRows("SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? ORDER BY timestamp DESC LIMIT 20", array($device['device_id']));
|
||||||
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device=' . $device['device_id'] . '/tab=syslog/"><img align="absmiddle" src="images/16/printer.png" /> Recent Syslog</a></p>');
|
if (count($syslog))
|
||||||
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
{
|
||||||
foreach ($syslog as $entry) { include("includes/print-syslog.inc.php"); }
|
echo("<div style='background-color: #eeeeee; margin: 5px; padding: 5px;'>");
|
||||||
echo("</table>");
|
echo('<p style="padding: 0px 5px 5px;" class="sectionhead"><a class="sectionhead" href="device/device=' . $device['device_id'] . '/tab=syslog/"><img align="absmiddle" src="images/16/printer.png" /> Recent Syslog</a></p>');
|
||||||
echo("</div>");
|
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
||||||
|
foreach ($syslog as $entry) { include("includes/print-syslog.inc.php"); }
|
||||||
|
echo("</table>");
|
||||||
|
echo("</div>");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("</td>");
|
echo("</td>");
|
||||||
|
|||||||
Reference in New Issue
Block a user