diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 3dcb84a8c1..0eb4530a93 100755 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -14816,7 +14816,13 @@ function reporting_get_stats_servers() 'class' => 'main_menu_icon invert_filter', ] ); - $tdata[1] = ''.html_print_image('images/spinner.gif', true).''; + $sql_count_event = 'SELECT SQL_NO_CACHE COUNT(id_evento) FROM tevento '; + if ($config['event_view_hr']) { + $sql_count_event .= 'WHERE utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')'; + } + + $system_events = db_get_value_sql($sql_count_event); + $tdata[1] = ''.$system_events.''; if (isset($system_events) && $system_events > 50000 && !enterprise_installed()) { $tdata[2] = "
"; @@ -14831,37 +14837,6 @@ function reporting_get_stats_servers() $output = '
'.__('Server performance').''.html_print_table($table_srv, true).'
'; - $public_hash = get_parameter('auth_hash', false); - if ($public_hash === false) { - $output .= ''; - } else { - // This is for public link on the dashboard - $sql_count_event = 'SELECT SQL_NO_CACHE COUNT(id_evento) FROM tevento '; - if ($config['event_view_hr']) { - $sql_count_event .= 'WHERE utimestamp > (UNIX_TIMESTAMP(NOW()) - '.($config['event_view_hr'] * SECONDS_1HOUR).')'; - } - - $system_events = db_get_value_sql($sql_count_event); - - $output .= ''; - } - return $output; }