diff --git a/pandora_console/general/logon_ok.php b/pandora_console/general/logon_ok.php index 059443eff6..920e4ace8e 100644 --- a/pandora_console/general/logon_ok.php +++ b/pandora_console/general/logon_ok.php @@ -30,341 +30,3 @@ use PandoraFMS\TacticalView\GeneralTacticalView; $tacticalView = new GeneralTacticalView(); $tacticalView->render(); -return; -// Temporal return for develop. - // Config functions. -require_once 'include/config.php'; - -// This solves problems in enterprise load. -global $config; - -check_login(); -// ACL Check. -if (check_acl($config['id_user'], 0, 'AR') === 0) { - db_pandora_audit( - AUDIT_LOG_ACL_VIOLATION, - 'Trying to access Default view' - ); - include 'general/noaccess.php'; - exit; -} - -require_once 'include/functions_reporting.php'; -require_once 'include/functions_tactical.php'; -require_once $config['homedir'].'/include/functions_graph.php'; - -if (tags_has_user_acl_tags()) { - ui_print_tags_warning(); -} - -$all_data = tactical_status_modules_agents( - $config['id_user'], - false, - 'AR' -); -$data = []; - -$data['monitor_not_init'] = (int) $all_data['_monitors_not_init_']; -$data['monitor_unknown'] = (int) $all_data['_monitors_unknown_']; -$data['monitor_ok'] = (int) $all_data['_monitors_ok_']; -$data['monitor_warning'] = (int) $all_data['_monitors_warning_']; -$data['monitor_critical'] = (int) $all_data['_monitors_critical_']; -$data['monitor_not_normal'] = (int) $all_data['_monitor_not_normal_']; -$data['monitor_alerts'] = (int) $all_data['_monitors_alerts_']; -$data['monitor_alerts_fired'] = (int) $all_data['_monitors_alerts_fired_']; -$data['monitor_total'] = (int) $all_data['_monitor_total_']; - - -$data['total_agents'] = (int) $all_data['_total_agents_']; - -$data['monitor_checks'] = (int) $all_data['_monitor_checks_']; -if (!empty($all_data)) { - if ($data['monitor_not_normal'] > 0 && $data['monitor_checks'] > 0) { - $data['monitor_health'] = format_numeric((100 - ($data['monitor_not_normal'] / ($data['monitor_checks'] / 100))), 1); - } else { - $data['monitor_health'] = 100; - } - - if ($data['monitor_not_init'] > 0 && $data['monitor_checks'] > 0) { - $data['module_sanity'] = format_numeric((100 - ($data['monitor_not_init'] / ($data['monitor_checks'] / 100))), 1); - } else { - $data['module_sanity'] = 100; - } - - if (isset($data['alerts'])) { - if ($data['monitor_alerts_fired'] > 0 && $data['alerts'] > 0) { - $data['alert_level'] = format_numeric((100 - ($data['monitor_alerts_fired'] / ($data['alerts'] / 100))), 1); - } else { - $data['alert_level'] = 100; - } - } else { - $data['alert_level'] = 100; - $data['alerts'] = 0; - } - - $data['monitor_bad'] = ($data['monitor_critical'] + $data['monitor_warning']); - - if ($data['monitor_bad'] > 0 && $data['monitor_checks'] > 0) { - $data['global_health'] = format_numeric((100 - ($data['monitor_bad'] / ($data['monitor_checks'] / 100))), 1); - } else { - $data['global_health'] = 100; - } - - $data['server_sanity'] = format_numeric((100 - $data['module_sanity']), 1); -} - -ui_require_css_file('logon'); - -echo '
'.$stat['title'].' | '.$stat['graph'].' |
'.__('Welcome to our monitoring tool so grand,').'
-
'.__('Where data insights are at your command.').'
-
'.__('Sales, marketing, operations too,').'
-
'.__("Customer support, we've got you.").'
-
'.__('Our interface is user-friendly,').'
-
'.__("Customize your dashboard, it's easy.").'
-
'.__('Set up alerts and gain insights so keen,').'
-
'.__("Optimize your data, like you've never seen.").'
-
'.__('Unleash its power now, and join the pro league,').'
-
'.__('Unlock the potential of your data to intrigue.').'
-
'.__('Monitoring made simple, efficient and fun,').'
-
'.__('Discover a whole new way to get things done.').'
-
'.__('And take control of your IT once and for all.').'
- - '.__('You can replace this message with a personalized one at Admin tools -> Site news.').' - '; - - $output_news .= '