diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index db77ed9109..9c8eebb1e4 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2007-05-21 Sancho Lerena + + * operation/visual_console/index.php: Fixed SQL error when no data. + + * operation/agentes/estado_alertas.php: Style fix (databox). + + * operation/agentes/ver_agente.php: Now main view shows also alert info. + + * operation/menu.php: Fixed SQL error when there is no data. + 2007-05-21 Raul Mateos * include/styles/pandora.css: Updated footer style. diff --git a/pandora_console/operation/agentes/estado_alertas.php b/pandora_console/operation/agentes/estado_alertas.php index 8304b87080..89f17eeddf 100644 --- a/pandora_console/operation/agentes/estado_alertas.php +++ b/pandora_console/operation/agentes/estado_alertas.php @@ -45,7 +45,7 @@ if (isset($_GET["id_agente"])){ $id_agente = $_GET["id_agente"]; $query_gen='SELECT talerta_agente_modulo.alert_text, talerta_agente_modulo.id_alerta, talerta_agente_modulo.descripcion, talerta_agente_modulo.last_fired, talerta_agente_modulo.times_fired, tagente_modulo.nombre, talerta_agente_modulo.dis_max, talerta_agente_modulo.dis_min, talerta_agente_modulo.max_alerts, talerta_agente_modulo.time_threshold, talerta_agente_modulo.min_alerts, talerta_agente_modulo.id_agente_modulo, tagente_modulo.id_agente_modulo FROM tagente_modulo, talerta_agente_modulo WHERE tagente_modulo.id_agente = '.$id_agente.' AND tagente_modulo.id_agente_modulo = talerta_agente_modulo.id_agente_modulo ORDER BY tagente_modulo.nombre'; if ($result_gen=mysql_query($query_gen)){ - echo ""; + echo "
"; echo ""; $color=1; while ($data=mysql_fetch_array($result_gen)){ @@ -93,7 +93,7 @@ if (isset($_GET["id_agente"])){ else echo "
".$lang_label["type"]."".$lang_label["name"]."".$lang_label["description"]."".$lang_label["min_max"]."".$lang_label["time_threshold"]."".$lang_label["last_fired"]."".$lang_label["times_fired"]."".$lang_label["status"].""; } - echo '
'; + echo ''; } else echo "
".$lang_label["no_alerts"]."
"; @@ -234,4 +234,4 @@ if (isset($_GET["id_agente"])){ $lang_label["no_agent"].$lang_label["no_agent_alert"].""; } -?> \ No newline at end of file +?> diff --git a/pandora_console/operation/agentes/ver_agente.php b/pandora_console/operation/agentes/ver_agente.php index 6c9d4d6222..97e7212159 100644 --- a/pandora_console/operation/agentes/ver_agente.php +++ b/pandora_console/operation/agentes/ver_agente.php @@ -96,6 +96,7 @@ if (comprueba_login() == 0) { case "main": require "estado_generalagente.php"; require "estado_monitores.php"; + require "estado_alertas.php"; break; case "data": require "estado_ultimopaquete.php"; diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index 83e9f2d2c1..b6beeb0421 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -85,7 +85,7 @@ if (give_acl($_SESSION["id_usuario"], 0, "AR")==1) { if ( isset($_GET["sec"]) && $_GET["sec"] == "visualc") { $sql="SELECT * FROM tlayout"; - $res=mysql_query($sql); + if($res=mysql_query($sql)) while ($row = mysql_fetch_array($res)){ if (isset($_GET["sec2"]) && $_GET["sec2"] == "operation/visual_console/render_view") { if (isset($_GET["id"]) && $_GET["id"] == $row["id"]) diff --git a/pandora_console/operation/visual_console/index.php b/pandora_console/operation/visual_console/index.php index cfae363ae6..6d9923bffb 100644 --- a/pandora_console/operation/visual_console/index.php +++ b/pandora_console/operation/visual_console/index.php @@ -32,8 +32,8 @@ echo ""; echo "
".$lang_label["name"]."".$lang_label["group"]."".$lang_label["elements"]."".$lang_label["view"]; $color=1; $sql="SELECT * FROM tlayout"; -$res=mysql_query($sql); -while ($row = mysql_fetch_array($res)){ +if ($res=mysql_query($sql)) + while ($row = mysql_fetch_array($res)){ // Calculate table line color if ($color == 1){ $tdcolor = "datos"; @@ -56,7 +56,7 @@ while ($row = mysql_fetch_array($res)){ echo "".$row2[0]; // View icon echo ""; -} + } echo "
";