mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
api: Added the ability to list devices by location in the api (#5693)
* Adding location based filter for api-device calls * I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. * configured linting etc, now pr should pass * rebase and add entry to docs
This commit is contained in:
@@ -210,6 +210,8 @@ function list_devices()
|
||||
|
||||
if ($type == 'all' || empty($type)) {
|
||||
$sql = '1';
|
||||
} elseif ($type == 'location') {
|
||||
$sql = "`location` LIKE '%".$query."%'";
|
||||
} elseif ($type == 'ignored') {
|
||||
$sql = "`ignore`='1' AND `disabled`='0'";
|
||||
} elseif ($type == 'up') {
|
||||
|
Reference in New Issue
Block a user