';
echo '';
// ---------------------------------------------------------------------
// The status horizontal bars (Global health, Monitor sanity...
// ---------------------------------------------------------------------
$table = new stdClass();
$table->width = '100%';
$table->class = 'info_table no-td-borders td-bg-white';
$table->cellpadding = 2;
$table->cellspacing = 2;
$table->border = 0;
$table->head = [];
$table->data = [];
$table->style = [];
$stats = reporting_get_stats_indicators($data, 120, 10, false);
$status = '';
foreach ($stats as $stat) {
$status .= ''.$stat['title'].''.' | '.$stat['graph'].' | ';
}
$status .= ' ';
$table->data[0][0] = $status;
$table->rowclass[] = '';
// ---------------------------------------------------------------------
// Monitor checks
// ---------------------------------------------------------------------
$data_agents = [
__('Critical') => $data['monitor_critical'],
__('Warning') => $data['monitor_warning'],
__('Normal') => $data['monitor_ok'],
__('Unknown') => $data['monitor_unknown'],
__('Not init') => $data['monitor_not_init'],
];
$table->data[1][0] = reporting_get_stats_alerts($data);
$table->data[2][0] = reporting_get_stats_modules_status($data, 180, 100, false, $data_agents);
$table->data[3][0] = reporting_get_stats_agents_monitors($data);
$table->rowclass[] = '';
// ---------------------------------------------------------------------
// Server performance
// ---------------------------------------------------------------------
if ($is_admin) {
$table->data[4][0] = reporting_get_stats_servers();
$table->rowclass[] = '';
}
ui_toggle(
html_print_table($table, true),
__('Report of State'),
'',
'',
false
);
echo ' | ';
// Left column
echo '';
// ---------------------------------------------------------------------
// Last events information
// ---------------------------------------------------------------------
if (check_acl($config['id_user'], 0, 'ER')) {
$tags_condition = tags_get_acl_tags(false, 0, 'ER', 'event_condition');
$event_filter = 'estado<>1';
if (!empty($tags_condition)) {
$event_filter .= " AND ($tags_condition)";
}
if ($config['event_view_hr']) {
$event_filter .= ' AND utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')';
}
$events = events_print_event_table($event_filter, 10, '100%', true, false, true);
ui_toggle(
$events,
__('Latest events'),
'',
'',
false
);
}
// ---------------------------------------------------------------------
// Server information
// ---------------------------------------------------------------------
if ($is_admin) {
$tiny = true;
include $config['homedir'].'/godmode/servers/servers.build_table.php';
}
$out = '';
$out .= '';
$out .= ' | ';
$out .= '';
$out .= ' | ';
ui_toggle(
$out,
__('Event graphs'),
'',
'',
false
);
echo ' | ';
echo '