2014-05-21 Junichi Satoh <junichi@rworks.jp>
* godmode/agentes/configurar_agente.php, godmode/agentes/module_manager_editor.php, godmode/agentes/module_manager_editor_common.php, pandoradb.sql, pandoradb.oracle.sql, pandoradb.postgreSQL.sql, extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql, extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql, extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql: Improved 'FF threshold' to be able to define each state changing. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9973 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bb7a394f39
commit
c3bb22b6f3
|
@ -1,3 +1,14 @@
|
|||
2014-05-21 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* godmode/agentes/configurar_agente.php,
|
||||
godmode/agentes/module_manager_editor.php,
|
||||
godmode/agentes/module_manager_editor_common.php,
|
||||
pandoradb.sql, pandoradb.oracle.sql, pandoradb.postgreSQL.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.mysql.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.oracle.sql,
|
||||
extras/pandoradb_migrate_5.0.x_to_5.1.postgreSQL.sql: Improved
|
||||
'FF threshold' to be able to define each state changing.
|
||||
|
||||
2014-05-20 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* godmode/gis_maps/configure_gis_map.php: Fixed
|
||||
|
|
|
@ -49,6 +49,11 @@ INSERT INTO `tconfig_os` (`name`, `description`, `icon_name`) VALUES ('Satellite
|
|||
-- Table `tagente_modulo`
|
||||
-- ---------------------------------------------------------------------
|
||||
ALTER TABLE `pandora`.`tagente_modulo` MODIFY COLUMN `post_process` DOUBLE DEFAULT NULL;
|
||||
/* 2014/05/21 */
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `min_ff_event_normal` int(4) unsigned default '0';
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `min_ff_event_warning` int(4) unsigned default '0';
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `min_ff_event_critical` int(4) unsigned default '0';
|
||||
ALTER TABLE `tagente_modulo` ADD COLUMN `each_ff` tinyint(1) unsigned default '0';
|
||||
|
||||
/* 2014/03/18 */
|
||||
-- ---------------------------------------------------------------------
|
||||
|
|
|
@ -38,6 +38,15 @@ INSERT INTO tconfig_os VALUES (17, 'Router', 'Generic router', 'so_router.png');
|
|||
INSERT INTO tconfig_os VALUES (18, 'Switch', 'Generic switch', 'so_switch.png');
|
||||
INSERT INTO tconfig_os VALUES (19, 'Satellite', 'Satellite agent', 'satellite.png');
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tagente_modulo`
|
||||
-- ---------------------------------------------------------------------
|
||||
/* 2014/05/21 */
|
||||
ALTER TABLE tagente_modulo ADD COLUMN min_ff_event_normal INTEGER default 0;
|
||||
ALTER TABLE tagente_modulo ADD COLUMN min_ff_event_warning INTEGER default 0;
|
||||
ALTER TABLE tagente_modulo ADD COLUMN min_ff_event_critical INTEGER default 0;
|
||||
ALTER TABLE tagente_modulo ADD COLUMN each_ff NUMBER(1, 0) default 0;
|
||||
|
||||
/* 2014/03/18 */
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tmodule_relationship`
|
||||
|
|
|
@ -39,6 +39,15 @@ INSERT INTO "tconfig_os" VALUES (17, 'Router', 'Generic router', 'so_router.png'
|
|||
INSERT INTO "tconfig_os" VALUES (18, 'Switch', 'Generic switch', 'so_switch.png');
|
||||
INSERT INTO "tconfig_os" VALUES (19, 'Satellite', 'Satellite agent', 'satellite.png');
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
-- Table `tagente_modulo`
|
||||
-- ---------------------------------------------------------------------
|
||||
/* 2014/05/21 */
|
||||
ALTER TABLE "tagente_modulo" ADD COLUMN "min_ff_event_normal" INTEGER default 0;
|
||||
ALTER TABLE "tagente_modulo" ADD COLUMN "min_ff_event_warning" INTEGER default 0;
|
||||
ALTER TABLE "tagente_modulo" ADD COLUMN "min_ff_event_critical" INTEGER default 0;
|
||||
ALTER TABLE "tagente_modulo" ADD COLUMN "each_ff" SMALLINT default 0;
|
||||
|
||||
/* 2014/03/18 */
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tmodule_relationship`
|
||||
|
|
|
@ -915,6 +915,10 @@ if ($update_module || $create_module) {
|
|||
$max_critical = (float) get_parameter ('max_critical');
|
||||
$str_critical = (string) get_parameter ('str_critical');
|
||||
$ff_event = (int) get_parameter ('ff_event');
|
||||
$ff_event_normal = (int) get_parameter ('ff_event_normal');
|
||||
$ff_event_warning = (int) get_parameter ('ff_event_warning');
|
||||
$ff_event_critical = (int) get_parameter ('ff_event_critical');
|
||||
$each_ff = (int) get_parameter ('each_ff');
|
||||
$unit = (string) get_parameter('unit');
|
||||
$id_tag = (array) get_parameter('id_tag_selected');
|
||||
$serialize_ops = (string) get_parameter('serialize_ops');
|
||||
|
@ -1000,6 +1004,10 @@ if ($update_module) {
|
|||
'custom_integer_1' => $custom_integer_1,
|
||||
'custom_integer_2' => $custom_integer_2,
|
||||
'min_ff_event' => $ff_event,
|
||||
'min_ff_event_normal' => $ff_event_normal,
|
||||
'min_ff_event_warning' => $ff_event_warning,
|
||||
'min_ff_event_critical' => $ff_event_critical,
|
||||
'each_ff' => $each_ff,
|
||||
'unit' => $unit,
|
||||
'macros' => $macros,
|
||||
'quiet' => $quiet_module,
|
||||
|
@ -1133,6 +1141,10 @@ if ($create_module) {
|
|||
'custom_integer_1' => $custom_integer_1,
|
||||
'custom_integer_2' => $custom_integer_2,
|
||||
'min_ff_event' => $ff_event,
|
||||
'min_ff_event_normal' => $ff_event_normal,
|
||||
'min_ff_event_warning' => $ff_event_warning,
|
||||
'min_ff_event_critical' => $ff_event_critical,
|
||||
'each_ff' => $each_ff,
|
||||
'unit' => $unit,
|
||||
'macros' => $macros,
|
||||
'quiet' => $quiet_module,
|
||||
|
|
|
@ -203,6 +203,10 @@ if ($id_agent_module) {
|
|||
$max_critical = $module['max_critical'];
|
||||
$str_critical = $module['str_critical'];
|
||||
$ff_event = $module['min_ff_event'];
|
||||
$ff_event_normal = $module['min_ff_event_normal'];
|
||||
$ff_event_warning = $module['min_ff_event_warning'];
|
||||
$ff_event_critical = $module['min_ff_event_critical'];
|
||||
$each_ff = $module['each_ff'];
|
||||
// Select tag info.
|
||||
$id_tag = tags_get_module_tags ($id_agent_module);
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ $table_simple->style[0] = 'font-weight: bold; vertical-align: top; width: 26%';
|
|||
$table_simple->style[1] = 'width: 40%';
|
||||
$table_simple->style[2] = 'font-weight: bold; vertical-align: top';
|
||||
|
||||
$table_simple->colspan[4][1] = 3;
|
||||
#$table_simple->colspan[4][1] = 3;
|
||||
$table_simple->colspan[5][1] = 3;
|
||||
$table_simple->colspan[6][1] = 3;
|
||||
|
||||
|
@ -266,16 +266,26 @@ $table_simple->data[2][3] .= html_print_checkbox ("critical_inverse", 1, $critic
|
|||
|
||||
/* FF stands for Flip-flop */
|
||||
$table_simple->data[3][0] = __('FF threshold').' ' . ui_print_help_icon ('ff_threshold', true);
|
||||
$table_simple->data[3][1] = html_print_input_text ('ff_event', $ff_event,
|
||||
'', 5, 15, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[3][2] = __('Historical data');
|
||||
$table_simple->colspan[3][1] = 3;
|
||||
|
||||
$table_simple->data[3][1] = html_print_radio_button ('each_ff', 0, '', $each_ff, true) . ' ' . __('All state changing') . ' : ';
|
||||
$table_simple->data[3][1] .= html_print_input_text ('ff_event', $ff_event, '', 5
|
||||
, 15, true, $disabledBecauseInPolicy) . '<br />';
|
||||
$table_simple->data[3][1] .= html_print_radio_button ('each_ff', 1, '', $each_ff, true) . ' ' . __('Each state changing') . ' : ';
|
||||
$table_simple->data[3][1] .= __('To normal');
|
||||
$table_simple->data[3][1] .= html_print_input_text ('ff_event_normal', $ff_event_normal, '', 5, 15, true, $disabledBecauseInPolicy) . ' ';
|
||||
$table_simple->data[3][1] .= __('To warning');
|
||||
$table_simple->data[3][1] .= html_print_input_text ('ff_event_warning', $ff_event_warning, '', 5, 15, true, $disabledBecauseInPolicy) . ' ';
|
||||
$table_simple->data[3][1] .= __('To critical');
|
||||
$table_simple->data[3][1] .= html_print_input_text ('ff_event_critical', $ff_event_critical, '', 5, 15, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[4][0] = __('Historical data');
|
||||
if($disabledBecauseInPolicy) {
|
||||
// If is disabled, we send a hidden in his place and print a false checkbox because HTML dont send disabled fields and could be disabled by error
|
||||
$table_simple->data[3][3] = html_print_checkbox ("history_data_fake", 1, $history_data, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[3][3] .= '<input type="hidden" name="history_data" value="'.(int)$history_data.'">';
|
||||
$table_simple->data[4][1] = html_print_checkbox ("history_data_fake", 1, $history_data, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[4][1] .= '<input type="hidden" name="history_data" value="'.(int)$history_data.'">';
|
||||
}
|
||||
else {
|
||||
$table_simple->data[3][3] = html_print_checkbox ("history_data", 1, $history_data, true, $disabledBecauseInPolicy);
|
||||
$table_simple->data[4][1] = html_print_checkbox ("history_data", 1, $history_data, true, $disabledBecauseInPolicy);
|
||||
}
|
||||
|
||||
/* Advanced form part */
|
||||
|
|
|
@ -249,6 +249,10 @@ CREATE TABLE tagente_modulo (
|
|||
id_category NUMBER(10, 0) default 0 NOT NULL,
|
||||
disabled_types_event CLOB default '',
|
||||
module_macros CLOB default '',
|
||||
min_ff_event_normal INTEGER default 0,
|
||||
min_ff_event_warning INTEGER default 0,
|
||||
min_ff_event_critical INTEGER default 0,
|
||||
each_ff NUMBER(1, 0) default 0
|
||||
|
||||
CONSTRAINT t_agente_modulo_wizard_level_cons CHECK (wizard_level IN ('basic','advanced','nowizard'))
|
||||
);
|
||||
|
|
|
@ -237,7 +237,11 @@ CREATE TABLE "tagente_modulo" (
|
|||
"warning_inverse" SMALLINT NOT NULL default 0,
|
||||
"id_category" INTEGER NOT NULL default 0,
|
||||
"disabled_types_event" TEXT default '',
|
||||
"module_macros" TEXT default ''
|
||||
"module_macros" TEXT default '',
|
||||
"min_ff_event_normal" INTEGER default 0,
|
||||
"min_ff_event_warning" INTEGER default 0,
|
||||
"min_ff_event_critical" INTEGER default 0,
|
||||
"each_ff" SMALLINT default 0
|
||||
);
|
||||
CREATE INDEX "tagente_modulo_id_agente_idx" ON "tagente_modulo"("id_agente");
|
||||
CREATE INDEX "tagente_modulo_id_tipo_modulo_idx" ON "tagente_modulo"("id_tipo_modulo");
|
||||
|
|
|
@ -234,6 +234,10 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` (
|
|||
`id_category` int(10) default 0,
|
||||
`disabled_types_event` TEXT NOT NULL,
|
||||
`module_macros` TEXT NOT NULL,
|
||||
`min_ff_event_normal` int(4) unsigned default '0',
|
||||
`min_ff_event_warning` int(4) unsigned default '0',
|
||||
`min_ff_event_critical` int(4) unsigned default '0',
|
||||
`each_ff` tinyint(1) unsigned default '0',
|
||||
PRIMARY KEY (`id_agente_modulo`),
|
||||
KEY `main_idx` (`id_agente_modulo`,`id_agente`),
|
||||
KEY `tam_agente` (`id_agente`),
|
||||
|
|
Loading…
Reference in New Issue