From ea4ac96a9a2b33ce17a54e55027d44dbef41a94a Mon Sep 17 00:00:00 2001 From: enriquecd Date: Fri, 4 Nov 2016 17:29:18 +0100 Subject: [PATCH] Fix a visual bug in tactical view #111 --- .../include/functions_reporting.php | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 866c775f87..da37db206b 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -5661,7 +5661,8 @@ function reporting_get_stats_agents_monitors($data) { $tdata[1] = $data["total_agents"] <= 0 ? '-' : $data["total_agents"]; $tdata[1] = '' . $tdata[1] . ''; - if($data["total_agents"]>500 && !enterprise_installed()){ + + if($data["total_agents"]>500 && !enterprise_installed()) { $tdata[2] = "
"; } @@ -5669,7 +5670,8 @@ function reporting_get_stats_agents_monitors($data) { $tdata[4] = $data["monitor_checks"] <= 0 ? '-' : $data["monitor_checks"]; $tdata[4] = '' . $tdata[4] . ''; - if(($data["monitor_checks"]/$data["total_agents"] > 100) && !enterprise_installed()) { + + if(($data["monitor_checks"]/$data["total_agents"]>100) && !enterprise_installed()) { $tdata[5] = "
"; } @@ -8323,9 +8325,8 @@ function reporting_get_stats_servers($tiny = true) { $tdata = array();'' . format_numeric($server_performance ["total_local_modules"]) . ''; $tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px')); $tdata[1] = '' . format_numeric($server_performance ["total_modules"]) . ''; - $tdata[2] = ' '; - $tdata[3] = '' . format_numeric($server_performance ["total_modules_rate"], 2) . ''; - $tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; + $tdata[2] = '' . format_numeric($server_performance ["total_modules_rate"], 2) . ''; + $tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -8339,14 +8340,9 @@ function reporting_get_stats_servers($tiny = true) { $tdata = array(); $tdata[0] = html_print_image('images/database.png', true, array('title' => __('Local modules'), 'width' => '25px')); $tdata[1] = '' . format_numeric($server_performance ["total_local_modules"]) . ''; - - - $tdata[2] = ' '; - - $tdata[3] = '' . - format_numeric($server_performance ["local_modules_rate"], 2) . ''; - - $tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; + $tdata[2] = '' . + format_numeric($server_performance ["local_modules_rate"], 2) . ''; + $tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; @@ -8356,17 +8352,21 @@ function reporting_get_stats_servers($tiny = true) { $tdata[0] = html_print_image('images/network.png', true, array('title' => __('Remote modules'), 'width' => '25px')); $tdata[1] = '' . format_numeric($server_performance ["total_remote_modules"]) . ''; + /* Hello there! :) +We added some of what seems to be "buggy" messages to the openSource version recently. This is not to force open-source users to move to the enterprise version, this is just to inform people using Pandora FMS open source that it requires skilled people to maintain and keep it running smoothly without professional support. This does not imply open-source version is limited in any way. If you check the recently added code, it contains only warnings and messages, no limitations except one: we removed the option to add custom logo in header. In the Update Manager section, it warns about the 'danger’ of applying automated updates without a proper backup, remembering in the process that the Enterprise version comes with a human-tested package. Maintaining an OpenSource version with more than 500 agents is not so easy, that's why someone using a Pandora with 8000 agents should consider asking for support. It's not a joke, we know of many setups with a huge number of agents, and we hate to hear that “its becoming unstable and slow” :( +You can of course remove the warnings, that's why we include the source and do not use any kind of trick. And that's why we added here this comment, to let you know this does not reflect any change in our opensource mentality of does the last 14 years. +*/ + + $tdata[2] = '' . format_numeric($server_performance ["remote_modules_rate"], 2) . ''; + $tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; + if($server_performance ["total_remote_modules"]>10000 && !enterprise_installed()){ - $tdata[2] = "
"; + $tdata[4] = "
"; } else{ - $tdata[2] = ' '; + $tdata[4] = ' '; } - - $tdata[3] = '' . format_numeric($server_performance ["remote_modules_rate"], 2) . ''; - $tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; - $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; } @@ -8379,8 +8379,17 @@ function reporting_get_stats_servers($tiny = true) { $tdata[2] = '' . format_numeric($server_performance["network_modules_rate"], 2) . ''; + + $tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec '; + if($server_performance ["total_remote_modules"]>10000 && !enterprise_installed()){ + $tdata[4] = "
"; + } + else{ + $tdata[4] = ' '; + } + $table_srv->rowclass[] = ''; $table_srv->data[] = $tdata; }