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:
raulmateos 2006-11-21 19:10:23 +00:00
parent 873cf9096c
commit 34618aaa59
4 changed files with 48 additions and 29 deletions

View File

@ -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 <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
of the agent.

View File

@ -61,7 +61,7 @@ if (comprueba_login() == 0) {
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'>&nbsp;<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>
<td class="datos"><b>'.$lang_label["agent_name"].'</b></td>
<td class="datos">'.salida_limpia($nombre_agente);
@ -86,13 +86,14 @@ if (comprueba_login() == 0) {
echo '<tr>
<td class="datos"><b>'.$lang_label["os"].'</b></td>
<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) {
echo '<tr>
<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>
<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"];
$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 '</td></tr>';

View File

@ -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'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
$result3=mysql_query($sql3);
if (mysql_num_rows ($result3)) {
echo "<table width='750' cellpadding='3' cellspacing='3'><th>X<th>".$lang_label["module_name"];
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 "<table width='750' cellpadding='3' cellspacing='3'>";
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='';
$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 "<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)
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);
$handle = "stat".$nombre_tipo_modulo."_".$nombre_agente;
$url = 'reporting/procesos.php?agente='.$nombre_agente;
$win_handle=dechex(crc32($nombre_agente.$row3["nombre"]));
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>&nbsp;";
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>&nbsp;";
$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>&nbsp;';
echo '<a href="javascript:'.$link.'"><img src="images/grafica_w.gif"></a>&nbsp;';
$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>&nbsp;';
echo '<a href="javascript:'.$link.'"><img src="images/grafica_d.gif"></a>&nbsp;';
$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 :)
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));
}

View File

@ -50,7 +50,8 @@ if (comprueba_login() == 0) {
} else {
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 "<select name='ag_group' onChange='javascript:this.form.submit();' class='w130'>";
@ -79,16 +80,25 @@ if (comprueba_login() == 0) {
} else {
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>&nbsp;</td>";
echo "<td>";
echo "<img src='images/b_green.gif'> - ".$lang_label["green_light"]."</td><td>&nbsp;</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)){
echo "<option>".$ag_modulename;
echo "<option>".$ag_modulename."</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) ';
$result=mysql_query($sql);
while ($row=mysql_fetch_array($result)){
echo "<option>".$row[0]."</option>";
echo "<option>".$row['0']."</option>";
}
echo "</select>";
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 $string; //the built table of monitors
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>&nbsp;</td>";
echo "<td class='f9i'>";
echo "<img src='images/b_red.gif'> - ".$lang_label["red_light"]."</td>";
echo "</table>";
}
else {
echo "<font class='red'>".$lang_label["no_monitors_g"]."</font>";