2009-04-14 Esteban Sanchez <estebans@artica.es>

* operation/servers/view_server.php: Removed notice message when no
	servers were found.
	
	* reporting/fgraph.php: Use get_db_value_filter().
	
	* include/styles/pandora.css: Updated copyright date.
	
	* include/styles/menu.css: Added policies enterprise style.
	
	* reporting/pChart/pChart.class: Fixed a infinite loop that happened
	sometimes on drawScale().
	
	* include/config_process.php: Updated build version.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1619 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
esanchezm 2009-04-14 12:59:55 +00:00
parent 3421e18c52
commit a1a5cd216b
7 changed files with 39 additions and 20 deletions

View File

@ -1,7 +1,23 @@
2009-04-14 Esteban Sanchez <estebans@artica.es>
* operation/servers/view_server.php: Removed notice message when no
servers were found.
* reporting/fgraph.php: Use get_db_value_filter().
* include/styles/pandora.css: Updated copyright date.
* include/styles/menu.css: Added policies enterprise style.
* reporting/pChart/pChart.class: Fixed a infinite loop that happened
sometimes on drawScale().
* include/config_process.php: Updated build version
2009-04-13 Evi Vanoost <vanooste@rcbi.rochester.edu> 2009-04-13 Evi Vanoost <vanooste@rcbi.rochester.edu>
* include/htmlawed.php: HTML cleaner-upper. If compact_header is set will * include/htmlawed.php: HTML cleaner-upper. If compact_header is set
actually strip the HTML for less bandwidth usage. will actually strip the HTML for less bandwidth usage.
* include/functions_ui.php: If compact_header is set, it will strip * include/functions_ui.php: If compact_header is set, it will strip
whitespace out of the included files whitespace out of the included files

View File

@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//Pandora Version //Pandora Version
$build_version = 'PC090402'; $build_version = 'PC090414';
$pandora_version = 'v3.0-dev'; $pandora_version = 'v3.0-dev';
$config['start_time'] = microtime (true); $config['start_time'] = microtime (true);

View File

@ -156,6 +156,9 @@
#icon_god-setup { #icon_god-setup {
background: #E9F3D2 url(../../images/god7.png) no-repeat 4px 4px; background: #E9F3D2 url(../../images/god7.png) no-repeat 4px 4px;
} }
#icon_god-policies {
background: #E9F3D2 url(../../images/policies.png) no-repeat 4px 4px;
}
#icon_oper-inventory { #icon_oper-inventory {
background: #E9F3D2 url(../../images/page_white_text.png) no-repeat 4px 4px; background: #E9F3D2 url(../../images/page_white_text.png) no-repeat 4px 4px;
} }

View File

@ -8,7 +8,7 @@ Description: The default Pandora FMS theme layout
// ============================================= // =============================================
// Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.comnt // Copyright (c) 2004-2008 Sancho Lerena, slerena@gmail.comnt
// Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com // Copyright (c) 2004-2008 Raul Mateos Martin, raulofpandora@gmail.com
// Copyright (c) 2005-2008 Artica Soluciones Tecnologicas, info@artica.es // Copyright (c) 2005-2009 Artica Soluciones Tecnologicas, info@artica.es
// Copyright (c) 2008-2009 Evi Vanoost, vanooste@rcbi.rochester.edu // Copyright (c) 2008-2009 Evi Vanoost, vanooste@rcbi.rochester.edu
// This program is free software; you can redistribute it and/or // This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License // modify it under the terms of the GNU General Public License

View File

