2012-11-13 Miguel de Dios <miguel.dedios@artica.es>

* include/db/mysql.php, include/functions_reporting.php,
	include/ajax/agent.php: cleaned source code style.
	
	* extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
	extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
	extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql, pandoradb.sql,
	pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the fields
	'id_agent', 'server_name' and 'show_modulegroup' in the table
	'tnetwork_map'.
	
	* include/functions_ui.php: fixed the function
	"ui_print_agent_autocomplete_input".
	
	* include/functions_networkmap.php: added function
	"networkmap_create_module_group_node".




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7145 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-11-13 16:06:21 +00:00
parent b31124e3be
commit 05ac3763aa
12 changed files with 174 additions and 76 deletions

View File

@ -1,3 +1,21 @@
2012-11-13 Miguel de Dios <miguel.dedios@artica.es>
* include/db/mysql.php, include/functions_reporting.php,
include/ajax/agent.php: cleaned source code style.
* extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.mysql.sql,
extras/pandoradb_migrate_4.0.x_to_5.0.oracle.sql, pandoradb.sql,
pandoradb.postgreSQL.sql, pandoradb.oracle.sql: added the fields
'id_agent', 'server_name' and 'show_modulegroup' in the table
'tnetwork_map'.
* include/functions_ui.php: fixed the function
"ui_print_agent_autocomplete_input".
* include/functions_networkmap.php: added function
"networkmap_create_module_group_node".
2012-11-12 Miguel de Dios <miguel.dedios@artica.es> 2012-11-12 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_reporting.php: cleaned source code style. * include/functions_reporting.php: cleaned source code style.

View File

