2007-05-18 Sancho Lerena <slerena@gmail.com>

* include/styles/pandora.css : Some style changes.

        * include/functions.php: Changed format_numeric and format_for_graph to show a
        better number formatting.

        * index.php: Some minor changes in layout and bgcolor (not used style because
        some pages that don't have the same color uses main style, f.e: stat_win for graphs).

        * godmode/agentes/module_manager.php
        * operation/agentes/estado_ultimopaquete.php
        * operation/agentes/estado_monitores.php
        * operation/agentes/estado_generalagente.php
        * operation/agentes/datos_agente.php, estado_ul: Updated output render and fixes
        some tables, added databox style, removed line.

        * operation/menu.php: Removed active console. This don't go with 1.3 version
        finally due many unfixed bugs.

        * reporting/stat_win.php: White background fixed.

        * general/header.php
        * general/footer.php: Some adjustments in styles.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@457 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
slerena 2007-05-18 12:56:05 +00:00
parent 6b401edcc3
commit abe8fa0c5f
13 changed files with 112 additions and 74 deletions

View File

@ -1,3 +1,28 @@
2007-05-18 Sancho Lerena <slerena@gmail.com>
* include/styles/pandora.css : Some style changes.
* include/functions.php: Changed format_numeric and format_for_graph to show a
better number formatting.
* index.php: Some minor changes in layout and bgcolor (not used style because
some pages that don't have the same color uses main style, f.e: stat_win for graphs).
* godmode/agentes/module_manager.php
* operation/agentes/estado_ultimopaquete.php
* operation/agentes/estado_monitores.php
* operation/agentes/estado_generalagente.php
* operation/agentes/datos_agente.php, estado_ul: Updated output render and fixes
some tables, added databox style, removed line.
* operation/menu.php: Removed active console. This don't go with 1.3 version
finally due many unfixed bugs.
* reporting/stat_win.php: White background fixed.
* general/header.php
* general/footer.php: Some adjustments in styles.
2007-05-18 Raul Mateos <raulofpandora@gmail.com> 2007-05-18 Raul Mateos <raulofpandora@gmail.com>
* images/header.png: New graphic image for header in the new design. * images/header.png: New graphic image for header in the new design.

View File

@ -15,25 +15,15 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software // along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
?> echo "</center>";
<p align='center'> echo '<a class="white_bold" target="_new" href="general/license/pandora_info_'.$language_code.'.html">
<?PHP
echo '
<a target="_new" href="general/license/pandora_info_'.$language_code.'.html">
Pandora FMS '.$pandora_version.' Build '.$build_version.' '. Pandora FMS '.$pandora_version.' Build '.$build_version.' '.
$lang_label["gpl_notice"].'</a><br>'; $lang_label["gpl_notice"].'</a><br>';
if (isset($_SESSION['id_usuario'])) {
if (isset($_SERVER['REQUEST_TIME'])) { if (isset($_SERVER['REQUEST_TIME'])) {
$time = $_SERVER['REQUEST_TIME']; $time = $_SERVER['REQUEST_TIME'];
} else { } else {
$time = time(); $time = time();
} }
echo $lang_label["gen_date"]." ".date("D F d, Y H:i:s", $time)."<br>"; echo "<a class='white'>".$lang_label["gen_date"]." ".date("D F d, Y H:i:s", $time)."</a><br>";
} echo "</center>";
?> ?>
<i>Pandora FMS is a <a target="_new" href="http://pandora.sourceforge.net">
SourceForge registered project</a></i>
</p>

View File

@ -22,30 +22,32 @@ echo '
<div id="head_r"> <div id="head_r">
<span id="logo_text1">Pandora</span> <span id="logo_text2">FMS</span> <span id="logo_text1">Pandora</span> <span id="logo_text2">FMS</span>
</div> </div>
<div_id="head_l"> <div id="head_l">
<a href="index.php"><img src="images/logo_menu.gif" border="0" alt="logo"></a> <a href="index.php"><img src="images/logo_menu.gif" border="0" alt="logo"></a>
</div> </div>
'; ';
/* echo "<table border='0' style='margin-right: 145px;margin-top: 20px;'> echo "<div id='head_m'>";
echo "<table border='0'>
<tr>"; <tr>";
if (isset ($_SESSION["id_usuario"])){ if (isset ($_SESSION["id_usuario"])){
echo "<td width=40%>"; echo "<td width=40%>";
$id_usuario = entrada_limpia ($_SESSION["id_usuario"]); $id_usuario = entrada_limpia ($_SESSION["id_usuario"]);
if (dame_admin($id_usuario)==1) if (dame_admin($_SESSION["id_usuario"])==1)
echo "<img src='images/user_suit.png' class='bot'> "; echo "<img src='images/user_suit.png' class='bot'> ";
else else
echo "<img src='images/user_green.png' class='bot'> "; echo "<img src='images/user_green.png' class='bot'> ";
echo $lang_label["has_connected"]. ' echo "<a class='white'>".$lang_label["has_connected"]. '
[<b class="f10">'. $id_usuario. '</b>]'; [<b>'. $id_usuario. '</b>]</a>';
echo "<td width=30%>"; echo "<br>";
echo "<a href='index.php?sec=main'><img src='images/information.png' class='bot'> ". $lang_label["information"]."</a>"; echo "<a class='white_bold' href='index.php?bye=bye'><img src='images/lock.png' class='bot'> ". $lang_label["logout"]."</a>";
echo "<td width=20%>"; echo "</td><td width='25'> </td><td>";
echo "<a href='help/en/toc.php'><img src='images/help.png' class='bot'> ". $lang_label["help"]."</a>"; echo "<a class='white_bold' href='index.php?sec=main'><img src='images/information.png' class='bot'> ". $lang_label["information"]."</a>";
echo "<td align='right' width=10%>"; echo "<br>";
echo "<a href='index.php?bye=bye'><img src='images/lock.png' class='bot'> ". $lang_label["logout"]."</a>"; echo "<a class='white_bold' href='help/en/toc.php'><img src='images/help.png' class='bot'> ". $lang_label["help"]."</a>";
} }
echo "</tr></table>"; echo "</tr></table>";
*/ echo "</div>";
?> ?>

View File

@ -171,7 +171,7 @@ echo "<h2>".$lang_label["agent_conf"]." &gt; ".$lang_label["assigned_modules"]."
echo "&nbsp;&nbsp;<a class='info' href='#module_assignment'> <span>".$lang_label["module_asociation_form"]."</span><img src='images/wand.png'></a>"; echo "&nbsp;&nbsp;<a class='info' href='#module_assignment'> <span>".$lang_label["module_asociation_form"]."</span><img src='images/wand.png'></a>";
echo "</h2>"; echo "</h2>";
if ($row=mysql_num_rows($result)){ if ($row=mysql_num_rows($result)){
echo '<table width="750" cellpadding="3" cellspacing="3" class="fon">'; echo '<table width="750" cellpadding="4" cellspacing="4" class="databox">';
echo '<tr>'; echo '<tr>';
echo "<th>".$lang_label["module_name"]; echo "<th>".$lang_label["module_name"];
echo "<th>".$lang_label["type"]; echo "<th>".$lang_label["type"];
@ -237,7 +237,6 @@ if ($row=mysql_num_rows($result)){
echo "<img src='images/chart_curve.png' border=0></b></a>"; echo "<img src='images/chart_curve.png' border=0></b></a>";
} }
} }
echo "<tr><td colspan='7'><div class='raya'></div></td></tr>";
echo "</table>"; echo "</table>";
} else } else
echo "<div class='nf'>No modules</div>"; echo "<div class='nf'>No modules</div>";
@ -271,8 +270,7 @@ else { // Create
} }
echo '<a name="modules"> <!-- Dont Delete !! -->'; echo '<a name="modules"> <!-- Dont Delete !! -->';
echo '<table width="700" cellpadding="3" cellspacing="3" class="fon">'; echo '<table width="700" cellpadding="4" cellspacing="4" class="databox_color">';
echo "<tr><td class='lb' rowspan='11' width='1'>";
echo '<tr><td class="datos3">'; echo '<tr><td class="datos3">';
echo $lang_label["network_component"]; echo $lang_label["network_component"];
@ -375,7 +373,7 @@ if (isset($_POST["oid"])){
} }
?> ?>
</select> </select>
<td class="datos2"><input type="submit" name="oid" value="SNMP Walk"> <td class="datos2"><input type="submit" class="sub next" name="oid" value="SNMP Walk">
<tr><td class="datost"><?php echo $lang_label["tcp_send"] ?> <tr><td class="datost"><?php echo $lang_label["tcp_send"] ?>
<td class="datos"><textarea name="tcp_send" cols="22" rows="2"><?php echo $tcp_send ?></textarea> <td class="datos"><textarea name="tcp_send" cols="22" rows="2"><?php echo $tcp_send ?></textarea>
@ -393,19 +391,17 @@ if (isset($_POST["oid"])){
<textarea name="descripcion" cols=71 rows=2> <textarea name="descripcion" cols=71 rows=2>
<?php echo $modulo_descripcion ?> <?php echo $modulo_descripcion ?>
</textarea> </textarea>
<tr><td colspan='5'><div class='raya'></div></td></tr>
<tr>
<?php <?php
echo "<td colspan=5 align='right'>"; echo "</table>";
echo "<table width=700>";
echo "<td align='right'>";
if ($update_module == "1"){ if ($update_module == "1"){
echo '<input name="updbutton" type="submit" class="sub next" value="'.$lang_label["update"].'">'; echo '<input name="updbutton" type="submit" class="sub next" value="'.$lang_label["update"].'">';
} else { } else {
echo '<input name="crtbutton" type="submit" class="sub wand" value="'.$lang_label["add"].'">'; echo '<input name="crtbutton" type="submit" class="sub wand" value="'.$lang_label["add"].'">';
} }
echo "</form>"; echo "</form>";
echo "</table>";
?> ?>
</table>

View File

@ -377,7 +377,7 @@ function format_numeric ( $number, $decimals=2, $dec_point=".", $thousands_sep="
return 0; return 0;
// If has decimals // If has decimals
if (fmod($number , 1)> 0) if (fmod($number , 1)> 0)
return number_format ($number, 2, $dec_point, $thousands_sep); return number_format ($number, $decimals, $dec_point, $thousands_sep);
else else
return number_format ($number, 0, $dec_point, $thousands_sep); return number_format ($number, 0, $dec_point, $thousands_sep);
} }
@ -385,12 +385,16 @@ function format_numeric ( $number, $decimals=2, $dec_point=".", $thousands_sep="
// --------------------------------------------------------------- // ---------------------------------------------------------------
// Render numeric data in a easy way to the user // Render numeric data in a easy way to the user
// --------------------------------------------------------------- // ---------------------------------------------------------------
function format_for_graph ( $number ) { function format_for_graph ( $number , $decimals=2, $dec_point=".", $thousands_sep=",") {
if ($number > "1000000") if ($number > "1000000")
return number_format ($number/1000000, 1, ".", ",")." M"; return number_format ($number/1000000, $decimals, $dec_point, $thousands_sep)." M";
if ($number > "1000") if ($number > "1000")
return number_format ($number/1000, 1, ".", ",")." K"; return number_format ($number/1000, $decimals, $dec_point, $thousands_sep )." K";
return $number; // If has decimals
if (fmod($number , 1)> 0)
return number_format ($number, $decimals, $dec_point, $thousands_sep);
else
return number_format ($number, 0, $dec_point, $thousands_sep);
} }

View File

@ -32,11 +32,10 @@
font-size: 11px; font-size: 11px;
} }
body { body {
background-color: #555;
margin-top: 0; margin-top: 0;
} }
input, textarea { input, textarea {
border: 1px solid #eee; border: 1px solid #ddd;
font: Verdana, sans-serif, Arial; font: Verdana, sans-serif, Arial;
} }
textarea { textarea {
@ -55,8 +54,8 @@ input.button {
margin: 10px 15px; margin: 10px 15px;
} }
select { select {
padding: 2px; padding: 0px;
border:1px solid #eee; border:1px solid #ddd;
font: normal 1em/1.5em Verdana, sans-serif; font: normal 1em/1.5em Verdana, sans-serif;
} }
checkbox { checkbox {
@ -64,13 +63,14 @@ checkbox {
border:1px solid #eee; border:1px solid #eee;
font: normal 1em/1.5em Verdana, sans-serif; font: normal 1em/1.5em Verdana, sans-serif;
} }
h1, h2 { h1, h2, h3 {
color: #103a3a; font: bold 1em 'Trebuchet MS', Tahoma, Sans-serif;
text-transform: uppercase;
color: #778855;
padding-bottom: 15px; padding-bottom: 15px;
padding-top: 10px; padding-top: 10px;
} }
h3 { h3 {
color: #3c566d;
font-size: 13px; font-size: 13px;
} }
h1 { h1 {
@ -87,6 +87,16 @@ a:hover {
color: #003a3a; color: #003a3a;
text-decoration: underline; text-decoration: underline;
} }
a.white_bold {
color: #eeeeee;
text-decoration: none;
font-weight: bold;
}
a.white {
color: #eeeeee;
text-decoration: none;
}
p.center { p.center {
text-align: center; text-align: center;
} }
@ -156,12 +166,12 @@ div#page {
width: 960px; width: 960px;
background: #fff; background: #fff;
clear: both; clear: both;
border-bottom: solid 5px #778855;
} }
div#main { div#main {
width: 770px; width: 780px;
float: right; float: right;
border-top: 5px solid #778855; padding-left: 0px;
padding-left: 20px;
padding-top: 0px; padding-top: 0px;
padding-bottom: 20px; padding-bottom: 20px;
margin-bottom: 25px; margin-bottom: 25px;
@ -181,13 +191,13 @@ div#head {
font-size: 10px; font-size: 10px;
width: 960px; width: 960px;
height: 60px; height: 60px;
border-bottom: solid 3px #000;
background: url(../../images/header.jpg); background: url(../../images/header.jpg);
} }
div#foot { div#foot {
padding-top: 15px; margin-top: solid 2px #000;
padding-top: 5px;
text-align: center; text-align: center;
background: #fff; background: #000;
width: 960px; width: 960px;
clear: both; clear: both;
} }
@ -533,10 +543,11 @@ span.master, span.snmp, span.binary, span.recon {
border: 1px solid #f2f2f2; border: 1px solid #f2f2f2;
} }
.databox { .databox {
margin: 0px;
background-color: #fafafa; background-color: #fafafa;
} }
.databox_color { .databox_color {
border-left: 3px solid #ec981f; border-left: 4px solid #778855;
} }
#head_l { #head_l {
float: left; float: left;
@ -549,6 +560,12 @@ span.master, span.snmp, span.binary, span.recon {
margin-right: 10px; margin-right: 10px;
padding-top: 10px; padding-top: 10px;
} }
#head_m {
position: absolute;
padding-top: 7px;
padding-left: 210px;
}
span#logo_text1 { span#logo_text1 {
font: bolder 3em Arial, Sans-serif; font: bolder 3em Arial, Sans-serif;
letter-spacing: -2px; letter-spacing: -2px;

