Merge branch 'ent-10087-query-de-grupos-que-se-repite-con-frecuencia' into 'develop'

fix performance tactical view with admin pandora_enterprise#10087

See merge request artica/pandorafms!5454
This commit is contained in:
Diego Muñoz-Reja 2023-01-27 09:11:45 +00:00
commit 3f000f403a
2 changed files with 16 additions and 5 deletions

View File

@ -478,8 +478,13 @@ function tactical_get_data(
$list['_monitors_alerts_fired_'] = tactical_monitor_fired_alerts(explode(',', $user_groups_ids), $user_strict, explode(',', $user_groups_ids));
$list['_monitors_alerts_'] = tactical_monitor_alerts($user_strict);
$filter_agents = [];
if (users_is_admin() === false) {
$filter_agents = ['id_grupo' => explode(',', $user_groups_ids)];
}
$total_agentes = agents_get_agents(
['id_grupo' => explode(',', $user_groups_ids)],
$filter_agents,
['count(DISTINCT id_agente) as total_agents'],
'AR',
false,

View File

@ -1440,6 +1440,16 @@ if ($searchPage) {
}
}
if (__PAN_XHPROF__ === 1) {
echo "<span style='font-size: 0.8em;'>";
echo __('Page generated at').' ';
echo date('D F d, Y H:i:s', $time).'</span>';
echo ' - ( ';
pandora_xhprof_display_result('node_index');
echo ' )';
echo '</center>';
}
if ($config['pure'] == 0) {
echo '<div id="both"></div>';
echo '</div>';
@ -1623,7 +1633,3 @@ require 'include/php_to_js_values.php';
);
}
</script>
<?php
if (__PAN_XHPROF__ === 1) {
pandora_xhprof_display_result('node_index');
}