diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 89b7c56a3e..972e6f37ca 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -137,7 +137,16 @@ $table->data[] = $tdata; // Modules by status. $tdata = []; -$tdata[0] = reporting_get_stats_modules_status($data, 180, 100); + +$data_agents = [ + __('Critical') => $data['monitor_critical'], + __('Warning') => $data['monitor_warning'], + __('Normal') => $data['monitor_ok'], + __('Unknown') => $data['monitor_unknown'], + __('Not init') => $data['monitor_not_init'], +]; + +$tdata[0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents); $table->rowclass[] = ''; $table->data[] = $tdata; diff --git a/pandora_console/godmode/agentes/module_manager.php b/pandora_console/godmode/agentes/module_manager.php index dd1427af17..326753050f 100644 --- a/pandora_console/godmode/agentes/module_manager.php +++ b/pandora_console/godmode/agentes/module_manager.php @@ -466,7 +466,14 @@ if ($module_action === 'delete') { $id_agent_module_disable ); - if (db_process_sql($sql)) { + $id_agent_changed[] = modules_get_agentmodule_agent($id_agent_module_disable); + $agent_update_result = db_process_sql_update( + 'tagente', + ['update_module_count' => 1], + ['id_agente' => $id_agent_changed] + ); + + if (db_process_sql($sql) !== false && $agent_update_result !== false) { $updated_count++; } }