Merge branch 'ent-8239-12653-GUARDIA-No-devuelve-valor-SNMP-Interface-wizard-cuando-se-ejecuta-a-traves-de-pandora-exec-proxy-satelite' into 'develop'
Ent 8239 12653 guardia no devuelve valor snmp interface wizard cuando se ejecuta a traves de pandora exec proxy satelite See merge request artica/pandorafms!4530
This commit is contained in:
commit
9ba2169de3
|
@ -2423,7 +2423,8 @@ class AgentWizard extends HTML
|
|||
}
|
||||
|
||||
// Get current value.
|
||||
if (in_array(
|
||||
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||
|| in_array(
|
||||
$moduleData['module_type'],
|
||||
[
|
||||
MODULE_TYPE_REMOTE_SNMP,
|
||||
|
@ -2433,8 +2434,10 @@ class AgentWizard extends HTML
|
|||
]
|
||||
) === true
|
||||
) {
|
||||
if (isset($moduleData['value']) === true) {
|
||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||
}
|
||||
}
|
||||
|
||||
// It unit of measure have data, attach to current value.
|
||||
if (empty($moduleData['module_unit']) === false) {
|
||||
|
@ -2593,7 +2596,8 @@ class AgentWizard extends HTML
|
|||
// Get current value.
|
||||
$currentValue = '';
|
||||
|
||||
if (in_array(
|
||||
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||
|| in_array(
|
||||
$moduleData['module_type'],
|
||||
[
|
||||
MODULE_TYPE_REMOTE_SNMP,
|
||||
|
@ -2603,8 +2607,10 @@ class AgentWizard extends HTML
|
|||
]
|
||||
) === true
|
||||
) {
|
||||
if (isset($moduleData['value']) === true) {
|
||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||
}
|
||||
}
|
||||
|
||||
// Format current value with thousands and decimals.
|
||||
if (is_numeric($currentValue) === true) {
|
||||
|
@ -3461,7 +3467,7 @@ class AgentWizard extends HTML
|
|||
} else {
|
||||
preg_match('/\.\d+$/', $key, $index);
|
||||
$tmp = explode(': ', $oid_unit);
|
||||
$output[$index[0]] = ($tmp[1] ?? '');
|
||||
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue