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:
PipoCanaja
2018-09-05 02:09:27 +02:00
committed by Tony Murray
parent 9fc3891441
commit 3f806fdff3
5 changed files with 93 additions and 11 deletions

View File

@@ -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];