mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 02:48:10 +02:00
Fixed metaconsole SNMP interface graphs
This commit is contained in:
parent
5093d94db3
commit
4a93f6c3a6
@ -1286,7 +1286,7 @@ function graphic_combined_module(
|
|||||||
|
|
||||||
if ($count_modules > 0) {
|
if ($count_modules > 0) {
|
||||||
foreach ($module_list as $key => $value) {
|
foreach ($module_list as $key => $value) {
|
||||||
$sources[$key]['id_server'] = $value['server'];
|
$sources[$key]['id_server'] = (isset($value['id_server']) === true) ? $value['id_server'] : $params['id_server'];
|
||||||
$sources[$key]['id_agent_module'] = $value['module'];
|
$sources[$key]['id_agent_module'] = $value['module'];
|
||||||
$sources[$key]['weight'] = $weights[$key];
|
$sources[$key]['weight'] = $weights[$key];
|
||||||
$sources[$key]['label'] = $params_combined['labels'];
|
$sources[$key]['label'] = $params_combined['labels'];
|
||||||
@ -1339,6 +1339,7 @@ function graphic_combined_module(
|
|||||||
$modules = [];
|
$modules = [];
|
||||||
foreach ($sources as $source) {
|
foreach ($sources as $source) {
|
||||||
if (is_metaconsole() === true) {
|
if (is_metaconsole() === true) {
|
||||||
|
metaconsole_restore_db();
|
||||||
$server = metaconsole_get_connection_by_id($source['id_server']);
|
$server = metaconsole_get_connection_by_id($source['id_server']);
|
||||||
if (metaconsole_connect($server) != NOERR) {
|
if (metaconsole_connect($server) != NOERR) {
|
||||||
continue;
|
continue;
|
||||||
@ -1499,8 +1500,9 @@ function graphic_combined_module(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_metaconsole()) {
|
if (is_metaconsole()) {
|
||||||
|
metaconsole_restore_db();
|
||||||
$server = metaconsole_get_connection_by_id(
|
$server = metaconsole_get_connection_by_id(
|
||||||
$agent_module_id['server']
|
isset($agent_module_id['server']) ? $agent_module_id['server'] : $source['id_server']
|
||||||
);
|
);
|
||||||
if (metaconsole_connect($server) != NOERR) {
|
if (metaconsole_connect($server) != NOERR) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -154,6 +154,10 @@ if ($date > $now) {
|
|||||||
'zoom' => $zoom,
|
'zoom' => $zoom,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (is_metaconsole()) {
|
||||||
|
$params['id_server'] = $server_id;
|
||||||
|
}
|
||||||
|
|
||||||
if ($config['type_interface_charts'] == 'line') {
|
if ($config['type_interface_charts'] == 'line') {
|
||||||
$stacked = CUSTOM_GRAPH_LINE;
|
$stacked = CUSTOM_GRAPH_LINE;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user