mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2012-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
* operation/tree.php: Fixed a bug which shows agents with not init modules when they must be hidde. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6779 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1d59916018
commit
872de3bc13
@ -1,3 +1,8 @@
|
|||||||
|
2012-07-16 Dario Rodriguez <dario.rodriguez@artica.es>
|
||||||
|
|
||||||
|
* operation/tree.php: Fixed a bug which shows agents with
|
||||||
|
not init modules when they must be hidde.
|
||||||
|
|
||||||
2012-07-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
2012-07-16 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||||
|
|
||||||
* include/constants.php
|
* include/constants.php
|
||||||
|
@ -258,6 +258,11 @@ if (is_ajax ())
|
|||||||
switch ($type) {
|
switch ($type) {
|
||||||
case 'group':
|
case 'group':
|
||||||
|
|
||||||
|
//Skip agents which only have not init modules
|
||||||
|
|
||||||
|
$search_sql .= " AND id_agente NOT IN (SELECT tagente_estado.id_agente FROM
|
||||||
|
tagente_estado GROUP BY id_agente HAVING SUM(utimestamp) = 0)";
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'id_grupo' => $id,
|
'id_grupo' => $id,
|
||||||
@ -272,6 +277,13 @@ if (is_ajax ())
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case 'os':
|
case 'os':
|
||||||
|
|
||||||
|
//Skip agents which only have not init modules
|
||||||
|
|
||||||
|
$search_sql .= " AND id_agente NOT IN (SELECT tagente_estado.id_agente FROM
|
||||||
|
tagente_estado GROUP BY id_agente HAVING SUM(utimestamp) = 0)";
|
||||||
|
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'id_os' => $id,
|
'id_os' => $id,
|
||||||
@ -287,6 +299,14 @@ if (is_ajax ())
|
|||||||
break;
|
break;
|
||||||
case 'module_group':
|
case 'module_group':
|
||||||
|
|
||||||
|
//Skip agents which only have not init modules
|
||||||
|
|
||||||
|
$search_sql .= " AND id_agente NOT IN (SELECT tagente_estado.id_agente FROM tagente_estado
|
||||||
|
WHERE id_agente_modulo IN
|
||||||
|
(SELECT id_agente_modulo FROM tagente_modulo
|
||||||
|
WHERE id_module_group = $id)
|
||||||
|
GROUP BY id_agente HAVING SUM(utimestamp) = 0)";
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'disabled' => 0,
|
'disabled' => 0,
|
||||||
@ -879,6 +899,11 @@ function printTree_($type) {
|
|||||||
default:
|
default:
|
||||||
case 'os':
|
case 'os':
|
||||||
|
|
||||||
|
//Skip agent with all modules in not init status
|
||||||
|
|
||||||
|
$sql_search .= " AND id_agente NOT IN (SELECT tagente_estado.id_agente FROM
|
||||||
|
tagente_estado GROUP BY id_agente HAVING SUM(utimestamp) = 0)";
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'disabled' => 0,
|
'disabled' => 0,
|
||||||
@ -918,6 +943,11 @@ function printTree_($type) {
|
|||||||
|
|
||||||
case 'module_group':
|
case 'module_group':
|
||||||
|
|
||||||
|
//Skip agents which only have not init modules
|
||||||
|
|
||||||
|
$sql_search .= " AND id_agente NOT IN (SELECT tagente_estado.id_agente FROM
|
||||||
|
tagente_estado GROUP BY id_agente HAVING SUM(utimestamp) = 0)";
|
||||||
|
|
||||||
$sql = agents_get_agents(array (
|
$sql = agents_get_agents(array (
|
||||||
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
'order' => 'nombre COLLATE utf8_general_ci ASC',
|
||||||
'disabled' => 0,
|
'disabled' => 0,
|
||||||
@ -1032,6 +1062,7 @@ function printTree_($type) {
|
|||||||
|
|
||||||
$first = true;
|
$first = true;
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
|
|
||||||
$iconImg = '';
|
$iconImg = '';
|
||||||
switch ($type) {
|
switch ($type) {
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user