From 6a7eca83df379369498c4429406bc9dc41a7c1b7 Mon Sep 17 00:00:00 2001 From: Jonathan Date: Fri, 22 Dec 2023 12:16:34 +0100 Subject: [PATCH 1/3] #12539 message 200 modules agent --- .../operation/agentes/alerts_status.php | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/pandora_console/operation/agentes/alerts_status.php b/pandora_console/operation/agentes/alerts_status.php index c262d8c4b3..9cba248063 100755 --- a/pandora_console/operation/agentes/alerts_status.php +++ b/pandora_console/operation/agentes/alerts_status.php @@ -535,6 +535,21 @@ echo ''; ui_require_css_file('cluetip', 'include/styles/js/'); ui_require_jquery_file('cluetip'); + +$system_higher = false; +$modules_agent = db_get_all_rows_sql(sprintf('SELECT id_agente FROM tagente_modulo WHERE id_agente = %s', $id_agente)); +if (is_array($modules_agent)) { + $all_modules = db_get_all_rows_sql('SELECT id_agente FROM tagente_modulo'); + $all_agents = db_get_all_rows_sql('SELECT id_agente FROM tagente'); + if (is_array($all_modules) && is_array($all_agents)) { + if ((count($all_modules) / count($all_agents)) >= 200) { + $system_higher = true; + } + } +} + +echo ''; + ?>