* (estado_monitores) Detected a bug in last commit from Raul, return to state #79

* Fixed minor issues for finish Pandora 1.2 Beta 2.

git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@102 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2006-07-06 17:06:59 +00:00
parent 57b48a27c8
commit a924cdb2b6
6 changed files with 73 additions and 43 deletions

View File

@ -2,7 +2,7 @@
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnol<EFBFBD>icas S.L, info@artica.es
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License

View File

@ -59,7 +59,7 @@ if (comprueba_login() == 0) {
// Data base access graph
echo "<td rowspan=4><b>".$lang_label["agent_access_rate"]."</b><br><br>
<img border=1 src='reporting/fgraph.php?id=".$id_agente."&tipo=agentaccess&periodo=1440' border=0>";
<img border=0 src='reporting/fgraph.php?id=".$id_agente."&tipo=agentaccess&periodo=1440' border=0>";
echo '<tr><td class="datos2"><b>'.$lang_label["ip_address"].'</b> <td class="datos2">'.salida_limpia($direccion_agente);
if ($agent_type == 0) {
@ -72,7 +72,7 @@ if (comprueba_login() == 0) {
echo '<tr><td class="datos"><b>'.salida_limpia($lang_label["description"]).'</b> <td class="datos">'.$comentarios;
echo "<td rowspan=6><b>".$lang_label["agent_module_shareout"]."</b><br><br>";
echo "<img border=1 src='reporting/fgraph.php?id=".$id_agente."&tipo=agentmodules' border=0>";
echo "<img border=0 src='reporting/fgraph.php?id=".$id_agente."&tipo=agentmodules' border=0>";
echo '<tr><td class="datos2"><b>'.salida_limpia($lang_label["group"]).'</b> <td class="datos2"> <img src="images/g_'.$iconindex_g[$row["id_grupo"]].'.gif" border="0"> ( '.dame_grupo($id_grupo).' )';
if ($agent_type == 0) {

View File

@ -1,9 +1,20 @@
<?php
// Pandora - The Free Monitoring System
// This code is protected by GPL license.
// Este codigo esta protegido por la licencia GPL.
// Sancho Lerena <slerena@gmail.com>, 2003-2006
// Raul Mateos <raulofpandora@gmail.com>, 2005-2006
<?PHP
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load globar vars
require("include/config.php");
@ -13,13 +24,15 @@ if (comprueba_login() == 0) {
if (isset($_GET["id_agente"])){
$id_agente = $_GET["id_agente"];
}
echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
// Get all module from agent
$sql_t='SELECT * FROM tagente_estado, tagente_modulo WHERE tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_modulo.id_agente='.$id_agente.' order by tagente_modulo.nombre';
$result_t=mysql_query($sql_t);
if (mysql_num_rows ($result_t)) {
echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".substr($language_code,0,2)."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
echo "<table width='750' cellpadding=3 cellspacing=3>";
echo "<tr><th>".$lang_label["type"]."<th>".$lang_label["module_name"]."<th>".$lang_label["description"]."<th>".$lang_label["status"]."<th>".$lang_label["interval"]."<th>".$lang_label["last_contact"];
$color=0;
$string='';
while ($row_t=mysql_fetch_array($result_t)){
# For evey module in the status table
$est_modulo = $row_t["nombre"];
@ -53,39 +66,33 @@ if (comprueba_login() == 0) {
else
$agent_down = 0;
if (!isset($string)) {$string='';}
$string=$string."<tr><td class='".$tdcolor."'>".$est_tipo;
$string=$string."<td class='".$tdcolor."'>".$est_modulo;
$string=$string."<td class='".$tdcolor."f9'>".substr($est_description,0,32);
echo "<tr>";
echo "<td class='".$tdcolor."'>".$est_tipo;
echo "<td class='".$tdcolor."'>".$est_modulo;
echo "<td class='".$tdcolor."f9'>".substr($est_description,0,32);
// echo "<td class='datos'>".$row3["datos"];
if ($agent_down == 1)
$string=$string."<td class='".$tdcolor."' align='center'><img src='images/b_down.gif'>";
echo "<td class='".$tdcolor."' align='center'><img src='images/b_down.gif'>";
else
if ($est_estado == 1)
if ($est_cambio ==1)
$string=$string."<td class='".$tdcolor."' align='center'><img src='images/b_yellow.gif'>";
echo "<td class='".$tdcolor."' align='center'><img src='images/b_yellow.gif'>";
else
$string=$string."<td class='".$tdcolor."' align='center'><img src='images/b_red.gif'>";
echo "<td class='".$tdcolor."' align='center'><img src='images/b_red.gif'>";
else
$string=$string."<td class='".$tdcolor."' align='center'><img src='images/b_green.gif'>";
$string=$string."<td class='".$tdcolor."'>".$temp_interval;
$string=$string."<td class='".$tdcolor."f9'>";
echo "<td class='".$tdcolor."' align='center'><img src='images/b_green.gif'>";
echo "<td class='".$tdcolor."'>";
echo $temp_interval;
echo "<td class='".$tdcolor."f9'>";
if ($agent_down == 1) // Si el agente esta down, lo mostramos en negrita y en rojo
$string=$string."<b><font color='red'>";
$string=$string.$row_t["timestamp"]."</font></b>";
echo "<b><font color='red'>";
echo $row_t["timestamp"];
}
else unset($string);
}
if (isset($string)) {
echo "<table width='750' cellpadding=3 cellspacing=3><tr></th><th>".$lang_label["type"]."<th>".$lang_label["module_name"]."</th><th>".$lang_label["description"]."</th><th>".$lang_label["status"]."</th><th>".$lang_label["interval"]."</th><th>".$lang_label["last_contact"]."</th></tr>";
echo $string;
echo '<tr><td colspan="7"><div class="raya"></div></td></tr></table>';
}
else {
echo "<font class='red'>".$lang_label["no_monitors"]."</font>";
}
}
else
echo "<font class='red'>".$lang_label["no_monitors"]."</font>";
echo "- <font class='red'>".$lang_label["no_monitors"]."</font>";
}
?>

View File

@ -2,7 +2,7 @@
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnol<EFBFBD>icas S.L, info@artica.es
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas S.L, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License

View File

@ -1,11 +1,23 @@
<?php
// Pandora - The Free Monitoring System
// This code is protected by GPL license.
// Este codigo esta protegido por la licencia GPL.
// Sancho Lerena <slerena@gmail.com>, 2003-2006
// Raúl Mateos <raulofpandora@gmail.com>, 2006
// Jose Navarro <contacto@indiseg.net>, 2006
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnologicas, info@artica.es
// Copyright (c) 2004-2006 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2006 Jose Navarro <contacto@indiseg.net>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Load global vars
include ("../include/config.php");

View File

@ -1,8 +1,19 @@
<?php
// Pandora - The Free Monitoring System
// This code is protected by GPL license.
// Este codigo esta protegido por la licencia GPL.
// Sancho Lerena <slerena@gmail.com>, 2003-2006
// Pandora - the Free monitoring system
// ====================================
// Copyright (c) 2004-2006 Sancho Lerena, slerena@gmail.com
// Copyright (c) 2005-2006 Artica Soluciones Tecnol<6F>icas S.L, info@artica.es
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// Cargamos variables globales
session_start();