diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a3ab4db702..70ef5a02d0 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,5 +1,9 @@ 2008-01-10 Sancho Lerena + * pandoradbdata_13_to_14.sql: Correct build and version. + + * tactical.php: Fixed problem with networkserver stats. + Code merged from 1.3.1 branch: * functions_db.php: Some changes in future generic SQL interface access. diff --git a/pandora_console/operation/agentes/tactical.php b/pandora_console/operation/agentes/tactical.php index eb7bc76694..d221d0ec66 100644 --- a/pandora_console/operation/agentes/tactical.php +++ b/pandora_console/operation/agentes/tactical.php @@ -197,21 +197,21 @@ echo ""; if (($network_server == 1) OR ($data_server == 1)){ // Progress bar calculations - if ($network_server == 1){ - if ($total_modules == 0) - $percentil = 0; - if ($total_modules > 0) - $percentil = $modules_server / ($total_modules / 100); - else - $percentil = 0; - $total_modules_temp = $total_modules; - } else { - if ($total_modules_data == 0) - $percentil = 0; - else - $percentil = $modules_server / ($total_modules_data / 100); - $total_modules_temp = $total_modules_data; - } + if ($network_server == 1){ + if ($modules_server == 0) + $percentil = 0; + if ($modules_server > 0) + $percentil = $modules_server / ($total_modules_network / 100); + else + $percentil = 0; + $total_modules_temp = $total_modules_network; + } else { + if ($total_modules_data == 0) + $percentil = 0; + else + $percentil = $modules_server / ($total_modules_data / 100); + $total_modules_temp = $total_modules_data; + } } elseif ($recon_server == 1){ $sql2 = "SELECT COUNT(id_rt) FROM trecon_task WHERE id_network_server = $id_server"; diff --git a/pandora_console/pandoradbdata_13_to_14.sql b/pandora_console/pandoradbdata_13_to_14.sql index 0c38e13102..8cfabce0c9 100644 --- a/pandora_console/pandoradbdata_13_to_14.sql +++ b/pandora_console/pandoradbdata_13_to_14.sql @@ -2,8 +2,8 @@ -- New data -UPDATE tconfig SET value = '1.4dev' WHERE token = 'db_scheme_version'; -UPDATE tconfig SET value = '1.4dev' WHERE token = 'db_scheme_build'; +UPDATE tconfig SET value = '1.4-dev' WHERE token = 'db_scheme_version'; +UPDATE tconfig SET value = 'PD080110' WHERE token = 'db_scheme_build'; INSERT INTO `ttipo_modulo` VALUES (100,'keep_alive',-1,'KeepAlive','mod_keepalive.png'), (19, 'image_jpg',4,'Image JPG data', 'mod_image_jpg.png'), (20, 'image_png',4,'Image PNG data', 'mod_image_png.png'), (21, 'async_proc', 5, 'Asyncronous proc data', 'mod_async_proc.png'), (22, 'async_data', 5, 'Asyncronous numeric data', 'mod_async_data.png'), (23, 'async_string', 5, 'Asyncronous string data', 'mod_async_string.png');