mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix searchbox on device's eventlog
This commit is contained in:
@@ -19,14 +19,19 @@
|
||||
?>
|
||||
</select>
|
||||
</label>
|
||||
<input class=submit type=submit value=Search>
|
||||
<input class="submit" type="submit" value="Search">
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
print_optionbar_end();
|
||||
|
||||
$entries = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = ? ORDER BY `datetime` DESC LIMIT 0,250", array($device['device_id']));
|
||||
$sql = "";
|
||||
if( !empty($_POST['string']) ) {
|
||||
$sql .= " AND message LIKE '%".mres($_POST['string'])."%'";
|
||||
}
|
||||
|
||||
$entries = dbFetchRows("SELECT *,DATE_FORMAT(datetime, '%D %b %Y %T') as humandate FROM `eventlog` WHERE `host` = ? $sql ORDER BY `datetime` DESC LIMIT 0,250", array($device['device_id']));
|
||||
|
||||
echo(' <div class="panel panel-default panel-condensed">
|
||||
<div class="panel-heading">
|
||||
|
Reference in New Issue
Block a user