2009-06-24 Miguel de Dios <miguel.dedios@artica.es>

* operation/agentes/estado_monitores.php: add organization list of monitors, add
	row in table with title the monitor group.
	* include/styles/pandora.css: add new class for cell used monitor group title
	in the list of monitors in estado_monitores.php
	Fixes: #2805001



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1764 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2009-06-24 16:04:19 +00:00
parent 82e8b1f3ed
commit 65dba0156c
3 changed files with 49 additions and 9 deletions

View File

@ -1,3 +1,11 @@
2009-06-24 Miguel de Dios <miguel.dedios@artica.es>
* operation/agentes/estado_monitores.php: add organization list of monitors, add
row in table with title the monitor group.
* include/styles/pandora.css: add new class for cell used monitor group title
in the list of monitors in estado_monitores.php
Fixes: #2805001
2009-06-24 Jorge Gonzalez <jorgegonz@artica.es>
* include/functions_reporting.php, include/functions_ui.php,
@ -20,8 +28,8 @@
* translation.
* include/languages/index.pot: Updated po template.
2009-06-24 Miguel de Dios <miguel.dedios@artica.es>
2009-06-24 Miguel de Dios <miguel.dedios@artica.es>
* pandora_console/godmode/groups/group_list.php: fix group without image
don't print image tag.

View File

@ -319,6 +319,12 @@ tr.datos2b:hover, tr.datos2_id:hover, tr.datos2f9:hover {
td.datos3 {
background-color: #d4ddc6;
}
td.datos4 {
//Add !important because in php the function print_table write style in cell and this is style head.
text-align: center !important;
background-color: #d4ddc6;
}
td.datos_id {
color: #1a313a;
}

View File

@ -25,12 +25,18 @@ if (!isset ($id_agente)) {
}
// Get all module from agent
$sql = sprintf ("SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND tagente_modulo.id_agente = %d
AND tagente_modulo.disabled = 0
AND tagente_modulo.delete_pending = 0
AND tagente_estado.utimestamp != 0
ORDER BY tagente_modulo.nombre", $id_agente);
$sql = sprintf ("
SELECT *
FROM tagente_estado, tagente_modulo
LEFT JOIN tmodule_group
ON tmodule_group.id_mg = tagente_modulo.id_module_group
WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND tagente_modulo.id_agente = %d
AND tagente_modulo.disabled = 0
AND tagente_modulo.delete_pending = 0
AND tagente_estado.utimestamp != 0
ORDER BY tagente_modulo.id_module_group , tagente_modulo.nombre
", $id_agente);
$modules = get_db_all_rows_sql ($sql);
if (empty ($modules)) {
@ -53,7 +59,25 @@ $table->head[6] = __('Last contact');
$table->align = array("left","left","left","left","center");
$last_modulegroup = 0;
$rowIndex = 0;
foreach ($modules as $module) {
//The code add the row of 1 cell with title of group for to be more organice the list.
if ($module["id_module_group"] != $last_modulegroup)
{
$table->colspan[$rowIndex][0] = count($table->head);
$table->rowclass[$rowIndex] = 'datos4';
array_push ($table->data, array ('<b>'.$module['name'].'</b>'));
$rowIndex++;
$last_modulegroup = $module["id_module_group"];
}
//End of title of group
$data = array ();
if (($module["id_modulo"] != 1) && ($module["id_tipo_modulo"] != 100)) {
if ($module["flag"] == 0) {
@ -111,8 +135,10 @@ foreach ($modules as $module) {
}
$data[6] .= print_timestamp ($module["utimestamp"], true);
$data[6] .= '</span>';
array_push ($table->data, $data);
}
$rowIndex++;
}
if (empty ($table->data)) {
echo '<div class="nf">'.__('This agent doesn\'t have any active monitors').'</div>';