mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
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.
|
// Get current value.
|
||||||
if (in_array(
|
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
|
|| in_array(
|
||||||
$moduleData['module_type'],
|
$moduleData['module_type'],
|
||||||
[
|
[
|
||||||
MODULE_TYPE_REMOTE_SNMP,
|
MODULE_TYPE_REMOTE_SNMP,
|
||||||
@ -2433,8 +2434,10 @@ class AgentWizard extends HTML
|
|||||||
]
|
]
|
||||||
) === true
|
) === true
|
||||||
) {
|
) {
|
||||||
|
if (isset($moduleData['value']) === true) {
|
||||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// It unit of measure have data, attach to current value.
|
// It unit of measure have data, attach to current value.
|
||||||
if (empty($moduleData['module_unit']) === false) {
|
if (empty($moduleData['module_unit']) === false) {
|
||||||
@ -2593,7 +2596,8 @@ class AgentWizard extends HTML
|
|||||||
// Get current value.
|
// Get current value.
|
||||||
$currentValue = '';
|
$currentValue = '';
|
||||||
|
|
||||||
if (in_array(
|
if ($this->serverType === SERVER_TYPE_ENTERPRISE_SATELLITE
|
||||||
|
|| in_array(
|
||||||
$moduleData['module_type'],
|
$moduleData['module_type'],
|
||||||
[
|
[
|
||||||
MODULE_TYPE_REMOTE_SNMP,
|
MODULE_TYPE_REMOTE_SNMP,
|
||||||
@ -2603,8 +2607,10 @@ class AgentWizard extends HTML
|
|||||||
]
|
]
|
||||||
) === true
|
) === true
|
||||||
) {
|
) {
|
||||||
|
if (isset($moduleData['value']) === true) {
|
||||||
$currentValue = $this->snmpGetValue($moduleData['value']);
|
$currentValue = $this->snmpGetValue($moduleData['value']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Format current value with thousands and decimals.
|
// Format current value with thousands and decimals.
|
||||||
if (is_numeric($currentValue) === true) {
|
if (is_numeric($currentValue) === true) {
|
||||||
@ -3461,7 +3467,7 @@ class AgentWizard extends HTML
|
|||||||
} else {
|
} else {
|
||||||
preg_match('/\.\d+$/', $key, $index);
|
preg_match('/\.\d+$/', $key, $index);
|
||||||
$tmp = explode(': ', $oid_unit);
|
$tmp = explode(': ', $oid_unit);
|
||||||
$output[$index[0]] = ($tmp[1] ?? '');
|
$output[$index[0]] = str_replace('"', '', ($tmp[1] ?? ''));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user