From 34618aaa591d59312f0b2ab0c68154cd7c18bfb9 Mon Sep 17 00:00:00 2001 From: raulmateos Date: Tue, 21 Nov 2006 19:10:23 +0000 Subject: [PATCH] 2006-11-21 Raul Mateos * operation/agentes/status_monitor.php: change bulb images from botton to top, some style corrections * operation/agentes/estado_generalagente.php, operation/agentes/estado_ultimopaquete.php: Several changes to make it more HTML compliant, and better sytle. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@270 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 13 ++++++--- .../agentes/estado_generalagente.php | 11 ++++---- .../agentes/estado_ultimopaquete.php | 27 ++++++++++++------- .../operation/agentes/status_monitor.php | 26 ++++++++++-------- 4 files changed, 48 insertions(+), 29 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 3232940459..4a7fac5e3a 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -4,13 +4,18 @@ for optimization, Esteban's suggestion. Changed text from Pandora to Pandora FMS. - * operation/agentes/estado_alertas.php, - operation/agentes/status_monitor.php: small code changes to make it more - HTML compliant. + * operation/agentes/estado_alertas.php: small code changes + + * operation/agentes/status_monitor.php: change bulb images from botton + to top, some style corrections + + * operation/agentes/estado_generalagente.php, + operation/agentes/estado_ultimopaquete.php: + Several changes to make it more HTML compliant, and better sytle. 2006-11-17 Raul Mateos - * operation/agentes/estado_generalagente.php: Clear code, small adapt to + * operation/agentes/estado_generalagente.php: Clean code, small adapt to guidelines. Add code for showing 'Never' if there wasn't a previous contact of the agent. diff --git a/pandora_console/operation/agentes/estado_generalagente.php b/pandora_console/operation/agentes/estado_generalagente.php index e85a084b1f..bbd8e87bf4 100644 --- a/pandora_console/operation/agentes/estado_generalagente.php +++ b/pandora_console/operation/agentes/estado_generalagente.php @@ -61,7 +61,7 @@ if (comprueba_login() == 0) { echo "

".$lang_label["ag_title"]."

"; echo "

".$lang_label["view_agent_general_data"]." ".$lang_label["help"]."

"; - echo ''; + echo '
'; echo ''; + - '.dame_so_name($id_os); } elseif ($agent_type == 1) { echo ' - '; + '; echo ''; echo ' @@ -128,7 +129,7 @@ if (comprueba_login() == 0) { $sql_3='SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"]; $result_3=mysql_query($sql_3); $row3=mysql_fetch_array($result_3); - $total_paketes = $total_paketes + $row3[0]; + $total_paketes = $total_paketes + $row3['0']; } echo $total_paketes; echo ''; diff --git a/pandora_console/operation/agentes/estado_ultimopaquete.php b/pandora_console/operation/agentes/estado_ultimopaquete.php index faa782c4b5..0844250bd7 100644 --- a/pandora_console/operation/agentes/estado_ultimopaquete.php +++ b/pandora_console/operation/agentes/estado_ultimopaquete.php @@ -65,8 +65,16 @@ if (comprueba_login() == 0) { echo "

".$lang_label["last_data_chunk"]." ".$lang_label["help"]."

"; $result3=mysql_query($sql3); if (mysql_num_rows ($result3)) { - echo "
'.$lang_label["agent_name"].' '.salida_limpia($nombre_agente); @@ -86,13 +86,14 @@ if (comprueba_login() == 0) { echo '
'.$lang_label["os"].' - - '.dame_so_name($id_os).'
'.$lang_label["agent_type"].''; } - if ($os_version != "") echo ' v'.salida_limpia($os_version); + if ($os_version != "") echo ' '.salida_limpia($os_version); + echo '
'.$lang_label["interval"].'
X".$lang_label["module_name"]; - echo "".$lang_label["type"]."".$lang_label["int"]."".$lang_label["description"]."".$lang_label["data"]."".$lang_label["graph"]."".$lang_label["raw_data"]."".$lang_label["timestamp"]; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; $texto=''; $color = 1; while ($row3=mysql_fetch_array($result3)){ @@ -82,7 +90,8 @@ if (comprueba_login() == 0) { // Render module group names (fixed code) $nombre_grupomodulo = dame_nombre_grupomodulo ($row3["id_module_group"]); if ($nombre_grupomodulo != ""){ - if (($label_group == 0) || ($last_label != $nombre_grupomodulo)){ // Show label module group + if (($label_group == 0) || ($last_label != $nombre_grupomodulo)){ + // Show label module group $label_group = -1; $last_label = $nombre_grupomodulo; echo "
X".$lang_label["module_name"]."".$lang_label["type"]."".$lang_label["int"]."".$lang_label["description"]."".$lang_label["data"]."".$lang_label["graph"]."".$lang_label["raw_data"]."".$lang_label["timestamp"]."
".$nombre_grupomodulo.""; @@ -133,26 +142,26 @@ if (comprueba_login() == 0) { // For types not string type (3 data_string, 9 tcp_string, 14 snmp_string) if (($row3["id_tipo_modulo"] != 3) AND ($row3["id_tipo_modulo"]!=10) AND ($row3["id_tipo_modulo"]!=17)){ - echo ""; + echo ""; echo substr($row3["datos"],0,9); $handle = "stat".$nombre_tipo_modulo."_".$nombre_agente; $url = 'reporting/procesos.php?agente='.$nombre_agente; $win_handle=dechex(crc32($nombre_agente.$row3["nombre"])); echo ""; - echo " "; + echo " "; $link ="winopeng('reporting/stat_win.php?tipo=semana&id=".$row3["id_agente_modulo"]."&refresh=6000','sem_".$win_handle."')"; - echo ' '; + echo ' '; $link ="winopeng('reporting/stat_win.php?tipo=dia&id=".$row3["id_agente_modulo"]."&refresh=800','dia_".$win_handle."')"; - echo ' '; + echo ' '; $link ="winopeng('reporting/stat_win.php?tipo=hora&id=".$row3["id_agente_modulo"]."&refresh=30','hora_".$win_handle."')"; - echo ''; + echo ''; } else { # Writing string data in different way :) - echo ""; + echo ""; echo salida_limpia(substr($row3["datos"],0,42)); } diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index 2bde9b32c2..04080f7b7b 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -50,7 +50,8 @@ if (comprueba_login() == 0) { } else { echo "
"; } - echo "
".$lang_label["group_name"]; + echo ""; + echo ""; echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo "
".$lang_label["group_name"].""; echo "
"; - echo $lang_label["module_name"]."  "; + echo " - ".$lang_label["green_light"]." "; + echo " - ".$lang_label["red_light"]."
".$lang_label["module_name"].""; echo ""; @@ -154,12 +164,6 @@ if (comprueba_login() == 0) { echo ""; echo $string; //the built table of monitors echo "
".$lang_label["agent"]."".$lang_label["type"]."".$lang_label["name"]."".$lang_label["description"]."".$lang_label["max_min"]."".$lang_label["interval"]."".$lang_label["status"]."".$lang_label["timestamp"]."
"; - echo "
"; - echo ""; - echo ""; - echo "
"; - echo " - ".$lang_label["green_light"]." "; - echo " - ".$lang_label["red_light"]."
"; } else { echo "".$lang_label["no_monitors_g"]."";