#11314 Collapses the boxes for modules, alerts and events when the agent does not have this information related

This commit is contained in:
Jorge Rincon 2023-05-26 12:30:36 +02:00
parent a32d9351df
commit 4984e2608a
3 changed files with 5 additions and 3 deletions

View File

@ -475,6 +475,7 @@ $html_content = ob_get_clean();
if ($agent_view_page === true) {
// Create controlled toggle content.
$alerts_count = alerts_get_alerts(0, '', 'all', -1, $true, true, $agent['id_agente']);
html_print_div(
[
'class' => 'agent_details_line',
@ -483,7 +484,7 @@ if ($agent_view_page === true) {
'<span class="subsection_header_title">'.__('Full list of alerts').'</span>',
'status_monitor_agent',
!$alerts_defined,
false,
($alerts_count > 0) ? false : true,
true,
'',
'',

View File

@ -196,7 +196,7 @@ html_print_div(
).'</span>',
'status_monitor_agent',
false,
false,
($agent['total_count'] > 0) ? false : true,
true,
'',
'white-box-content',

View File

@ -22,6 +22,7 @@ if (!isset($id_agente)) {
require_once 'include/functions_events.php';
ui_require_css_file('events');
$event_count = db_get_row('tevento', 'id_agente', $id_agente);
html_print_div(
[
'class' => 'agent_details_line',
@ -30,7 +31,7 @@ html_print_div(
'<span class="subsection_header_title">'.__('Latest events for this agent').'</span>',
__('Latest events for this agent'),
'latest_events_agent',
false,
($event_count) ? false : true,
true,
'',
'box-flat white-box-content no_border',