diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 4bb4a26b47..863dc4b15f 100644 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -2194,19 +2194,26 @@ function graph_agent_status ($id_agent = false, $width = 300, $height = 200, $re if ($data_agents == false) { $groups = implode(',', array_keys(users_get_groups(false, 'AR', false))); + $p_table = "tagente"; + $s_table = "tagent_secondary_group"; + if (is_metaconsole()) { + $p_table = "tmetaconsole_agent"; + $s_table = "tmetaconsole_agent_secondary_group"; + } $data = db_get_row_sql(sprintf('SELECT SUM(critical_count) AS Critical, SUM(warning_count) AS Warning, SUM(normal_count) AS Normal, SUM(unknown_count) AS Unknown %s - FROM tagente ta LEFT JOIN tagent_secondary_group tasg + FROM %s ta LEFT JOIN %s tasg ON ta.id_agente = tasg.id_agent WHERE ta.disabled = 0 AND %s (ta.id_grupo IN (%s) OR tasg.id_group IN (%s))', $show_not_init ? ', SUM(notinit_count) "Not init"' : '', + $p_table, $s_table, empty($id_agent) ? '' : "ta.id_agente = $id_agent AND", $groups, $groups diff --git a/pandora_console/mobile/operation/tactical.php b/pandora_console/mobile/operation/tactical.php index e3a9cf2665..c62de4d035 100755 --- a/pandora_console/mobile/operation/tactical.php +++ b/pandora_console/mobile/operation/tactical.php @@ -28,6 +28,7 @@ class Tactical { else { $this->correct_acl = false; } + include_javascript_dependencies_flot_graph(); } public function show() {