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:
Esteban Sanchez 2009-04-14 12:59:55 +00:00
parent 36466099fe
commit 35159c7a74
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>
* include/htmlawed.php: HTML cleaner-upper. If compact_header is set will
actually strip the HTML for less bandwidth usage.
* include/htmlawed.php: HTML cleaner-upper. If compact_header is set
will actually strip the HTML for less bandwidth usage.
* include/functions_ui.php: If compact_header is set, it will strip
whitespace out of the included files

View File

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

View File

@ -156,6 +156,9 @@
#icon_god-setup {
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 {
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 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
// This program is free software; you can redistribute it and/or
// 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);
$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->size = array ();
$table->size[6] = '60';
@ -81,9 +85,5 @@ foreach ($servers as $server) {
array_push ($table->data, $data);
}
if (! empty ($table->data)) {
print_table ($table);
} else {
echo "<div class='nf'>".__('There are no servers configured into the database')."</div>";
}
print_table ($table);
?>

View File

@ -430,7 +430,7 @@ function graphic_agentmodules ($id_agent, $width, $height) {
function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
global $config;
$data = array();
$data = array ();
$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++) {
$bottom = $datelimit + ($periodtime * $i);
$top = $datelimit + ($periodtime * ($i + 1));
$data[$bottom] = (int) get_db_sql ("SELECT COUNT(*) FROM tagent_access WHERE
id_agent = ".$id_agent." AND
utimestamp > ".$bottom." AND
utimestamp < ".$top);
$data[$bottom] = (int) get_db_value_filter ('COUNT(*)',
'tagent_access',
array ('id_agent' => $id_agent,
'utimestamp > '.$bottom,
'utimestamp < '.$top));
}
$engine = get_graph_engine ($period);
@ -455,15 +456,14 @@ function graphic_agentaccess ($id_agent, $width, $height, $period = 0) {
$engine->width = $width;
$engine->height = $height;
$engine->data = $data;
$engine->max_value = max ($data);
$engine->max_value = $engine->max_value = max ($data);
$engine->show_title = false;
$engine->fontpath = $config['fontpath'];
$engine->xaxis_interval = floor ($width / 72);
$engine->yaxis_interval = max ($data);
$engine->xaxis_format = 'date';
$engine->watermark = false;
$engine->show_grid = false;
$engine->single_graph ();
}

View File

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