Merge branch 'ent-12807-error-sql-vista-de-alertas-en-develop' into 'develop'

Ent 12807 error sql vista de alertas en develop

See merge request artica/pandorafms!6888
This commit is contained in:
Rafael Ameijeiras 2024-01-29 09:30:14 +00:00
commit c5c0b838e0

View File

@ -536,19 +536,21 @@ echo '</div>';
ui_require_css_file('cluetip', 'include/styles/js/'); ui_require_css_file('cluetip', 'include/styles/js/');
ui_require_jquery_file('cluetip'); ui_require_jquery_file('cluetip');
$system_higher = false; if (isset($id_agente)) {
$modules_agent = db_get_all_rows_sql(sprintf('SELECT id_agente FROM tagente_modulo WHERE id_agente = %s', $id_agente)); $system_higher = false;
if (is_array($modules_agent)) { $modules_agent = db_get_all_rows_sql(sprintf('SELECT id_agente FROM tagente_modulo WHERE id_agente = %s', $id_agente));
$all_modules = db_get_all_rows_sql('SELECT id_agente FROM tagente_modulo'); if (is_array($modules_agent)) {
$all_agents = db_get_all_rows_sql('SELECT id_agente FROM tagente'); $all_modules = db_get_all_rows_sql('SELECT id_agente FROM tagente_modulo');
if (is_array($all_modules) && is_array($all_agents)) { $all_agents = db_get_all_rows_sql('SELECT id_agente FROM tagente');
if ((count($all_modules) / count($all_agents)) >= 200) { if (is_array($all_modules) && is_array($all_agents)) {
$system_higher = true; if ((count($all_modules) / count($all_agents)) >= 200) {
$system_higher = true;
}
} }
} }
}
echo '<div id="system_higher" class="invisible_important agent_details_agent_data flex_important"><img src="images/alert-yellow@svg.svg" width="10%" class="mrgn_right_20px">'.__('Your system has a much higher rate of modules per agent than recommended (200 modules per agent). This implies performance problems in the system, please consider reducing the number of modules in this agent.').'</div>'; echo '<div id="system_higher" class="invisible_important agent_details_agent_data flex_important"><img src="images/alert-yellow@svg.svg" width="10%" class="mrgn_right_20px">'.__('Your system has a much higher rate of modules per agent than recommended (200 modules per agent). This implies performance problems in the system, please consider reducing the number of modules in this agent.').'</div>';
}
?> ?>