@ -36,7 +36,11 @@ echo "<h2>".__('Pandora servers')." &raquo; ".__('Configuration detail')."</h2>"
$total_modules = (int) get_db_value ('COUNT(*)', 'tagente_modulo', 'disabled', 0); $total_modules = (int) get_db_value ('COUNT(*)', 'tagente_modulo', 'disabled', 0);
$servers = get_server_info (); $servers = get_server_info ();
if ($servers === false) {
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
return;
}
$table->width = '98%'; $table->width = '98%';
$table->size = array (); $table->size = array ();
$table->size[6] = '60'; $table->size[6] = '60';
@ -81,9 +85,5 @@ foreach ($servers as $server) {
array_push ($table->data, $data); array_push ($table->data, $data);
} }
if (! empty ($table->data)) { print_table ($table);
print_table ($table);
} else {
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
}
?> ?>

View File

@ -430,7 +430,7 @@ function graphic_agentmodules ($id_agent, $width, $height) {
function graphic_agentaccess ($id_agent, $width, $height, $period = 0) { function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
global $config; global $config;
$data = array(); $data = array ();
$resolution = $config["graph_res"] * ($period * 2 / $width); // Number of "slices" we want in graph $resolution = $config["graph_res"] * ($period * 2 / $width); // Number of "slices" we want in graph
@ -444,10 +444,11 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
for ($i = 0; $i < $interval; $i++) { for ($i = 0; $i < $interval; $i++) {
$bottom = $datelimit + ($periodtime * $i); $bottom = $datelimit + ($periodtime * $i);
$top = $datelimit + ($periodtime * ($i + 1)); $top = $datelimit + ($periodtime * ($i + 1));
$data[$bottom] = (int) get_db_sql ("SELECT COUNT(*) FROM tagent_access WHERE $data[$bottom] = (int) get_db_value_filter ('COUNT(*)',
id_agent = ".$id_agent." AND 'tagent_access',
utimestamp > ".$bottom." AND array ('id_agent' => $id_agent,
utimestamp < ".$top); 'utimestamp > '.$bottom,
'utimestamp < '.$top));
} }
$engine = get_graph_engine ($period); $engine = get_graph_engine ($period);
@ -455,15 +456,14 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
$engine->width = $width; $engine->width = $width;
$engine->height = $height; $engine->height = $height;
$engine->data = $data; $engine->data = $data;
$engine->max_value = max ($data); $engine->max_value = $engine->max_value = max ($data);
$engine->show_title = false; $engine->show_title = false;
$engine->fontpath = $config['fontpath']; $engine->fontpath = $config['fontpath'];
$engine->xaxis_interval = floor ($width / 72); $engine->xaxis_interval = floor ($width / 72);
$engine->yaxis_interval = max ($data);
$engine->xaxis_format = 'date'; $engine->xaxis_format = 'date';
$engine->watermark = false; $engine->watermark = false;
$engine->show_grid = false; $engine->show_grid = false;
$engine->single_graph (); $engine->single_graph ();
} }

View File

@ -476,8 +476,8 @@
$Scale2 = ( $this->VMax - $this->VMin ) / $Factor / 2; $Scale2 = ( $this->VMax - $this->VMin ) / $Factor / 2;
$Scale4 = ( $this->VMax - $this->VMin ) / $Factor / 4; $Scale4 = ( $this->VMax - $this->VMin ) / $Factor / 4;
if ( $Scale1 >= 1 && $Scale1 <= $MaxDivs && !$ScaleOk) { $ScaleOk = TRUE; $Divisions = floor($Scale1); $Scale = 1;} if ($Scale1 <= $MaxDivs && !$ScaleOk) { $ScaleOk = TRUE; $Divisions = max(floor($Scale1),1); $Scale = 1;}
if ( $Scale2 >= 1 && $Scale2 <= $MaxDivs && !$ScaleOk) { $ScaleOk = TRUE; $Divisions = floor($Scale2); $Scale = 2;} if ($Scale2 <= $MaxDivs && !$ScaleOk) { $ScaleOk = TRUE; $Divisions = max(floor($Scale2),1); $Scale = 2;}
if (!$ScaleOk) if (!$ScaleOk)
{ {
if ( $Scale2 > 1 ) { $Factor = $Factor * 10; } if ( $Scale2 > 1 ) { $Factor = $Factor * 10; }