mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -25,7 +25,7 @@ if (!isset($module) && validate_device_id($device['device_id']) === false) {
|
||||
$state = 0;
|
||||
}
|
||||
|
||||
if (isset($attribs['discover_'.$module]) && $attribs['discover_'.$module] != $config['discover_modules'][$module]) {
|
||||
if (isset($attribs['discover_' . $module]) && $attribs['discover_' . $module] != \LibreNMS\Config::get("discover_modules.$module")) {
|
||||
del_dev_attrib($device, $module);
|
||||
} else {
|
||||
set_dev_attrib($device, $module, $state);
|
||||
|
||||
@@ -24,7 +24,7 @@ if (!isset($module) && validate_device_id($device['device_id']) === false) {
|
||||
$state = 0;
|
||||
}
|
||||
|
||||
if (isset($attribs['poll_'.$module]) && $attribs['poll_'.$module] != $config['poller_modules'][$module]) {
|
||||
if (isset($attribs['poll_' . $module]) && $attribs['poll_' . $module] != \LibreNMS\Config::get("poller_modules.$module")) {
|
||||
del_dev_attrib($device, $module);
|
||||
} else {
|
||||
set_dev_attrib($device, $module, $state);
|
||||
|
||||
@@ -23,7 +23,7 @@ if (!LegacyAuth::user()->hasGlobalAdmin()) {
|
||||
$transport = $vars['transport'] ?: null;
|
||||
$transport_id = $vars['transport_id'] ?: null;
|
||||
|
||||
require_once $config['install_dir'].'/includes/alerts.inc.php';
|
||||
require_once Config::get('install_dir') . '/includes/alerts.inc.php';
|
||||
$tmp = array(dbFetchRow('select device_id,hostname,sysDescr,version,hardware,location_id from devices order by device_id asc limit 1'));
|
||||
$tmp['contacts'] = GetContacts($tmp);
|
||||
$obj = array(
|
||||
@@ -33,7 +33,7 @@ $obj = array(
|
||||
"version" => $tmp[0]['version'],
|
||||
"hardware" => $tmp[0]['hardware'],
|
||||
"location" => $tmp[0]['location'],
|
||||
"title" => "Testing transport from ".$config['project_name'],
|
||||
"title" => "Testing transport from " . Config::get('project_name'),
|
||||
"elapsed" => "11s",
|
||||
"id" => "000",
|
||||
"faults" => false,
|
||||
|
||||
@@ -40,7 +40,7 @@ if (!empty($ifName) && is_numeric($port_id) && is_numeric($port_id)) {
|
||||
$device_tune = get_dev_attrib($device, 'override_rrdtool_tune');
|
||||
if ($port_tune == "true" ||
|
||||
($device_tune == "true" && $port_tune != 'false') ||
|
||||
($config['rrdtool_tune'] == "true" && $port_tune != 'false' && $device_tune != 'false')) {
|
||||
(\LibreNMS\Config::get('rrdtool_tune') == "true" && $port_tune != 'false' && $device_tune != 'false')) {
|
||||
$rrdfile = get_port_rrdfile_path($device['hostname'], $port_id);
|
||||
rrdtool_tune('port', $rrdfile, $speed);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user