mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed search & device eventlog (#9329)
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926` After you are done testing, you can remove the changes with `./scripts/github-remove`. If there are schema changes, you can ask on discord how to revert. In #9252 search box and inside device eventlog where broken. Noticed in https://community.librenms.org/t/bug-set-filter-in-device-eventlog-shows-filtered-events-from-all-devices/5633 I hope my fix does the job :)
This commit is contained in:
committed by
Neil Lathwood
parent
3fc9e334b8
commit
4a23f8dddd
@@ -58,6 +58,10 @@ class EventlogController extends TableController
|
||||
$query->where('type', $type);
|
||||
}
|
||||
|
||||
if ($searchPhrase = $request->get('searchPhrase')) {
|
||||
$query->where('message', 'like', '%'.$searchPhrase.'%');
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ $pagetitle[] = 'Eventlog';
|
||||
'</div> ' +
|
||||
<?php
|
||||
} else {
|
||||
echo "' <input type=\"hidden\" name=\"device\" id=\"device\" value=\"" . $device_id . "\">' + ";
|
||||
echo "' <input type=\"hidden\" name=\"device\" id=\"device\" value=\"" . $vars['device'] . "\">' + ";
|
||||
}
|
||||
?>
|
||||
'<div class="form-group"><label><strong>Type </strong></label>' +
|
||||
|
||||
Reference in New Issue
Block a user