mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Merge pull request #134 from laf/issue-133
Tidied up syslog on various pages to use bootstrap
This commit is contained in:
@@ -42,10 +42,14 @@ if ($_POST['program'])
|
|||||||
|
|
||||||
$sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? $where";
|
$sql = "SELECT *, DATE_FORMAT(timestamp, '%Y-%m-%d %T') AS date from syslog WHERE device_id = ? $where";
|
||||||
$sql .= " ORDER BY timestamp DESC LIMIT 1000";
|
$sql .= " ORDER BY timestamp DESC LIMIT 1000";
|
||||||
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
echo(' <div class="panel panel-default panel-condensed">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<strong>Eventlog entries</strong>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover table-condensed table-striped">');
|
||||||
foreach (dbFetchRows($sql, $param) as $entry) { include("includes/print-syslog.inc.php"); }
|
foreach (dbFetchRows($sql, $param) as $entry) { include("includes/print-syslog.inc.php"); }
|
||||||
echo("</table>");
|
echo(' </table>
|
||||||
|
</div>');
|
||||||
$pagetitle[] = "Syslog";
|
$pagetitle[] = "Syslog";
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -135,13 +135,24 @@ echo('
|
|||||||
|
|
||||||
if ($config['enable_syslog'])
|
if ($config['enable_syslog'])
|
||||||
{
|
{
|
||||||
echo("<div class=front-syslog>
|
|
||||||
<h3>Recent Syslog Messages</h3>
|
|
||||||
");
|
|
||||||
|
|
||||||
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog ORDER BY timestamp DESC LIMIT 20";
|
$sql = "SELECT *, DATE_FORMAT(timestamp, '%D %b %T') AS date from syslog ORDER BY timestamp DESC LIMIT 20";
|
||||||
$query = mysql_query($sql);
|
$query = mysql_query($sql);
|
||||||
echo('<table class="table table-bordered">');
|
|
||||||
|
echo('<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="panel panel-default panel-condensed">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<strong>Syslog entries</strong>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover table-condensed table-striped">');
|
||||||
|
|
||||||
while ($entry = mysql_fetch_assoc($query))
|
while ($entry = mysql_fetch_assoc($query))
|
||||||
{
|
{
|
||||||
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
|
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
|
||||||
@@ -150,6 +161,9 @@ if ($config['enable_syslog'])
|
|||||||
}
|
}
|
||||||
echo("</table>");
|
echo("</table>");
|
||||||
echo("</div>");
|
echo("</div>");
|
||||||
|
echo("</div>");
|
||||||
|
echo("</div>");
|
||||||
|
echo("</div>");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|||||||
@@ -89,13 +89,20 @@ if ($_SESSION['userlevel'] >= '5')
|
|||||||
$array = array_merge(array($_SESSION['user_id']), $array);
|
$array = array_merge(array($_SESSION['user_id']), $array);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo("<table cellspacing=0 cellpadding=2 width=100%>");
|
echo('<div class="panel panel-default panel-condensed">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<strong>Eventlog entries</strong>
|
||||||
|
</div>
|
||||||
|
<table class="table table-hover table-condensed table-striped">');
|
||||||
|
|
||||||
foreach (dbFetchRows($sql, $array) as $entry)
|
foreach (dbFetchRows($sql, $array) as $entry)
|
||||||
{
|
{
|
||||||
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
|
$entry = array_merge($entry, device_by_id_cache($entry['device_id']));
|
||||||
|
|
||||||
include("includes/print-syslog.inc.php");
|
include("includes/print-syslog.inc.php");
|
||||||
}
|
}
|
||||||
echo("</table>");
|
|
||||||
|
echo("</table>
|
||||||
|
</div>");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user