mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-09-25 02:48:10 +02:00
2006-11-21 Raul Mateos <raulofpandora@gmail.com>
* 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
This commit is contained in:
parent
873cf9096c
commit
34618aaa59
@ -4,13 +4,18 @@
|
|||||||
for optimization, Esteban's suggestion. Changed text from Pandora to
|
for optimization, Esteban's suggestion. Changed text from Pandora to
|
||||||
Pandora FMS.
|
Pandora FMS.
|
||||||
|
|
||||||
* operation/agentes/estado_alertas.php,
|
* operation/agentes/estado_alertas.php: small code changes
|
||||||
operation/agentes/status_monitor.php: small code changes to make it more
|
|
||||||
HTML compliant.
|
* 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 <raulofpandora@gmail.com>
|
2006-11-17 Raul Mateos <raulofpandora@gmail.com>
|
||||||
|
|
||||||
* 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
|
guidelines. Add code for showing 'Never' if there wasn't a previous contact
|
||||||
of the agent.
|
of the agent.
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ if (comprueba_login() == 0) {
|
|||||||
|
|
||||||
echo "<h2>".$lang_label["ag_title"]."</h2>";
|
echo "<h2>".$lang_label["ag_title"]."</h2>";
|
||||||
echo "<h3>".$lang_label["view_agent_general_data"]."<a href='help/".$help_code."/chap3.php#3321' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
echo "<h3>".$lang_label["view_agent_general_data"]."<a href='help/".$help_code."/chap3.php#3321' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
||||||
echo '<table cellspacing=3 cellpadding=3 width=750>';
|
echo '<table cellspacing="3" cellpadding="3" width="750">';
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
|
<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
|
||||||
<td class="datos">'.salida_limpia($nombre_agente);
|
<td class="datos">'.salida_limpia($nombre_agente);
|
||||||
@ -86,13 +86,14 @@ if (comprueba_login() == 0) {
|
|||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td class="datos"><b>'.$lang_label["os"].'</b></td>
|
<td class="datos"><b>'.$lang_label["os"].'</b></td>
|
||||||
<td class="datos">
|
<td class="datos">
|
||||||
<img src="images/'.dame_so_icon($id_os).'"> - '.dame_so_name($id_os).'</td>';
|
<img src="images/'.dame_so_icon($id_os).'"> - '.dame_so_name($id_os);
|
||||||
} elseif ($agent_type == 1) {
|
} elseif ($agent_type == 1) {
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td class="datos2"><b>'.$lang_label["agent_type"].'</b></td>
|
<td class="datos2"><b>'.$lang_label["agent_type"].'</b></td>
|
||||||
<td class="datos2"><img src="images/network.gif"></td>';
|
<td class="datos2"><img src="images/network.gif">';
|
||||||
}
|
}
|
||||||
if ($os_version != "") echo ' v'.salida_limpia($os_version);
|
if ($os_version != "") echo ' '.salida_limpia($os_version);
|
||||||
|
echo '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
echo '<tr>
|
echo '<tr>
|
||||||
<td class="datos2"><b>'.$lang_label["interval"].'</b></td>
|
<td class="datos2"><b>'.$lang_label["interval"].'</b></td>
|
||||||
@ -128,7 +129,7 @@ if (comprueba_login() == 0) {
|
|||||||
$sql_3='SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"];
|
$sql_3='SELECT COUNT(*) FROM tagente_datos WHERE id_agente_modulo = '.$row["id_agente_modulo"];
|
||||||
$result_3=mysql_query($sql_3);
|
$result_3=mysql_query($sql_3);
|
||||||
$row3=mysql_fetch_array($result_3);
|
$row3=mysql_fetch_array($result_3);
|
||||||
$total_paketes = $total_paketes + $row3[0];
|
$total_paketes = $total_paketes + $row3['0'];
|
||||||
}
|
}
|
||||||
echo $total_paketes;
|
echo $total_paketes;
|
||||||
echo '</td></tr>';
|
echo '</td></tr>';
|
||||||
|
@ -65,8 +65,16 @@ if (comprueba_login() == 0) {
|
|||||||
echo "<h3>".$lang_label["last_data_chunk"]."<a href='help/".$help_code."/chap3.php#3322' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
echo "<h3>".$lang_label["last_data_chunk"]."<a href='help/".$help_code."/chap3.php#3322' target='_help' class='help'> <span>".$lang_label["help"]."</span></a></h3>";
|
||||||
$result3=mysql_query($sql3);
|
$result3=mysql_query($sql3);
|
||||||
if (mysql_num_rows ($result3)) {
|
if (mysql_num_rows ($result3)) {
|
||||||
echo "<table width='750' cellpadding='3' cellspacing='3'><th>X<th>".$lang_label["module_name"];
|
echo "<table width='750' cellpadding='3' cellspacing='3'>";
|
||||||
echo "<th>".$lang_label["type"]."<th>".$lang_label["int"]."<th>".$lang_label["description"]."<th>".$lang_label["data"]."<th>".$lang_label["graph"]."<th>".$lang_label["raw_data"]."<th>".$lang_label["timestamp"];
|
echo "<th>X</th>";
|
||||||
|
echo "<th>".$lang_label["module_name"]."</th>";
|
||||||
|
echo "<th>".$lang_label["type"]."</th>";
|
||||||
|
echo "<th>".$lang_label["int"]."</th>";
|
||||||
|
echo "<th>".$lang_label["description"]."</th>";
|
||||||
|
echo "<th>".$lang_label["data"]."</th>";
|
||||||
|
echo "<th>".$lang_label["graph"]."</th>";
|
||||||
|
echo "<th>".$lang_label["raw_data"]."</th>";
|
||||||
|
echo "<th>".$lang_label["timestamp"]."</th>";
|
||||||
$texto='';
|
$texto='';
|
||||||
$color = 1;
|
$color = 1;
|
||||||
while ($row3=mysql_fetch_array($result3)){
|
while ($row3=mysql_fetch_array($result3)){
|
||||||
@ -82,7 +90,8 @@ if (comprueba_login() == 0) {
|
|||||||
// Render module group names (fixed code)
|
// Render module group names (fixed code)
|
||||||
$nombre_grupomodulo = dame_nombre_grupomodulo ($row3["id_module_group"]);
|
$nombre_grupomodulo = dame_nombre_grupomodulo ($row3["id_module_group"]);
|
||||||
if ($nombre_grupomodulo != ""){
|
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;
|
$label_group = -1;
|
||||||
$last_label = $nombre_grupomodulo;
|
$last_label = $nombre_grupomodulo;
|
||||||
echo "<tr><td class='datos3' align='center' colspan=9><b>".$nombre_grupomodulo."</b>";
|
echo "<tr><td class='datos3' align='center' colspan=9><b>".$nombre_grupomodulo."</b>";
|
||||||
@ -133,26 +142,26 @@ if (comprueba_login() == 0) {
|
|||||||
// For types not string type (3 data_string, 9 tcp_string, 14 snmp_string)
|
// 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)){
|
if (($row3["id_tipo_modulo"] != 3) AND ($row3["id_tipo_modulo"]!=10) AND ($row3["id_tipo_modulo"]!=17)){
|
||||||
|
|
||||||
echo "<td class=".$tdcolor.">";
|
echo "<td class=".$tdcolor." title=".$row3["datos"].">";
|
||||||
echo substr($row3["datos"],0,9);
|
echo substr($row3["datos"],0,9);
|
||||||
$handle = "stat".$nombre_tipo_modulo."_".$nombre_agente;
|
$handle = "stat".$nombre_tipo_modulo."_".$nombre_agente;
|
||||||
$url = 'reporting/procesos.php?agente='.$nombre_agente;
|
$url = 'reporting/procesos.php?agente='.$nombre_agente;
|
||||||
$win_handle=dechex(crc32($nombre_agente.$row3["nombre"]));
|
$win_handle=dechex(crc32($nombre_agente.$row3["nombre"]));
|
||||||
echo "<td class=".$tdcolor." width='78'>";
|
echo "<td class=".$tdcolor." width='78'>";
|
||||||
|
|
||||||
echo "<a href='javascript:winopeng(\"reporting/stat_win.php?tipo=mes&id=".$row3["id_agente_modulo"]."&refresh=180000\", \"mes_".$win_handle."\")'><img border=0 src='images/grafica_m.gif'></a> ";
|
echo "<a href='javascript:winopeng(\"reporting/stat_win.php?tipo=mes&id=".$row3["id_agente_modulo"]."&refresh=180000\", \"mes_".$win_handle."\")'><img src='images/grafica_m.gif'></a> ";
|
||||||
|
|
||||||
$link ="winopeng('reporting/stat_win.php?tipo=semana&id=".$row3["id_agente_modulo"]."&refresh=6000','sem_".$win_handle."')";
|
$link ="winopeng('reporting/stat_win.php?tipo=semana&id=".$row3["id_agente_modulo"]."&refresh=6000','sem_".$win_handle."')";
|
||||||
echo '<a href="javascript:'.$link.'"><img border=0 src="images/grafica_w.gif"></a> ';
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_w.gif"></a> ';
|
||||||
|
|
||||||
$link ="winopeng('reporting/stat_win.php?tipo=dia&id=".$row3["id_agente_modulo"]."&refresh=800','dia_".$win_handle."')";
|
$link ="winopeng('reporting/stat_win.php?tipo=dia&id=".$row3["id_agente_modulo"]."&refresh=800','dia_".$win_handle."')";
|
||||||
echo '<a href="javascript:'.$link.'"><img border=0 src="images/grafica_d.gif"></a> ';
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_d.gif"></a> ';
|
||||||
|
|
||||||
$link ="winopeng('reporting/stat_win.php?tipo=hora&id=".$row3["id_agente_modulo"]."&refresh=30','hora_".$win_handle."')";
|
$link ="winopeng('reporting/stat_win.php?tipo=hora&id=".$row3["id_agente_modulo"]."&refresh=30','hora_".$win_handle."')";
|
||||||
echo '<a href="javascript:'.$link.'"><img border=0 src="images/grafica_h.gif"</a>';
|
echo '<a href="javascript:'.$link.'"><img src="images/grafica_h.gif"</a>';
|
||||||
}
|
}
|
||||||
else { # Writing string data in different way :)
|
else { # Writing string data in different way :)
|
||||||
echo "<td class='".$tdcolor."f9' colspan='2'>";
|
echo "<td class='".$tdcolor."f9' colspan='2' title='".$row3["datos"]."'>";
|
||||||
echo salida_limpia(substr($row3["datos"],0,42));
|
echo salida_limpia(substr($row3["datos"],0,42));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,8 @@ if (comprueba_login() == 0) {
|
|||||||
} else {
|
} else {
|
||||||
echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60'>";
|
echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60'>";
|
||||||
}
|
}
|
||||||
echo "<table border='0' cellspacing=3 cellpadding=3><tr><td valign='middle'>".$lang_label["group_name"];
|
echo "<table cellspacing=3 cellpadding=3>";
|
||||||
|
echo "<tr><td valign='middle'>".$lang_label["group_name"]."</td>";
|
||||||
echo "<td valign='middle'>";
|
echo "<td valign='middle'>";
|
||||||
echo "<select name='ag_group' onChange='javascript:this.form.submit();' class='w130'>";
|
echo "<select name='ag_group' onChange='javascript:this.form.submit();' class='w130'>";
|
||||||
|
|
||||||
@ -79,16 +80,25 @@ if (comprueba_login() == 0) {
|
|||||||
} else {
|
} else {
|
||||||
echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60'>";
|
echo "<form method='post' action='index.php?sec=estado&sec2=operation/agentes/status_monitor&refr=60'>";
|
||||||
}
|
}
|
||||||
echo "<tr><td valign='middle'>";
|
|
||||||
echo $lang_label["module_name"]."<td valign='middle'> <select name='ag_modulename' onChange='javascript:this.form.submit();'>";
|
echo "<td> </td>";
|
||||||
|
echo "<td>";
|
||||||
|
echo "<img src='images/b_green.gif'> - ".$lang_label["green_light"]."</td><td> </td>";
|
||||||
|
echo "<td>";
|
||||||
|
echo "<img src='images/b_red.gif'> - ".$lang_label["red_light"]."</td>";
|
||||||
|
echo "</td>";
|
||||||
|
echo "</tr>";
|
||||||
|
echo "<tr>";
|
||||||
|
echo "<td valign='middle'>".$lang_label["module_name"]."</td>";
|
||||||
|
echo "<td valign='middle'><select name='ag_modulename' onChange='javascript:this.form.submit();'>";
|
||||||
if ( isset($ag_modulename)){
|
if ( isset($ag_modulename)){
|
||||||
echo "<option>".$ag_modulename;
|
echo "<option>".$ag_modulename."</option>";
|
||||||
}
|
}
|
||||||
echo "<option>ALL</option>";
|
echo "<option>ALL</option>";
|
||||||
$sql='SELECT DISTINCT nombre FROM tagente_modulo WHERE (id_tipo_modulo = 2) OR (id_tipo_modulo = 9) OR (id_tipo_modulo = 12) OR (id_tipo_modulo = 18) OR (id_tipo_modulo = 6) ';
|
$sql='SELECT DISTINCT nombre FROM tagente_modulo WHERE (id_tipo_modulo = 2) OR (id_tipo_modulo = 9) OR (id_tipo_modulo = 12) OR (id_tipo_modulo = 18) OR (id_tipo_modulo = 6) ';
|
||||||
$result=mysql_query($sql);
|
$result=mysql_query($sql);
|
||||||
while ($row=mysql_fetch_array($result)){
|
while ($row=mysql_fetch_array($result)){
|
||||||
echo "<option>".$row[0]."</option>";
|
echo "<option>".$row['0']."</option>";
|
||||||
}
|
}
|
||||||
echo "</select>";
|
echo "</select>";
|
||||||
echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript></form>";
|
echo "<td valign='middle'><noscript><input name='uptbutton' type='submit' class='sub' value='".$lang_label["show"]."'></noscript></form>";
|
||||||
@ -154,12 +164,6 @@ if (comprueba_login() == 0) {
|
|||||||
echo "<table cellpadding='3' cellspacing='3' width='750'><tr><th>".$lang_label["agent"]."</th><th>".$lang_label["type"]."</th><th>".$lang_label["name"]."</th><th>".$lang_label["description"]."</th><th>".$lang_label["max_min"]."</th><th>".$lang_label["interval"]."</th><th>".$lang_label["status"]."</th><th>".$lang_label["timestamp"]."</th>";
|
echo "<table cellpadding='3' cellspacing='3' width='750'><tr><th>".$lang_label["agent"]."</th><th>".$lang_label["type"]."</th><th>".$lang_label["name"]."</th><th>".$lang_label["description"]."</th><th>".$lang_label["max_min"]."</th><th>".$lang_label["interval"]."</th><th>".$lang_label["status"]."</th><th>".$lang_label["timestamp"]."</th>";
|
||||||
echo $string; //the built table of monitors
|
echo $string; //the built table of monitors
|
||||||
echo "<tr><td colspan='8'><div class='raya'></div></td></tr></table>";
|
echo "<tr><td colspan='8'><div class='raya'></div></td></tr></table>";
|
||||||
echo "<br><table>";
|
|
||||||
echo "<tr><td class='f9i'>";
|
|
||||||
echo "<img src='images/b_green.gif'> - ".$lang_label["green_light"]."</td><td> </td>";
|
|
||||||
echo "<td class='f9i'>";
|
|
||||||
echo "<img src='images/b_red.gif'> - ".$lang_label["red_light"]."</td>";
|
|
||||||
echo "</table>";
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
echo "<font class='red'>".$lang_label["no_monitors_g"]."</font>";
|
echo "<font class='red'>".$lang_label["no_monitors_g"]."</font>";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user