From 41ed17cfe2dd31a5252937cd55bb6cd237a479b2 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 19 Dec 2014 11:58:06 +0100 Subject: [PATCH] Uploaded lost changes from the last day --- pandora_console/include/class/Tree.class.php | 3 +++ pandora_console/include/functions_groups.php | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/class/Tree.class.php b/pandora_console/include/class/Tree.class.php index 6aea07fded..d8d826dd62 100644 --- a/pandora_console/include/class/Tree.class.php +++ b/pandora_console/include/class/Tree.class.php @@ -94,6 +94,8 @@ class Tree { foreach ($groups as $iterator => $group) { $data = reporting_get_group_stats($group['id_grupo']); + $groups[$iterator]['icon'] = groups_get_icon($group['id_grupo']) . '.png'; + $groups[$iterator]['counters'] = array(); $groups[$iterator]['counters']['unknown'] = $data['agents_unknown']; @@ -184,6 +186,7 @@ class Tree { $temp['id'] = $item['id']; $temp['type'] = $item['type']; $temp['name'] = $item['name']; + $temp['icon'] = $item['icon']; $temp['status'] = $item['status']; switch ($this->countAgentStatusMethod) { case 'on_demand': diff --git a/pandora_console/include/functions_groups.php b/pandora_console/include/functions_groups.php index 81420d664e..dc2104a99c 100644 --- a/pandora_console/include/functions_groups.php +++ b/pandora_console/include/functions_groups.php @@ -401,12 +401,16 @@ function groups_get_icon ($id_group) { function groups_get_all($groupWithAgents = false) { global $config; - $sql = 'SELECT id_grupo, nombre FROM tgrupo'; + $sql = 'SELECT id_grupo, nombre + FROM tgrupo'; global $config; if ($groupWithAgents) - $sql .= ' WHERE id_grupo IN (SELECT id_grupo FROM tagente GROUP BY id_grupo)'; + $sql .= ' WHERE id_grupo IN ( + SELECT id_grupo + FROM tagente + GROUP BY id_grupo)'; switch ($config['dbtype']) { case "mysql":