mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 01:05:39 +02:00
2009-08-01 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_db.php: add external Module group "Not assigned" because there are modules with this module group as agent software. * extensions/module_groups.php: fix bug that the count are very wrong. And add the link to Full list of monitors with filter. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1896 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c043ef1919
commit
9a91e5ac79
@ -1,3 +1,10 @@
|
|||||||
|
2009-08-01 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
|
* include/functions_db.php: add external Module group "Not assigned"
|
||||||
|
because there are modules with this module group as agent software.
|
||||||
|
* extensions/module_groups.php: fix bug that the count are very wrong. And
|
||||||
|
add the link to Full list of monitors with filter.
|
||||||
|
|
||||||
2009-08-30 Raul Mateos <raulofpandora@gmail.com>
|
2009-08-30 Raul Mateos <raulofpandora@gmail.com>
|
||||||
|
|
||||||
* extensions/update_manager/main.php: Change Pandora FMS text to 3.0
|
* extensions/update_manager/main.php: Change Pandora FMS text to 3.0
|
||||||
|
@ -28,19 +28,15 @@ function mainModuleGroups() {
|
|||||||
global $config; //the useful global var of Pandora Console, it has many data can you use
|
global $config; //the useful global var of Pandora Console, it has many data can you use
|
||||||
|
|
||||||
//The big query
|
//The big query
|
||||||
$sql = 'SELECT SUM(t1.id_agente) AS count, t5.estado
|
$sql = "select COUNT(id_agente) AS count, estado
|
||||||
FROM tagente AS t1
|
FROM tagente_estado
|
||||||
INNER JOIN tgrupo AS t2
|
WHERE utimestamp != 0 AND id_agente IN
|
||||||
ON t1.id_grupo = t2.id_grupo
|
(SELECT id_agente FROM tagente WHERE id_grupo = %d AND disabled IS FALSE)
|
||||||
INNER JOIN tagente_modulo AS t3
|
AND id_agente_modulo IN
|
||||||
ON t1.id_agente = t3.id_agente
|
(SELECT id_agente_modulo
|
||||||
INNER JOIN tmodule_group AS t4
|
FROM tagente_modulo
|
||||||
ON t3.id_module_group = t4.id_mg
|
WHERE id_module_group = %d AND disabled IS FALSE AND delete_pending IS FALSE)
|
||||||
INNER JOIN tagente_estado AS t5
|
GROUP BY estado";
|
||||||
ON t1.id_agente = t5.id_agente
|
|
||||||
WHERE t3.delete_pending IS FALSE AND t3.disabled IS FALSE AND
|
|
||||||
t2.id_grupo = %d AND t3.id_module_group = %d
|
|
||||||
GROUP BY t5.estado';
|
|
||||||
|
|
||||||
echo "<h1>" . __("Combine table of agent group and module group") . "</h1>";
|
echo "<h1>" . __("Combine table of agent group and module group") . "</h1>";
|
||||||
|
|
||||||
@ -88,8 +84,14 @@ function mainModuleGroups() {
|
|||||||
$color = 'transparent'; //Defaut color for cell
|
$color = 'transparent'; //Defaut color for cell
|
||||||
if ($count == 0) {
|
if ($count == 0) {
|
||||||
$color = '#babdb6'; //Grey when the cell for this model group and agent group hasn't modules.
|
$color = '#babdb6'; //Grey when the cell for this model group and agent group hasn't modules.
|
||||||
|
$alinkStart = '';
|
||||||
|
$alinkEnd = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
$alinkStart = '<a href="index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=' . $idAgentGroup .
|
||||||
|
'&modulegroup=' . $idModelGroup . '">';
|
||||||
|
$alinkEnd = '</a>';
|
||||||
|
|
||||||
if (array_key_exists(0,$states) && (count($states) == 1))
|
if (array_key_exists(0,$states) && (count($states) == 1))
|
||||||
$color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules.
|
$color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules.
|
||||||
else {
|
else {
|
||||||
@ -106,7 +108,7 @@ function mainModuleGroups() {
|
|||||||
height: 15px;
|
height: 15px;
|
||||||
margin-left: auto; margin-right: auto;
|
margin-left: auto; margin-right: auto;
|
||||||
text-align: center; padding-top: 5px;">
|
text-align: center; padding-top: 5px;">
|
||||||
' . $count . ' modules</div>');
|
' . $alinkStart . $count . ' modules' . $alinkEnd . '</div>');
|
||||||
}
|
}
|
||||||
array_push($tableData,$row);
|
array_push($tableData,$row);
|
||||||
}
|
}
|
||||||
|
@ -1256,6 +1256,8 @@ function get_all_model_groups () {
|
|||||||
foreach ($groups as $group)
|
foreach ($groups as $group)
|
||||||
$returnGroups[$group['id_mg']] = $group['name'];
|
$returnGroups[$group['id_mg']] = $group['name'];
|
||||||
|
|
||||||
|
$returnGroups[0] = "Not assigned"; //Module group external to DB but it exist
|
||||||
|
|
||||||
|
|
||||||
return $returnGroups;
|
return $returnGroups;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user