@ -324,6 +324,9 @@ ALTER TABLE tnetwork_map ADD `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL
ALTER TABLE tnetwork_map ADD `pandoras_children` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE tnetwork_map ADD `pandoras_children` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE tnetwork_map ADD `show_groups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE tnetwork_map ADD `show_groups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE tnetwork_map ADD `show_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE tnetwork_map ADD `show_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE tnetwork_map ADD `id_agent` INT NOT NULL DEFAULT 0;
ALTER TABLE tnetwork_map ADD `server_name` VARCHAR(100) NOT NULL;
ALTER TABLE tnetwork_map ADD `show_modulegroup` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
-- ---------------------------------------------------------------------- -- ----------------------------------------------------------------------
-- Table `tagente_estado` -- Table `tagente_estado`

View File

@ -355,6 +355,9 @@ ALTER TABLE tnetwork_map ADD (dont_show_subgroups NUMBER(10, 0) default 0 NOT NU
ALTER TABLE tnetwork_map ADD (pandoras_children NUMBER(10, 0) default 0 NOT NULL); ALTER TABLE tnetwork_map ADD (pandoras_children NUMBER(10, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_map ADD (show_modules NUMBER(10, 0) default 0 NOT NULL); ALTER TABLE tnetwork_map ADD (show_modules NUMBER(10, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_map ADD (show_groups NUMBER(10, 0) default 0 NOT NULL); ALTER TABLE tnetwork_map ADD (show_groups NUMBER(10, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_map ADD (id_agent NUMBER(10, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_map ADD (server_name VARCHAR(100) NOT NULL);
ALTER TABLE tnetwork_map ADD (show_modulegroup NUMBER(10, 0) default 0 NOT NULL);
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Table tagente_estado -- Table tagente_estado

View File

@ -346,6 +346,9 @@ ALTER TABLE "tnetwork_map" ADD COLUMN "dont_show_subgroups" INTEGER NOT NULL DEF
ALTER TABLE "tnetwork_map" ADD COLUMN "pandoras_children" INTEGER NOT NULL DEFAULT 0; ALTER TABLE "tnetwork_map" ADD COLUMN "pandoras_children" INTEGER NOT NULL DEFAULT 0;
ALTER TABLE "tnetwork_map" ADD COLUMN "show_modules" INTEGER NOT NULL DEFAULT 0; ALTER TABLE "tnetwork_map" ADD COLUMN "show_modules" INTEGER NOT NULL DEFAULT 0;
ALTER TABLE "tnetwork_map" ADD COLUMN "show_groups" INTEGER NOT NULL DEFAULT 0; ALTER TABLE "tnetwork_map" ADD COLUMN "show_groups" INTEGER NOT NULL DEFAULT 0;
ALTER TABLE "tnetwork_map" ADD COLUMN "id_agent" INTEGER NOT NULL default 0;
ALTER TABLE "tnetwork_map" ADD COLUMN "server_name" VARCHAR(100) NOT NULL;
ALTER TABLE "tnetwork_map" ADD COLUMN "show_modulegroup" INTEGER NOT NULL default 0;
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Table "tagente_estado" -- Table "tagente_estado"

View File

@ -188,7 +188,9 @@ if ($search_agents_2 && (!defined('METACONSOLE'))) {
return; return;
} }
elseif ($search_agents_2 && ($config['metaconsole'] == 1) && defined('METACONSOLE')) { elseif ($search_agents_2 && ($config['metaconsole'] == 1) && defined('METACONSOLE')) {
$servers = db_get_all_rows_sql ("SELECT * FROM tmetaconsole_setup");
$servers = db_get_all_rows_sql ("SELECT *
FROM tmetaconsole_setup");
if (!isset($servers)) { if (!isset($servers)) {
return; return;
} }

View File

@ -101,16 +101,17 @@ function mysql_db_get_all_rows_sql ($sql, $search_history_db = false, $cache = t
function mysql_db_get_value ($field, $table, $field_search = 1, $condition = 1, $search_history_db = false) { function mysql_db_get_value ($field, $table, $field_search = 1, $condition = 1, $search_history_db = false) {
if (is_int ($condition)) { if (is_int ($condition)) {
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1", $sql = sprintf ("SELECT %s FROM %s WHERE %s = %d LIMIT 1",
$field, $table, $field_search, $condition); $field, $table, $field_search, $condition);
} }
else if (is_float ($condition) || is_double ($condition)) { else if (is_float ($condition) || is_double ($condition)) {
$sql = sprintf ("SELECT %s FROM %s WHERE %s = %f LIMIT 1", $sql = sprintf ("SELECT %s FROM %s WHERE %s = %f LIMIT 1",
$field, $table, $field_search, $condition); $field, $table, $field_search, $condition);
} }
else { else {
$sql = sprintf ("SELECT %s FROM %s WHERE %s = '%s' LIMIT 1", $sql = sprintf ("SELECT %s FROM %s WHERE %s = '%s' LIMIT 1",
$field, $table, $field_search, $condition); $field, $table, $field_search, $condition);
} }
$result = db_get_all_rows_sql ($sql, $search_history_db); $result = db_get_all_rows_sql ($sql, $search_history_db);
if ($result === false) if ($result === false)

View File

@ -567,6 +567,63 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
return $node; return $node;
} }
function networkmap_create_module_group_node ($module_group, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) {
// Set node status
switch ($module_group['status']) {
case 0:
$status_color = '#8DFF1D'; // Normal monitor
break;
case 1:
$status_color = '#FF1D1D'; // Critical monitor
break;
case 2:
$status_color = '#FFE308'; // Warning monitor
break;
case 4:
$status_color = '#FFA300'; // Alert fired
break;
default:
$status_color = '#BBBBBB'; // Unknown monitor
break;
}
if ($simple == 0) {
if (defined("METACONSOLE")) {
$url = '';
$url_tooltip = '';
}
else {
$url = '';
$url_tooltip = '';
}
$node = $module_group['id_node'].' [ color="' . $status_color .
'", fontsize='.$font_size.', style="filled", ' .
'fixedsize=true, width=0.30, height=0.30, ' .
'label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' .
io_safe_output($module_group['name']) . '</TD></TR></TABLE>>,
shape="square", URL="' . $url . '",
tooltip="' . $url_tooltip . '"];';
}
else {
if (defined("METACONSOLE")) {
$url = '';
$url_tooltip = '';
}
else {
$url = '';
$url_tooltip = '';
}
$node = $module_group['id_node'] . ' [ color="'.$status_color .
'", fontsize='.$font_size.', shape="square", URL="' . $url . '", ' .
'style="filled", fixedsize=true, width=0.20, ' .
'height=0.20, label="", tooltip="' . $url_tooltip . '"];';
}
return $node;
}
// Returns a module node definition // Returns a module node definition
function networkmap_create_module_node ($module, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) { function networkmap_create_module_node ($module, $simple = 0, $font_size = 10, $metaconsole = false, $id_server = null) {
@ -574,7 +631,7 @@ function networkmap_create_module_node ($module, $simple = 0, $font_size = 10, $
false, $metaconsole, $id_server); false, $metaconsole, $id_server);
// Set node status // Set node status
switch($status) { switch ($status) {
case 0: case 0:
$status_color = '#8DFF1D'; // Normal monitor $status_color = '#8DFF1D'; // Normal monitor
break; break;

View File

@ -2750,6 +2750,11 @@ function ui_print_agent_autocomplete_input($parameters) {
$javascript_tags = $parameters['javascript_tags']; $javascript_tags = $parameters['javascript_tags'];
} }
$disabled_javascript_on_blur_function = false;//Default value
if (isset($parameters['disabled_javascript_on_blur_function'])) {
$disabled_javascript_on_blur_function = $parameters['disabled_javascript_on_blur_function'];
}
$javascript_on_blur_function_name = 'function_on_blur_' . $input_name;//Default value $javascript_on_blur_function_name = 'function_on_blur_' . $input_name;//Default value
if (isset($parameters['javascript_on_blur_function_name'])) { if (isset($parameters['javascript_on_blur_function_name'])) {
$javascript_on_blur_function_name = $parameters['javascript_on_blur_function_name']; $javascript_on_blur_function_name = $parameters['javascript_on_blur_function_name'];
@ -2846,10 +2851,13 @@ function ui_print_agent_autocomplete_input($parameters) {
$html = ''; $html = '';
$attrs = array( $attrs = array();
'style' => $attrs['style'] =
'background: url(' . $icon_image . ') no-repeat right;', 'background: url(' . $icon_image . ') no-repeat right;';
'onblur' => $javascript_on_blur_function_name . '()');
if (!$disabled_javascript_on_blur_function) {
$attrs['onblur'] = $javascript_on_blur_function_name . '()';
}
$html = html_print_input_text_extended($input_name, $value, $html = html_print_input_text_extended($input_name, $value,
$input_id, $helptip_text, $size, $maxlength, $disabled, '', $attrs, true); $input_id, $helptip_text, $size, $maxlength, $disabled, '', $attrs, true);

View File

@ -1562,7 +1562,10 @@ CREATE TABLE tnetwork_map (
dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL, dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL,
pandoras_children NUMBER(10, 0) default 0 NOT NULL, pandoras_children NUMBER(10, 0) default 0 NOT NULL,
show_groups NUMBER(10, 0) default 0 NOT NULL, show_groups NUMBER(10, 0) default 0 NOT NULL,
show_modules NUMBER(10, 0) default 0 NOT NULL show_modules NUMBER(10, 0) default 0 NOT NULL,
id_agent NUMBER(10, 0) default 0 NOT NULL,
server_name VARCHAR(100) NOT NULL,
show_modulegroup NUMBER(10, 0) default 0 NOT NULL
); );
CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1;
@ -1582,9 +1585,9 @@ CREATE SEQUENCE tsnmp_filter_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER tsnmp_filter_inc BEFORE INSERT ON tsnmp_filter REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tsnmp_filter_s.nextval INTO :NEW.ID_SNMP_FILTER FROM dual; END tsnmp_filter_inc;; CREATE OR REPLACE TRIGGER tsnmp_filter_inc BEFORE INSERT ON tsnmp_filter REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tsnmp_filter_s.nextval INTO :NEW.ID_SNMP_FILTER FROM dual; END tsnmp_filter_inc;;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "tagent_custom_fields" -- Table "tagent_custom_fields"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE tagent_custom_fields ( CREATE TABLE tagent_custom_fields (
id_field NUMBER(10, 0) NOT NULL PRIMARY KEY, id_field NUMBER(10, 0) NOT NULL PRIMARY KEY,
name VARCHAR2(45) default '', name VARCHAR2(45) default '',
@ -1595,9 +1598,9 @@ CREATE SEQUENCE tagent_custom_fields_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER tagent_custom_fields_inc BEFORE INSERT ON tagent_custom_fields REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tagent_custom_fields_s.nextval INTO :NEW.ID_FIELD FROM dual; END tagent_custom_fields_inc;; CREATE OR REPLACE TRIGGER tagent_custom_fields_inc BEFORE INSERT ON tagent_custom_fields REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tagent_custom_fields_s.nextval INTO :NEW.ID_FIELD FROM dual; END tagent_custom_fields_inc;;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "tagent_custom_data" -- Table "tagent_custom_data"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE tagent_custom_data ( CREATE TABLE tagent_custom_data (
id_field NUMBER(10, 0) NOT NULL REFERENCES tagent_custom_fields(id_field) ON DELETE CASCADE, id_field NUMBER(10, 0) NOT NULL REFERENCES tagent_custom_fields(id_field) ON DELETE CASCADE,
id_agent NUMBER(10, 0) NOT NULL REFERENCES tagente(id_agente) ON DELETE CASCADE, id_agent NUMBER(10, 0) NOT NULL REFERENCES tagente(id_agente) ON DELETE CASCADE,
@ -1615,24 +1618,23 @@ CREATE OR REPLACE TRIGGER tagent_custom_data_update1 AFTER UPDATE OF ID_AGENTE O
CREATE OR REPLACE PROCEDURE insert_id (table_name IN VARCHAR2, sql_insert IN VARCHAR2, id OUT NUMBER) IS BEGIN EXECUTE IMMEDIATE sql_insert; EXECUTE IMMEDIATE 'SELECT ' ||table_name||'_s.currval FROM DUAL' INTO id; EXCEPTION WHEN others THEN RAISE_APPLICATION_ERROR(-20001, 'ERROR on insert_id procedure, please check input parameters or procedure logic.'); END insert_id;; CREATE OR REPLACE PROCEDURE insert_id (table_name IN VARCHAR2, sql_insert IN VARCHAR2, id OUT NUMBER) IS BEGIN EXECUTE IMMEDIATE sql_insert; EXECUTE IMMEDIATE 'SELECT ' ||table_name||'_s.currval FROM DUAL' INTO id; EXCEPTION WHEN others THEN RAISE_APPLICATION_ERROR(-20001, 'ERROR on insert_id procedure, please check input parameters or procedure logic.'); END insert_id;;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "ttag" -- Table "ttag"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE ttag ( CREATE TABLE ttag (
id_tag NUMBER(10, 0) NOT NULL PRIMARY KEY, id_tag NUMBER(10, 0) NOT NULL PRIMARY KEY,
name VARCHAR2(100) default '' NOT NULL, name VARCHAR2(100) default '' NOT NULL,
description CLOB default '' NOT NULL, description CLOB default '' NOT NULL,
url CLOB default '' NOT NULL url CLOB default '' NOT NULL
); );
CREATE SEQUENCE ttag_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE ttag_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER ttag_inc BEFORE INSERT ON ttag REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttag_s.nextval INTO :NEW.ID_TAG FROM dual; END ttag_inc;; CREATE OR REPLACE TRIGGER ttag_inc BEFORE INSERT ON ttag REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttag_s.nextval INTO :NEW.ID_TAG FROM dual; END ttag_inc;;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "ttag_module" -- Table "ttag_module"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE ttag_module ( CREATE TABLE ttag_module (
id_tag NUMBER(10, 0) NOT NULL, id_tag NUMBER(10, 0) NOT NULL,
@ -1642,9 +1644,9 @@ CREATE TABLE ttag_module (
CREATE INDEX ttag_module_id_ag_modulo_idx ON ttag_module(id_agente_modulo); CREATE INDEX ttag_module_id_ag_modulo_idx ON ttag_module(id_agente_modulo);
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "ttag_policy_module" -- Table "ttag_policy_module"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE ttag_policy_module ( CREATE TABLE ttag_policy_module (
id_tag NUMBER(10, 0) NOT NULL, id_tag NUMBER(10, 0) NOT NULL,
@ -1659,17 +1661,17 @@ CREATE INDEX ttag_poli_mod_id_pol_mo_idx ON ttag_policy_module(id_policy_module)
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE tnetflow_filter ( CREATE TABLE tnetflow_filter (
id_sg NUMBER(10, 0) NOT NULL PRIMARY KEY, id_sg NUMBER(10, 0) NOT NULL PRIMARY KEY,
id_name VARCHAR2(600) NOT NULL, id_name VARCHAR2(600) NOT NULL,
id_group NUMBER(10, 0), id_group NUMBER(10, 0),
ip_dst CLOB NOT NULL, ip_dst CLOB NOT NULL,
ip_src CLOB NOT NULL, ip_src CLOB NOT NULL,
dst_port CLOB NOT NULL, dst_port CLOB NOT NULL,
src_port CLOB NOT NULL, src_port CLOB NOT NULL,
advanced_filter CLOB NOT NULL, advanced_filter CLOB NOT NULL,
filter_args CLOB NOT NULL, filter_args CLOB NOT NULL,
aggregate VARCHAR2(60), aggregate VARCHAR2(60),
output VARCHAR2(60) output VARCHAR2(60)
); );
CREATE SEQUENCE tnetflow_filter_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE tnetflow_filter_s INCREMENT BY 1 START WITH 1;
@ -1680,11 +1682,11 @@ CREATE OR REPLACE TRIGGER tnetflow_filter_inc BEFORE INSERT ON tnetflow_filter R
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE tnetflow_report ( CREATE TABLE tnetflow_report (
id_report NUMBER(10, 0) NOT NULL PRIMARY KEY, id_report NUMBER(10, 0) NOT NULL PRIMARY KEY,
id_name VARCHAR2(100) NOT NULL, id_name VARCHAR2(100) NOT NULL,
description CLOB default '', description CLOB default '',
id_group NUMBER(10, 0) id_group NUMBER(10, 0)
server_name CLOB default '', server_name CLOB default '',
); );
CREATE SEQUENCE tnetflow_report_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE tnetflow_report_s INCREMENT BY 1 START WITH 1;

View File

@ -49,9 +49,9 @@ CREATE TABLE "taddress_agent" (
"id_agent" BIGINT NOT NULL default 0 "id_agent" BIGINT NOT NULL default 0
); );
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tagente` -- Table `tagente`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "tagente" ( CREATE TABLE "tagente" (
"id_agente" SERIAL NOT NULL PRIMARY KEY, "id_agente" SERIAL NOT NULL PRIMARY KEY,
"nombre" varchar(600) NOT NULL default '', "nombre" varchar(600) NOT NULL default '',
@ -84,9 +84,9 @@ CREATE INDEX "tagente_direccion_idx" ON "tagente"("direccion");
CREATE INDEX "tagente_disabled_idx" ON "tagente"("disabled"); CREATE INDEX "tagente_disabled_idx" ON "tagente"("disabled");
CREATE INDEX "tagente_id_grupo_idx" ON "tagente"("id_grupo"); CREATE INDEX "tagente_id_grupo_idx" ON "tagente"("id_grupo");
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tagente_datos` -- Table `tagente_datos`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "tagente_datos" ( CREATE TABLE "tagente_datos" (
"id_agente_modulo" INTEGER NOT NULL default 0, "id_agente_modulo" INTEGER NOT NULL default 0,
"datos" DOUBLE PRECISION default NULL, "datos" DOUBLE PRECISION default NULL,
@ -95,9 +95,9 @@ CREATE TABLE "tagente_datos" (
CREATE INDEX "tagente_datos_id_agente_modulo_idx" ON "tagente_datos"("id_agente_modulo"); CREATE INDEX "tagente_datos_id_agente_modulo_idx" ON "tagente_datos"("id_agente_modulo");
CREATE INDEX "tagente_datos_utimestamp_idx" ON "tagente_datos"("utimestamp"); CREATE INDEX "tagente_datos_utimestamp_idx" ON "tagente_datos"("utimestamp");
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tagente_datos_inc` -- Table `tagente_datos_inc`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "tagente_datos_inc" ( CREATE TABLE "tagente_datos_inc" (
"id_adi" SERIAL NOT NULL PRIMARY KEY, "id_adi" SERIAL NOT NULL PRIMARY KEY,
"id_agente_modulo" INTEGER NOT NULL default 0, "id_agente_modulo" INTEGER NOT NULL default 0,
@ -106,9 +106,9 @@ CREATE TABLE "tagente_datos_inc" (
); );
CREATE INDEX "tagente_datos_inc_id_agente_modulo_idx" ON "tagente_datos_inc"("id_agente_modulo"); CREATE INDEX "tagente_datos_inc_id_agente_modulo_idx" ON "tagente_datos_inc"("id_agente_modulo");
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tagente_datos_string` -- Table `tagente_datos_string`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "tagente_datos_string" ( CREATE TABLE "tagente_datos_string" (
"id_agente_modulo" INTEGER NOT NULL default 0, "id_agente_modulo" INTEGER NOT NULL default 0,
"datos" TEXT NOT NULL, "datos" TEXT NOT NULL,
@ -1361,7 +1361,10 @@ CREATE TABLE "tnetwork_map" (
"dont_show_subgroups" INTEGER NOT NULL default 0, "dont_show_subgroups" INTEGER NOT NULL default 0,
"pandoras_children" INTEGER NOT NULL default 0, "pandoras_children" INTEGER NOT NULL default 0,
"show_modules" INTEGER NOT NULL default 0, "show_modules" INTEGER NOT NULL default 0,
"show_groups" INTEGER NOT NULL default 0 "show_groups" INTEGER NOT NULL default 0,
"id_agent" INTEGER NOT NULL default 0,
"server_name" VARCHAR(100) NOT NULL,
"show_modulegroup" INTEGER NOT NULL default 0
); );
------------------------------------------------------------------------ ------------------------------------------------------------------------
@ -1382,30 +1385,30 @@ CREATE TABLE "tagent_custom_fields" (
"display_on_front" SMALLINT NOT NULL default 0 "display_on_front" SMALLINT NOT NULL default 0
); );
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "tagent_custom_data" -- Table "tagent_custom_data"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "tagent_custom_data" ( CREATE TABLE "tagent_custom_data" (
"id_field" INTEGER NOT NULL REFERENCES tagent_custom_fields("id_field") ON UPDATE CASCADE ON DELETE CASCADE, "id_field" INTEGER NOT NULL REFERENCES tagent_custom_fields("id_field") ON UPDATE CASCADE ON DELETE CASCADE,
"id_agent" INTEGER NOT NULL REFERENCES tagente("id_agente") ON UPDATE CASCADE ON DELETE CASCADE, "id_agent" INTEGER NOT NULL REFERENCES tagente("id_agente") ON UPDATE CASCADE ON DELETE CASCADE,
"description" text default '', "description" text default '',
PRIMARY KEY ("id_field", "id_agent") PRIMARY KEY ("id_field", "id_agent")
); );
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "ttag" -- Table "ttag"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "ttag" ( CREATE TABLE "ttag" (
"id_tag" SERIAL NOT NULL PRIMARY KEY, "id_tag" SERIAL NOT NULL PRIMARY KEY,
"name" VARCHAR(100) NOT NULL default '', "name" VARCHAR(100) NOT NULL default '',
"description" text NOT NULL default '', "description" text NOT NULL default '',
"url" text NOT NULL default '' "url" text NOT NULL default ''
); );
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "ttag_module" -- Table "ttag_module"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE "ttag_module" ( CREATE TABLE "ttag_module" (
"id_tag" INTEGER NOT NULL, "id_tag" INTEGER NOT NULL,

View File

@ -1478,6 +1478,9 @@ CREATE TABLE IF NOT EXISTS `tnetwork_map` (
`pandoras_children` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `pandoras_children` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`show_groups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `show_groups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`show_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `show_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`id_agent` INT NOT NULL DEFAULT 0,
`server_name` VARCHAR(100) NOT NULL,
`show_modulegroup` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id_networkmap`) PRIMARY KEY (`id_networkmap`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -1529,7 +1532,6 @@ CREATE TABLE IF NOT EXISTS `ttag` (
-- ----------------------------------------------------- -- -----------------------------------------------------
-- Table `ttag_module` -- Table `ttag_module`
-- ----------------------------------------------------- -- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttag_module` ( CREATE TABLE IF NOT EXISTS `ttag_module` (
`id_tag` int(10) NOT NULL, `id_tag` int(10) NOT NULL,
`id_agente_modulo` int(10) NOT NULL DEFAULT 0, `id_agente_modulo` int(10) NOT NULL DEFAULT 0,
@ -1537,10 +1539,9 @@ CREATE TABLE IF NOT EXISTS `ttag_module` (
KEY `idx_id_agente_modulo` (`id_agente_modulo`) KEY `idx_id_agente_modulo` (`id_agente_modulo`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `ttag_policy_module` -- Table `ttag_policy_module`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttag_policy_module` ( CREATE TABLE IF NOT EXISTS `ttag_policy_module` (
`id_tag` int(10) NOT NULL, `id_tag` int(10) NOT NULL,
`id_policy_module` int(10) NOT NULL DEFAULT 0, `id_policy_module` int(10) NOT NULL DEFAULT 0,
@ -1548,10 +1549,9 @@ CREATE TABLE IF NOT EXISTS `ttag_policy_module` (
KEY `idx_id_policy_module` (`id_policy_module`) KEY `idx_id_policy_module` (`id_policy_module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tnetflow_filter` -- Table `tnetflow_filter`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetflow_filter` ( CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
`id_sg` int(10) unsigned NOT NULL auto_increment, `id_sg` int(10) unsigned NOT NULL auto_increment,
`id_name` varchar(600) NOT NULL default '0', `id_name` varchar(600) NOT NULL default '0',
@ -1567,10 +1567,9 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
PRIMARY KEY (`id_sg`) PRIMARY KEY (`id_sg`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tnetflow_report` -- Table `tnetflow_report`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetflow_report` ( CREATE TABLE IF NOT EXISTS `tnetflow_report` (
`id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `id_report` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_name` varchar(150) NOT NULL default '', `id_name` varchar(150) NOT NULL default '',
@ -1583,7 +1582,6 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report` (
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tnetflow_report_content` -- Table `tnetflow_report_content`
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tnetflow_report_content` ( CREATE TABLE IF NOT EXISTS `tnetflow_report_content` (
`id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, `id_rc` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`id_report` INTEGER UNSIGNED NOT NULL default 0, `id_report` INTEGER UNSIGNED NOT NULL default 0,