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:
Daniel Rodriguez 2021-11-17 10:20:43 +00:00
commit 9ba2169de3
1 changed files with 27 additions and 21 deletions

View File

@ -2423,17 +2423,20 @@ class AgentWizard extends HTML
}
// Get current value.
if (in_array(
$moduleData['module_type'],
[
MODULE_TYPE_REMOTE_SNMP,
MODULE_TYPE_REMOTE_SNMP_INC,
MODULE_TYPE_REMOTE_SNMP_STRING,
MODULE_TYPE_REMOTE_SNMP_PROC,
]
) === true
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|| in_array(
$moduleData['module_type'],
[
MODULE_TYPE_REMOTE_SNMP,
MODULE_TYPE_REMOTE_SNMP_INC,
MODULE_TYPE_REMOTE_SNMP_STRING,
MODULE_TYPE_REMOTE_SNMP_PROC,
]
) === true
) {
$currentValue = $this->snmpGetValue($moduleData['value']);
if (isset($moduleData['value']) === true) {
$currentValue = $this->snmpGetValue($moduleData['value']);
}
}
// It unit of measure have data, attach to current value.
@ -2593,17 +2596,20 @@ class AgentWizard extends HTML
// Get current value.
$currentValue = '';
if (in_array(
$moduleData['module_type'],
[
MODULE_TYPE_REMOTE_SNMP,
MODULE_TYPE_REMOTE_SNMP_INC,
MODULE_TYPE_REMOTE_SNMP_STRING,
MODULE_TYPE_REMOTE_SNMP_PROC,
]
) === true
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|| in_array(
$moduleData['module_type'],
[
MODULE_TYPE_REMOTE_SNMP,
MODULE_TYPE_REMOTE_SNMP_INC,
MODULE_TYPE_REMOTE_SNMP_STRING,
MODULE_TYPE_REMOTE_SNMP_PROC,
]
) === true
) {
$currentValue = $this->snmpGetValue($moduleData['value']);
if (isset($moduleData['value']) === true) {
$currentValue = $this->snmpGetValue($moduleData['value']);
}
}
// Format current value with thousands and decimals.
@ -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] ?? ''));
}
}
}