From 6df29def51777348f3d0e05aeaf71001f7019afb Mon Sep 17 00:00:00 2001 From: vgilc Date: Mon, 17 Mar 2014 12:32:48 +0000 Subject: [PATCH] 2014-03-17 Vanessa Gil * pandoradb.sql extras/pandoradb_migrate_5.0_to_5.1.mysql.sql godmode/agentes/configurar_agente.php: Fixed bug: 'post_process' out of range. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9604 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ .../extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql | 5 +++++ pandora_console/godmode/agentes/configurar_agente.php | 2 +- pandora_console/pandoradb.sql | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 74f28e4da0..8ad5858ec1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-03-17 Vanessa Gil + + * pandoradb.sql + extras/pandoradb_migrate_5.0_to_5.1.mysql.sql + godmode/agentes/configurar_agente.php: Fixed bug: + 'post_process' out of range. + 2014-03-17 Vanessa Gil * operation/snmpconsole/snmp_view.php: Added 'group by diff --git a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql index e1ffebd3aa..3fbdb2b006 100644 --- a/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql @@ -36,3 +36,8 @@ UPDATE tconfig SET `value`='#FF6600' WHERE `token`='graph_color3'; -- Table `tconfig` -- --------------------------------------------------------------------- ALTER TABLE tgraph_source MODIFY COLUMN `weight` float(8,3) NOT NULL DEFAULT 0; + +-- --------------------------------------------------------------------- +-- Table `tagente_modulo` +-- --------------------------------------------------------------------- +ALTER TABLE `pandora`.`tagente_modulo` MODIFY COLUMN `post_process` DOUBLE DEFAULT NULL; diff --git a/pandora_console/godmode/agentes/configurar_agente.php b/pandora_console/godmode/agentes/configurar_agente.php index 4729889149..a435624ec1 100644 --- a/pandora_console/godmode/agentes/configurar_agente.php +++ b/pandora_console/godmode/agentes/configurar_agente.php @@ -741,7 +741,7 @@ if ($update_module || $create_module) { // where are very big and PHP uses scientific notation, p.e: // 1.23E-10 is 0.000000000123 - $post_process = (string) get_parameter ('post_process', 0.0); + $post_process = get_parameter ('post_process', 0); $prediction_module = 0; $max_timeout = (int) get_parameter ('max_timeout'); $max_retries = (int) get_parameter ('max_retries'); diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 0ae27639ae..a636a8d455 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -202,7 +202,7 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `plugin_pass` text, `plugin_parameter` text, `id_plugin` int(10) default '0', - `post_process` double(18,5) default NULL, + `post_process` double default NULL, `prediction_module` bigint(14) default '0', `max_timeout` int(4) unsigned default '0', `max_retries` int(4) unsigned default '0',