2012-05-10 Sergio Martin <sergio.martin@artica.es>

* include/javascript/pandora_modules.js
	pandoradb.sql
	pandoradb.postgreSQL.sql
	pandoradb.oracle.sql
	extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
	extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
	extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql
	godmode/agentes/module_manager_editor_common.php
	godmode/modules/manage_network_components_form.php
	godmode/modules/manage_network_components_form_common.php
	godmode/modules/manage_network_components.php: Fix some layout
	little bugs in module editor and added unit parameter
	to network components for pending task #3520706



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6287 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2012-05-10 15:35:28 +00:00
parent ae09d03d3d
commit a60652739e
12 changed files with 49 additions and 5 deletions

View File

@ -1,3 +1,19 @@
2012-05-10 Sergio Martin <sergio.martin@artica.es>
* include/javascript/pandora_modules.js
pandoradb.sql
pandoradb.postgreSQL.sql
pandoradb.oracle.sql
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql
godmode/agentes/module_manager_editor_common.php
godmode/modules/manage_network_components_form.php
godmode/modules/manage_network_components_form_common.php
godmode/modules/manage_network_components.php: Fix some layout
little bugs in module editor and added unit parameter
to network components for pending task #3520706
2012-05-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_users.php: fixes from the equal chat in the

View File

@ -121,6 +121,7 @@ ALTER TABLE `tagente_modulo` CHANGE COLUMN `post_process` `post_process` double(
-- Table `tnetwork_component`
-- -----------------------------------------------------
ALTER TABLE `tnetwork_component` CHANGE COLUMN `post_process` `post_process` double(18,5) default NULL;
ALTER TABLE `tnetwork_component` ADD COLUMN `unit` TEXT NOT NULL AFTER `post_process`;
-- -----------------------------------------------------
-- Table `tgraph_source` Alter table to allow negative values in weight

View File

@ -212,3 +212,9 @@ CREATE TABLE IF NOT EXISTS ttimezone (
CREATE SEQUENCE ttimezone_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER ttimezone_inc BEFORE INSERT ON ttimezone REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttimezone_s.nextval INTO :NEW.ID_TZ FROM dual; END ttimezone_inc;;
-- -----------------------------------------------------
-- Table `tnetwork_component`
-- -----------------------------------------------------
ALTER TABLE tnetwork_component ADD COLUMN unit CLOB default '';

View File

@ -201,3 +201,10 @@ CREATE TABLE "ttimezone" (
"zone" varchar(60) NOT NULL,
"timezone" varchar(60) NOT NULL
);
-- -----------------------------------------------------
-- Table `tnetwork_component`
-- -----------------------------------------------------
ALTER TABLE "tnetwork_component" ADD COLUMN "unit" text default '';

View File

@ -258,10 +258,12 @@ if ($__code_from == 'policies'){
}
$table_advanced->data[4][1] = html_print_select_from_sql ('SELECT id, name FROM tserver_export ORDER BY name',
'id_export', $id_export, '', $none_text, '0', true, false, false, $disabled_export).ui_print_help_tip (__('In case you use an Export server you can link this module and export data to one these.'), true);
$table_advanced->colspan[4][1] = 3;
$table_advanced->colspan[4][1] = 4;
$table_advanced->data[5][0] = __('Unit');
$table_advanced->data[5][1] = html_print_input_text ('unit', $unit,
'', 20, 65, true);
$table_advanced->colspan[5][1] = 4;
/* Tags */
// This var comes from module_manager_editor.php or policy_modules.php
global $__code_from;

View File

@ -58,6 +58,7 @@ $str_critical = (string) get_parameter ('str_critical');
$ff_event = (int) get_parameter ('ff_event');
$history_data = (bool) get_parameter ('history_data');
$post_process = (float) get_parameter('post_process');
$unit = (string) get_parameter('unit');
$id = (int) get_parameter ('id');
$snmp_version = (string) get_parameter('snmp_version');
@ -138,7 +139,8 @@ if ($create_component) {
'custom_string_1' => $custom_string_1,
'custom_string_2' => $custom_string_2,
'custom_string_3' => $custom_string_3,
'post_process' => $post_process));
'post_process' => $post_process,
'unit' => $unit));
}
else {
$id = '';
@ -204,7 +206,8 @@ if ($update_component) {
'custom_string_1' => $custom_string_1,
'custom_string_2' => $custom_string_2,
'custom_string_3' => $custom_string_3,
'post_process' => $post_process));
'post_process' => $post_process,
'unit' => $unit));
}
else {
$result = '';

View File

@ -57,6 +57,7 @@ if (isset ($id)) {
$ff_event = $component["min_ff_event"];
$history_data = $component["history_data"];
$post_process = $component["post_process"];
$unit = $component["unit"];
if ($type >= 15 && $type <= 18) {
@ -96,6 +97,7 @@ if (isset ($id)) {
$ff_event = 0;
$history_data = true;
$post_process = 0;
$unit = '';
$snmp_version = 1;
$snmp3_auth_user = '';

View File

@ -99,4 +99,7 @@ $table->data[5][0] = __('Min. Value');
$table->data[5][1] = html_print_input_text ('min', $min, '', 5, 15, true);
$table->data[5][2] = __('Max. Value');
$table->data[5][3] = html_print_input_text ('max', $max, '', 5, 15, true);
$table->data[6][0] = __('Unit');
$table->data[6][1] = html_print_input_text ('unit', $unit, '', 12, 25, true);
$table->data[6][2] = $table->data[6][3] = '';
?>

View File

@ -154,6 +154,7 @@ function configure_modules_form () {
$("#text-max_critical").attr ("value", (data["max_critical"] == 0) ? 0 : data["max_critical"]);
$("#text-ff_threshold").attr ("value", (data["min_ff_event"] == 0) ? 0 : data["min_ff_event"]);
$("#text-post_process").attr("value", (data["post_process"] == 0) ? 0 : data["post_process"])
$("#text-unit").attr("value", (data["unit"] == '') ? '' : data["unit"])
$("#component_loading").hide ();
$("#id_module_type").change ();

View File

@ -645,7 +645,8 @@ CREATE TABLE tnetwork_component (
custom_string_3 CLOB default '',
custom_integer_1 INTEGER default 0,
custom_integer_2 INTEGER default 0,
post_process BINARY_DOUBLE default 0
post_process BINARY_DOUBLE default 0.
unit CLOB default ''
);
CREATE SEQUENCE tnetwork_component_s INCREMENT BY 1 START WITH 1;

View File

@ -512,7 +512,8 @@ CREATE TABLE "tnetwork_component" (
"custom_string_3" text default '',
"custom_integer_1" INTEGER default 0,
"custom_integer_2" INTEGER default 0,
"post_process" DOUBLE PRECISION default 0
"post_process" DOUBLE PRECISION default 0,
"unit" text default ''
);
CREATE TABLE "tnetwork_component_group" (

View File

@ -567,6 +567,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_component` (
`custom_integer_1` int(10) default 0,
`custom_integer_2` int(10) default 0,
`post_process` double(18,5) default 0,
`unit` text,
PRIMARY KEY (`id_nc`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;