mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
WebUI: Oxidized Device List: Link to config and refreshDevice Btn (#9129)
* WebUI: Direct link to oxidized config from list, oxidized refresh device capability * WebUI: Direct link to oxidized config from list, oxidized refresh device capability * Move oxidized_node_update in functions.php to avoid code duplication * Update refresh-oxidized-node.inc.php * Update functions.php
This commit is contained in:
@@ -6,17 +6,6 @@ require __DIR__ . '/../includes/init.php';
|
||||
|
||||
use LibreNMS\Config;
|
||||
|
||||
function oxidized_node_update($hostname, $msg, $username = 'not_provided')
|
||||
{
|
||||
// Work around https://github.com/rack/rack/issues/337
|
||||
$msg = str_replace("%", "", $msg);
|
||||
$postdata = ["user" => $username, "msg" => $msg];
|
||||
$oxidized_url = Config::get('oxidized.url');
|
||||
if (!empty($oxidized_url)) {
|
||||
Requests::put("$oxidized_url/node/next/$hostname", [], json_encode($postdata), ['proxy' => get_proxy()]);
|
||||
}
|
||||
}//end oxidized_node_update()
|
||||
|
||||
$hostname = $argv[1];
|
||||
$os = $argv[2];
|
||||
$msg = $argv[3];
|
||||
|
Reference in New Issue
Block a user