mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Implement Oxidized "config search" as an API (#10648)
* Implement Oxidized config search as API * Add Oxidized config search DOC. * Update Devices.md * change /configsearch/{searchstring} to /config/search/{searchstring} * Update Devices.md
This commit is contained in:
@ -1186,6 +1186,18 @@ function get_inventory(\Illuminate\Http\Request $request)
|
||||
}
|
||||
|
||||
|
||||
function search_oxidized(\Illuminate\Http\Request $request)
|
||||
{
|
||||
$search_in_conf_textbox = $request->route('searchstring');
|
||||
$result = search_oxidized_config($search_in_conf_textbox);
|
||||
|
||||
if (!$result) {
|
||||
return api_error(404, "Received no data from Oxidized");
|
||||
} else {
|
||||
return api_success($result, 'nodes');
|
||||
}
|
||||
}
|
||||
|
||||
function list_oxidized(\Illuminate\Http\Request $request)
|
||||
{
|
||||
$hostname = $request->route('hostname');
|
||||
|
Reference in New Issue
Block a user