Fix a visual bug in tactical view #111

This commit is contained in:
enriquecd 2016-11-04 17:29:18 +01:00
parent 74fe9a0228
commit ea4ac96a9a
1 changed files with 28 additions and 19 deletions

View File

@ -5661,6 +5661,7 @@ function reporting_get_stats_agents_monitors($data) {
$tdata[1] = $data["total_agents"] <= 0 ? '-' : $data["total_agents"];
$tdata[1] = '<a class="big_data" href="' . $urls['total_agents'] . '">' . $tdata[1] . '</a>';
if($data["total_agents"]>500 && !enterprise_installed()) {
$tdata[2] = "<div id='agentsmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
}
@ -5669,6 +5670,7 @@ function reporting_get_stats_agents_monitors($data) {
$tdata[4] = $data["monitor_checks"] <= 0 ? '-' : $data["monitor_checks"];
$tdata[4] = '<a class="big_data" href="' . $urls['monitor_checks'] . '">' . $tdata[4] . '</a>';
if(($data["monitor_checks"]/$data["total_agents"]>100) && !enterprise_installed()) {
$tdata[5] = "<div id='monitorcheckmodal' class='publienterprise' title='Community version' style=''><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
}
@ -8323,9 +8325,8 @@ function reporting_get_stats_servers($tiny = true) {
$tdata = array();'<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
$tdata[0] = html_print_image('images/module.png', true, array('title' => __('Total running modules'), 'width' => '25px'));
$tdata[1] = '<span class="big_data">' . format_numeric($server_performance ["total_modules"]) . '</span>';
$tdata[2] = '&nbsp;';
$tdata[3] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
$tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
$tdata[2] = '<span class="med_data">' . format_numeric($server_performance ["total_modules_rate"], 2) . '</span>';
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
$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] = '<span class="big_data">' . format_numeric($server_performance ["total_local_modules"]) . '</span>';
$tdata[2] = '&nbsp;';
$tdata[3] = '<span class="med_data">' .
$tdata[2] = '<span class="med_data">' .
format_numeric($server_performance ["local_modules_rate"], 2) . '</span>';
$tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
$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] = '<span class="big_data">' . format_numeric($server_performance ["total_remote_modules"]) . '</span>';
/* 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] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
if($server_performance ["total_remote_modules"]>10000 && !enterprise_installed()){
$tdata[2] = "<div id='agentsmodal' class='publienterprise' title='Community version' style='text-align:left;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
$tdata[4] = "<div id='agentsmodal' class='publienterprise' title='Community version' style='text-align:left;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
}
else{
$tdata[2] = '&nbsp;';
$tdata[4] = '&nbsp;';
}
$tdata[3] = '<span class="med_data">' . format_numeric($server_performance ["remote_modules_rate"], 2) . '</span>';
$tdata[4] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
$table_srv->rowclass[] = '';
$table_srv->data[] = $tdata;
}
@ -8379,8 +8379,17 @@ function reporting_get_stats_servers($tiny = true) {
$tdata[2] = '<span class="med_data">' .
format_numeric($server_performance["network_modules_rate"], 2) .
'</span>';
$tdata[3] = html_print_image('images/module.png', true, array('title' => __('Ratio') . ': ' . __('Modules by second'), 'width' => '16px')) . '/sec </span>';
if($server_performance ["total_remote_modules"]>10000 && !enterprise_installed()){
$tdata[4] = "<div id='remotemodulesmodal' class='publienterprise' title='Community version' style='text-align:left;'><img data-title='Enterprise version' class='img_help forced_title' data-use_title_for_force_title='1' src='images/alert_enterprise.png'></div>";
}
else{
$tdata[4] = '&nbsp;';
}
$table_srv->rowclass[] = '';
$table_srv->data[] = $tdata;
}