2007-07-19 Sancho Lerena <slerena@artica.es>
* godmode/agentes/agent_manager.php: Fixed problems not really fixed in commit 563 (bug 1744913). * operation/servers/view_server.php: Fixed Data information are now more accurate (before get incorrect data for data server). * operation/agentes/tactical.php: Fixed the same that above and fixed total nomber of modules for data server that was 0 always :( git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@568 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
8110a458a9
commit
cd3b587a86
|
@ -1,3 +1,15 @@
|
|||
2007-07-19 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
|
||||
* godmode/agentes/agent_manager.php: Fixed problems not really
|
||||
fixed in commit 563 (bug 1744913).
|
||||
|
||||
* operation/servers/view_server.php: Fixed Data information are
|
||||
now more accurate (before get incorrect data for data server).
|
||||
|
||||
* operation/agentes/tactical.php: Fixed the same that above and
|
||||
fixed total nomber of modules for data server that was 0 always :(
|
||||
|
||||
2007-07-18 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* include/functions_reporting.php: With last change in server, we
|
||||
|
|
|
@ -64,7 +64,7 @@ echo '<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
|
|||
<td class="datos">
|
||||
<input type="text" name="agente" size=30 value="'.$nombre_agente.'">';
|
||||
|
||||
if (!isset($_GET["create_agent"])){
|
||||
if ((isset($id_agente)) && ($id_agente != "")){
|
||||
echo "
|
||||
<a href='index.php?sec=estado&
|
||||
sec2=operation/agentes/ver_agente&id_agente=".$id_agente."'>
|
||||
|
|
|
@ -163,12 +163,12 @@
|
|||
$total_modules = $row1[0];
|
||||
|
||||
// Get total modules defined (data)
|
||||
$sql1='SELECT COUNT(processed_by_server) FROM tagente_estado WHERE processed_by_server LIKE "%_Data" ';
|
||||
if ($result1=mysql_query($sql1)){
|
||||
$row1=mysql_fetch_array($result1);
|
||||
$total_modules_data = $row1[0];
|
||||
} else
|
||||
$total_modules_data = 0;
|
||||
$sql1='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo < 5 AND id_tipo_modulo != -1';
|
||||
if ($result1=mysql_query($sql1)){
|
||||
$row1=mysql_fetch_array($result1);
|
||||
$total_modules_data = $row1[0];
|
||||
} else
|
||||
$total_modules_data = 0;
|
||||
|
||||
// Connect DataBase
|
||||
$result=mysql_query($sql);
|
||||
|
@ -205,17 +205,11 @@
|
|||
$version = $row["version"];
|
||||
$modules_server = 0;
|
||||
if (($network_server == 1) OR ($data_server == 1)){
|
||||
if ($network_server == 1){
|
||||
// Get total modules defined for this server (network modules)
|
||||
$sql1='SELECT * FROM tagente where id_server = '.$row["id_server"];
|
||||
$result1=mysql_query($sql1);
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
$sql2='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo > 4 AND id_agente = '.$row1["id_agente"];
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$modules_server = $modules_server + $row2[0];
|
||||
}
|
||||
}
|
||||
// Get total modules defined for this server (data modules)
|
||||
$sql2 = "SELECT COUNT(running_by) FROM tagente_estado WHERE running_by = $id_server";
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$modules_server = $row2[0];
|
||||
echo "<tr><td class='$tdcolor'>";
|
||||
echo "<b>$name</b>";
|
||||
echo "<td class='$tdcolor' align='middle'>";
|
||||
|
|
|
@ -85,25 +85,13 @@ if (comprueba_login() == 0) {
|
|||
$version = $row["version"];
|
||||
|
||||
$modules_server = 0;
|
||||
if (($network_server == 1) OR ($data_server == 1))
|
||||
if ($network_server == 1){
|
||||
// Get total modules defined for this server (network modules)
|
||||
$sql1='SELECT * FROM tagente WHERE id_server = '.$row["id_server"];
|
||||
$result1=mysql_query($sql1);
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
$sql2='SELECT COUNT(id_agente_modulo) FROM tagente_modulo WHERE id_tipo_modulo > 4 AND id_agente = '.$row1["id_agente"];
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$modules_server = $modules_server + $row2[0];
|
||||
}
|
||||
} else {
|
||||
// Get total modules defined for this server (data modules)
|
||||
$sql2 = "SELECT COUNT(running_by) FROM tagente_estado WHERE running_by = $id_server";
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$modules_server = $row2[0];
|
||||
}
|
||||
|
||||
if (($network_server == 1) OR ($data_server == 1)){
|
||||
// Get total modules defined for this server (data modules)
|
||||
$sql2 = "SELECT COUNT(running_by) FROM tagente_estado WHERE running_by = $id_server";
|
||||
$result2=mysql_query($sql2);
|
||||
$row2=mysql_fetch_array($result2);
|
||||
$modules_server = $row2[0];
|
||||
}
|
||||
echo "<tr><td class='$tdcolor'>";
|
||||
if ($recon_server == 1)
|
||||
echo "<b><a href='index.php?sec=estado_server&sec2=operation/servers/view_server_detail&server_id=$id_server'>$name</a></b> ";
|
||||
|
@ -174,13 +162,13 @@ if (comprueba_login() == 0) {
|
|||
$nowtime = time();
|
||||
$maxlag=0;
|
||||
if ($result1=mysql_query($sql1))
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
if (($row1[0] + $row1[1]) < $nowtime){
|
||||
$maxlag2 = $nowtime - ($row1[0] + $row1[1]);
|
||||
if ($maxlag2 > $maxlag)
|
||||
$maxlag = $maxlag2;
|
||||
}
|
||||
while ($row1=mysql_fetch_array($result1)){
|
||||
if (($row1[0] + $row1[1]) < $nowtime){
|
||||
$maxlag2 = $nowtime - ($row1[0] + $row1[1]);
|
||||
if ($maxlag2 > $maxlag)
|
||||
$maxlag = $maxlag2;
|
||||
}
|
||||
}
|
||||
if ($maxlag < 60)
|
||||
echo $maxlag." sec";
|
||||
elseif ($maxlag < 86400)
|
||||
|
|
Loading…
Reference in New Issue