View File

@ -97,7 +97,7 @@ if (isset ($_GET["refr"])){
<?php <?php
// Show custom background // Show custom background
echo '<body>'; echo '<body bgcolor=#555555>';
$REMOTE_ADDR = getenv ("REMOTE_ADDR"); $REMOTE_ADDR = getenv ("REMOTE_ADDR");
global $REMOTE_ADDR; global $REMOTE_ADDR;
@ -188,10 +188,11 @@ if (isset ($_GET["refr"])){
session_write_close(); session_write_close();
?> ?>
<div id='head'> <div style='border-left: solid 2px #000; width: 960px; border-right: solid 2px #000; border-top: solid 2px #000; margin-top: 5px;'>
<div id='head' style='border-bottom: solid 2px #555;'>
<?php require("general/header.php"); ?> <?php require("general/header.php"); ?>
</div> </div>
<div id="page"> <div id="page" style='border-top: solid 5px #778855;'>
<div id="menu"> <div id="menu">
<?php require ("general/main_menu.php"); ?> <?php require ("general/main_menu.php"); ?>
</div> </div>
@ -210,9 +211,10 @@ if (isset ($_GET["refr"])){
</div> </div>
<div style="clear:both"></div> <div style="clear:both"></div>
</div> </div>
<div id="foot"> <div id="foot">
<?php require("general/footer.php") ?> <?php require("general/footer.php") ?>
</div> </div>
</div>
</body> </body>
</html> </html>

View File

@ -63,7 +63,7 @@ function datos_raw($id_agente_modulo, $periodo){
echo "<h3> $et <a href='help/".$help_code."/chap3.php#3322' target='_help' echo "<h3> $et <a href='help/".$help_code."/chap3.php#3322' target='_help'
class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>"; class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
if (mysql_num_rows($result)){ if (mysql_num_rows($result)){
echo "<table cellpadding='3' cellspacing='3' width='600'>"; echo "<table cellpadding='3' cellspacing='3' width='600' class='databox'>";
$color=1; $color=1;
echo "<th>".$lang_label["timestamp"]."</th>"; echo "<th>".$lang_label["timestamp"]."</th>";
echo "<th>".$lang_label["data"]."</th>"; echo "<th>".$lang_label["data"]."</th>";
@ -89,7 +89,6 @@ function datos_raw($id_agente_modulo, $periodo){
} else } else
echo salida_limpia($row["datos"]); echo salida_limpia($row["datos"]);
} }
echo "<tr><td colspan='3'><div class='raya'></div></td></tr>";
echo "</table>"; echo "</table>";
} }
else { else {

View File

@ -59,10 +59,9 @@ if (comprueba_login() == 0) {
// Blank space below title // Blank space below title
echo "<div style='height: 10px'> </div>"; echo "<div style='height: 10px'> </div>";
echo '<table cellspacing="0" cellpadding="0" width="780" border=0>'; echo '<table cellspacing="0" cellpadding="0" width="780" border=0 class="databox">';
echo "<tr><td>"; echo "<tr><td>";
echo '<table cellspacing="4" cellpadding="4" border=0>'; echo '<table cellspacing="4" cellpadding="4" border=0 class="databox"> ';
echo "<tr><td class='lb_view' rowspan='12' width='1'>";
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"><b>'.strtoupper(salida_limpia($nombre_agente)); <td class="datos"><b>'.strtoupper(salida_limpia($nombre_agente));

View File

@ -28,7 +28,7 @@ if (comprueba_login() == 0) {
$result_t=mysql_query($sql_t); $result_t=mysql_query($sql_t);
if (mysql_num_rows ($result_t)) { if (mysql_num_rows ($result_t)) {
echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".$help_code."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>"; echo "<h3>".$lang_label["monitor_listing"]."<a href='help/".$help_code."/chap3.php#3323' target='_help' class='help'>&nbsp;<span>".$lang_label["help"]."</span></a></h3>";
echo "<table width='750' cellpadding=3 cellspacing=3>"; echo "<table width='750' cellpadding=4 cellspacing=4 class='databox'>";
echo "<tr><th>".$lang_label["type"]."</th> echo "<tr><th>".$lang_label["type"]."</th>
<th>".$lang_label["module_name"]."</th> <th>".$lang_label["module_name"]."</th>
<th>".$lang_label["description"]."</th> <th>".$lang_label["description"]."</th>
@ -103,7 +103,7 @@ if (comprueba_login() == 0) {
echo "</span></td>"; echo "</span></td>";
} }
} }
echo '<tr><td colspan="7"><div class="raya"></div></td></tr></table>'; echo '</table>';
} }
else else
echo "<div class='nf'>".$lang_label["no_monitors"]."</div>"; echo "<div class='nf'>".$lang_label["no_monitors"]."</div>";

View File

@ -62,8 +62,8 @@ 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>"; 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); $result3=mysql_query($sql3);
if (mysql_num_rows ($result3)) { if (mysql_num_rows ($result3)) {
echo "<table width='750' cellpadding='3' cellspacing='3'>"; echo "<table width='750' cellpadding='3' cellspacing='3' class='databox'>";
echo "<th>X</th>"; echo "<th></th>";
echo "<th>".$lang_label["module_name"]."</th>"; echo "<th>".$lang_label["module_name"]."</th>";
echo "<th>".$lang_label["type"]."</th>"; echo "<th>".$lang_label["type"]."</th>";
echo "<th>".$lang_label["int"]."</th>"; echo "<th>".$lang_label["int"]."</th>";
@ -165,7 +165,7 @@ if (comprueba_login() == 0) {
$myvalue = $row3["datos"]; $myvalue = $row3["datos"];
echo format_for_graph($myvalue ); echo format_for_graph($myvalue );
} else } else
echo substr($row3["datos"],0,12); echo substr(salida_limpia($row3["datos"]),0,12);
$handle = "stat".$nombre_tipo_modulo."_".$row3["id_agente_modulo"]; $handle = "stat".$nombre_tipo_modulo."_".$row3["id_agente_modulo"];
$url = 'reporting/procesos.php?agente='.$row3["id_agente_modulo"]; $url = 'reporting/procesos.php?agente='.$row3["id_agente_modulo"];
@ -209,7 +209,7 @@ if (comprueba_login() == 0) {
echo "</td></tr>"; echo "</td></tr>";
//} //}
} }
echo '<tr><td colspan="9"><div class="raya"></div></td></tr></table>'; echo '</table>';
} }
else { else {
echo "<div class='nf'>".$lang_label["no_modules"]."</div>"; echo "<div class='nf'>".$lang_label["no_modules"]."</div>";

View File

@ -74,11 +74,13 @@ if (give_acl($_SESSION["id_usuario"], 0, "AR")==1) {
echo "<ul class='mn'><li><a href='index.php?sec=estado&amp;sec2=operation/agentes/estadisticas' class='mn'>". $lang_label["statistics"]. "</a></li></ul></div>"; echo "<ul class='mn'><li><a href='index.php?sec=estado&amp;sec2=operation/agentes/estadisticas' class='mn'>". $lang_label["statistics"]. "</a></li></ul></div>";
} }
/* Not ready to use :(
// Active console // Active console
echo '<div id="op9">'; echo '<div id="op9">';
echo '<ul class="mn"><li>'; echo '<ul class="mn"><li>';
echo '<a href="operation/active_console/index.php" class="mn" target="_top">'.$lang_label["active_console"].'</a></li></ul></div>'; echo '<a href="operation/active_console/index.php" class="mn" target="_top">'.$lang_label["active_console"].'</a></li></ul></div>';
*/
// Server view // Server view
if ( isset($_GET["sec2"]) && $_GET["sec2"] == "operation/servers/view_server") { if ( isset($_GET["sec2"]) && $_GET["sec2"] == "operation/servers/view_server") {
echo '<div id="op2s">'; echo '<div id="op2s">';

View File

@ -45,6 +45,8 @@ echo '<style>';
include("../include/styles/pandora.css"); include("../include/styles/pandora.css");
echo '</style>'; echo '</style>';
echo "<body bgcolor=#ffffff>";
// Get input parameters // Get input parameters
if (isset($_GET["label"])) if (isset($_GET["label"]))