2012-10-09 Miguel de Dios <miguel.dedios@artica.es>

* 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 flag field
	"pandoras_children" into the table "tnetwork_map".
	
	* extras/check_other_languages.sh, include/functions_agents.php,
	operation/agentes/networkmap_list.php: cleaned source code style.
	
	* include/functions_networkmap.php: a lot of fixes for the
	metaconsole, and other changes now generate a graphviz code more
	clean and human readble (good for maintenaince).
	
	* include/ajax/networkmap.ajax.php: into the ajax call
	"get_networkmap_summary" started to adapt to call from the
	metaconsole (WIP).
	
	* include/functions_ui.php: fixes for metaconsole links to images in
	the functions "ui_print_message", "ui_print_group_icon" and
	"ui_toggle". And added the parameter $return in the function
	"ui_toggle" for to return the html code as string.
	
	* operation/agentes/ver_agente.php: into the ajax call
	"get_agent_status_tooltip" adapt to call from the metaconsole.




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7057 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2012-10-09 15:51:33 +00:00
parent e86a0e68ef
commit c6b977c0a5
14 changed files with 406 additions and 192 deletions

View File

@ -1,3 +1,30 @@
2012-10-09 Miguel de Dios <miguel.dedios@artica.es>
* 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 flag field
"pandoras_children" into the table "tnetwork_map".
* extras/check_other_languages.sh, include/functions_agents.php,
operation/agentes/networkmap_list.php: cleaned source code style.
* include/functions_networkmap.php: a lot of fixes for the
metaconsole, and other changes now generate a graphviz code more
clean and human readble (good for maintenaince).
* include/ajax/networkmap.ajax.php: into the ajax call
"get_networkmap_summary" started to adapt to call from the
metaconsole (WIP).
* include/functions_ui.php: fixes for metaconsole links to images in
the functions "ui_print_message", "ui_print_group_icon" and
"ui_toggle". And added the parameter $return in the function
"ui_toggle" for to return the html code as string.
* operation/agentes/ver_agente.php: into the ajax call
"get_agent_status_tooltip" adapt to call from the metaconsole.
2012-10-09 Hirofumi Kosaka <kosaka@rworks.jp> 2012-10-09 Hirofumi Kosaka <kosaka@rworks.jp>
* pandoradb.sql: cleaned code style, to be acceptable by * pandoradb.sql: cleaned code style, to be acceptable by

View File

@ -19,7 +19,7 @@ mkdir "/tmp/$1" >> /dev/null 2> /dev/null
for a in `ls include/help/en` for a in `ls include/help/en`
do do
ESTA=`find include/help/$1/$a 2> /dev/null | wc -l` ESTA=`find include/help/$1/$a 2> /dev/null | wc -l`
if [ $ESTA == 0 ] if [ $ESTA == 0 ]
then then
echo "Missing $a, and copying to /tmp/$1" echo "Missing $a, and copying to /tmp/$1"
cp include/help/en/$a "/tmp/$1" cp include/help/en/$a "/tmp/$1"

View File

@ -74,9 +74,9 @@ CREATE TABLE IF NOT EXISTS `talert_special_days` (
-- --------------------------------------------------------------------- -- ---------------------------------------------------------------------
ALTER TABLE `talert_templates` ADD COLUMN `special_day` tinyint(1) DEFAULT '0'; ALTER TABLE `talert_templates` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tplanned_downtime` -- Table `tplanned_downtime`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tplanned_downtime` ADD COLUMN `monday` tinyint(1) default 0; ALTER TABLE `tplanned_downtime` ADD COLUMN `monday` tinyint(1) default 0;
ALTER TABLE `tplanned_downtime` ADD COLUMN `tuesday` tinyint(1) default 0; ALTER TABLE `tplanned_downtime` ADD COLUMN `tuesday` tinyint(1) default 0;
ALTER TABLE `tplanned_downtime` ADD COLUMN `wednesday` tinyint(1) default 0; ALTER TABLE `tplanned_downtime` ADD COLUMN `wednesday` tinyint(1) default 0;
@ -92,9 +92,9 @@ ALTER TABLE `tplanned_downtime` ADD COLUMN `type_downtime` varchar(100) NOT NULL
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_execution` varchar(100) NOT NULL default 'once'; ALTER TABLE `tplanned_downtime` ADD COLUMN `type_execution` varchar(100) NOT NULL default 'once';
ALTER TABLE `tplanned_downtime` ADD COLUMN `type_periodicity` varchar(100) NOT NULL default 'weekly'; ALTER TABLE `tplanned_downtime` ADD COLUMN `type_periodicity` varchar(100) NOT NULL default 'weekly';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tplanned_downtime_agents` -- Table `tplanned_downtime_agents`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
DELETE FROM tplanned_downtime_agents DELETE FROM tplanned_downtime_agents
WHERE id_downtime NOT IN (SELECT id FROM tplanned_downtime); WHERE id_downtime NOT IN (SELECT id FROM tplanned_downtime);
ALTER TABLE tplanned_downtime_agents MODIFY `id_downtime` mediumint(8) NOT NULL; ALTER TABLE tplanned_downtime_agents MODIFY `id_downtime` mediumint(8) NOT NULL;
@ -103,9 +103,9 @@ ALTER TABLE tplanned_downtime_agents
ON DELETE CASCADE; ON DELETE CASCADE;
ALTER TABLE `tplanned_downtime_agents` ADD COLUMN `all_modules` tinyint(1) default 1; ALTER TABLE `tplanned_downtime_agents` ADD COLUMN `all_modules` tinyint(1) default 1;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tplanned_downtime_modules` -- Table `tplanned_downtime_modules`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` ( CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
`id` int(20) unsigned NOT NULL auto_increment, `id` int(20) unsigned NOT NULL auto_increment,
`id_agent` mediumint(8) unsigned NOT NULL default '0', `id_agent` mediumint(8) unsigned NOT NULL default '0',
@ -116,9 +116,9 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_modules` (
ON DELETE CASCADE ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tevento` -- Table `tevento`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL, `id_extra` tinytext NOT NULL); ALTER TABLE `tevento` ADD COLUMN (`source` tinytext NOT NULL, `id_extra` tinytext NOT NULL);
ALTER TABLE `tevento` MODIFY COLUMN `event_type` ENUM('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal','configuration_change') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'unknown'; ALTER TABLE `tevento` MODIFY COLUMN `event_type` ENUM('going_unknown','unknown','alert_fired','alert_recovered','alert_ceased','alert_manual_validation','recon_host_detected','system','error','new_agent','going_up_warning','going_up_critical','going_down_warning','going_down_normal','going_down_critical','going_up_normal','configuration_change') CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'unknown';
ALTER TABLE `tevento` ADD COLUMN `critical_instructions` TEXT NOT NULL DEFAULT ''; ALTER TABLE `tevento` ADD COLUMN `critical_instructions` TEXT NOT NULL DEFAULT '';
@ -127,21 +127,21 @@ ALTER TABLE `tevento` ADD COLUMN `unknown_instructions` TEXT NOT NULL DEFAULT ''
ALTER TABLE `tevento` ADD COLUMN `owner_user` VARCHAR(100) NOT NULL DEFAULT ''; ALTER TABLE `tevento` ADD COLUMN `owner_user` VARCHAR(100) NOT NULL DEFAULT '';
ALTER TABLE `tevento` ADD COLUMN `ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0'; ALTER TABLE `tevento` ADD COLUMN `ack_utimestamp` BIGINT(20) NOT NULL DEFAULT '0';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tgrupo` -- Table `tgrupo`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tgrupo` ADD COLUMN `description` text; ALTER TABLE `tgrupo` ADD COLUMN `description` text;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `talert_snmp` -- Table `talert_snmp`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `talert_snmp` ADD COLUMN (`_snmp_f1_` text, `_snmp_f2_` text, `_snmp_f3_` text, ALTER TABLE `talert_snmp` ADD COLUMN (`_snmp_f1_` text, `_snmp_f2_` text, `_snmp_f3_` text,
`_snmp_f4_` text, `_snmp_f5_` text, `_snmp_f6_` text, `trap_type` int(11) NOT NULL default '-1', `_snmp_f4_` text, `_snmp_f5_` text, `_snmp_f6_` text, `trap_type` int(11) NOT NULL default '-1',
`single_value` varchar(255) DEFAULT ''); `single_value` varchar(255) DEFAULT '');
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tagente_modulo` -- Table `tagente_modulo`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tagente_modulo` ADD COLUMN `module_ff_interval` int(4) unsigned DEFAULT '0'; ALTER TABLE `tagente_modulo` ADD COLUMN `module_ff_interval` int(4) unsigned DEFAULT '0';
ALTER TABLE `tagente_modulo` CHANGE COLUMN `post_process` `post_process` double(18,5) DEFAULT NULL; ALTER TABLE `tagente_modulo` CHANGE COLUMN `post_process` `post_process` double(18,5) DEFAULT NULL;
ALTER TABLE `tagente_modulo` ADD COLUMN `wizard_level` enum('basic','advanced','custom','nowizard') DEFAULT 'nowizard'; ALTER TABLE `tagente_modulo` ADD COLUMN `wizard_level` enum('basic','advanced','custom','nowizard') DEFAULT 'nowizard';
@ -153,9 +153,9 @@ ALTER TABLE `tagente_modulo` ADD COLUMN `unknown_instructions` TEXT NOT NULL DEF
ALTER TABLE `tagente_modulo` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0'; ALTER TABLE `tagente_modulo` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tagente_modulo` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0'; ALTER TABLE `tagente_modulo` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tnetwork_component` -- Table `tnetwork_component`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tnetwork_component` CHANGE COLUMN `post_process` `post_process` double(18,5) default NULL; 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`; ALTER TABLE `tnetwork_component` ADD COLUMN `unit` TEXT NOT NULL AFTER `post_process`;
ALTER TABLE tnetwork_component ADD `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard'; ALTER TABLE tnetwork_component ADD `wizard_level` enum('basic','advanced','custom','nowizard') default 'nowizard';
@ -167,14 +167,14 @@ ALTER TABLE tnetwork_component ADD `unknown_instructions` TEXT NOT NULL default
ALTER TABLE `tnetwork_component` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0'; ALTER TABLE `tnetwork_component` ADD COLUMN `critical_inverse` tinyint(1) unsigned default '0';
ALTER TABLE `tnetwork_component` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0'; ALTER TABLE `tnetwork_component` ADD COLUMN `warning_inverse` tinyint(1) unsigned default '0';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tgraph_source` Alter table to allow negative values in weight -- Table `tgraph_source` Alter table to allow negative values in weight
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE tgraph_source MODIFY weight FLOAT(5,3) NOT NULL DEFAULT '0.000'; ALTER TABLE tgraph_source MODIFY weight FLOAT(5,3) NOT NULL DEFAULT '0.000';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tevent_filter` -- Table `tevent_filter`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tevent_filter` ( CREATE TABLE IF NOT EXISTS `tevent_filter` (
`id_filter` int(10) unsigned NOT NULL auto_increment, `id_filter` int(10) unsigned NOT NULL auto_increment,
`id_group_filter` int(10) NOT NULL default 0, `id_group_filter` int(10) NOT NULL default 0,
@ -194,9 +194,9 @@ CREATE TABLE IF NOT EXISTS `tevent_filter` (
PRIMARY KEY (`id_filter`) PRIMARY KEY (`id_filter`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tconfig` -- Table `tconfig`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE tconfig MODIFY value TEXT NOT NULL; ALTER TABLE tconfig MODIFY value TEXT NOT NULL;
-- Join the all ips of "list_ACL_IPs_for_API_%" in one row (now We have a field "value" with hudge size) -- Join the all ips of "list_ACL_IPs_for_API_%" in one row (now We have a field "value" with hudge size)
INSERT INTO tconfig (token, `value`) SELECT 'list_ACL_IPs_for_API', GROUP_CONCAT(`value` SEPARATOR ';') AS `value` FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API%"; INSERT INTO tconfig (token, `value`) SELECT 'list_ACL_IPs_for_API', GROUP_CONCAT(`value` SEPARATOR ';') AS `value` FROM tconfig WHERE token LIKE "list_ACL_IPs_for_API%";
@ -218,29 +218,29 @@ INSERT INTO `tconfig` (`token`, `value`) VALUES
('enable_refr', 0); ('enable_refr', 0);
UPDATE tconfig SET `value`='comparation' WHERE `token`= 'prominent_time'; UPDATE tconfig SET `value`='comparation' WHERE `token`= 'prominent_time';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `treport_content_item` -- Table `treport_content_item`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE treport_content_item ADD FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) ON UPDATE CASCADE ON DELETE CASCADE; ALTER TABLE treport_content_item ADD FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) ON UPDATE CASCADE ON DELETE CASCADE;
ALTER TABLE `treport_content_item` ADD COLUMN `operation` TEXT; ALTER TABLE `treport_content_item` ADD COLUMN `operation` TEXT;
ALTER TABLE treport ADD COLUMN `id_template` INTEGER UNSIGNED DEFAULT 0; ALTER TABLE treport ADD COLUMN `id_template` INTEGER UNSIGNED DEFAULT 0;
ALTER TABLE treport ADD COLUMN `id_group_edit` mediumint(8) unsigned NULL DEFAULT 0; ALTER TABLE treport ADD COLUMN `id_group_edit` mediumint(8) unsigned NULL DEFAULT 0;
ALTER TABLE treport ADD COLUMN `metaconsole` tinyint(1) DEFAULT 0; ALTER TABLE treport ADD COLUMN `metaconsole` tinyint(1) DEFAULT 0;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tgraph` -- Table `tgraph`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tgraph` ADD COLUMN `id_graph_template` int(11) NOT NULL DEFAULT 0; ALTER TABLE `tgraph` ADD COLUMN `id_graph_template` int(11) NOT NULL DEFAULT 0;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `ttipo_modulo` -- Table `ttipo_modulo`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
UPDATE ttipo_modulo SET descripcion='Generic data' WHERE id_tipo=1; UPDATE ttipo_modulo SET descripcion='Generic data' WHERE id_tipo=1;
UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4; UPDATE ttipo_modulo SET descripcion='Generic data incremental' WHERE id_tipo=4;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tusuario` -- Table `tusuario`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tusuario` ADD COLUMN `section` TEXT NOT NULL; ALTER TABLE `tusuario` ADD COLUMN `section` TEXT NOT NULL;
INSERT INTO `tusuario` (`section`) VALUES ('Default'); INSERT INTO `tusuario` (`section`) VALUES ('Default');
ALTER TABLE `tusuario` ADD COLUMN `data_section` TEXT NOT NULL; ALTER TABLE `tusuario` ADD COLUMN `data_section` TEXT NOT NULL;
@ -255,24 +255,24 @@ ALTER TABLE `tusuario` ADD COLUMN `failed_attempt` int(4) NOT NULL DEFAULT 0;
ALTER TABLE `tusuario` ADD COLUMN `login_blocked` tinyint(1) DEFAULT 0; ALTER TABLE `tusuario` ADD COLUMN `login_blocked` tinyint(1) DEFAULT 0;
ALTER TABLE `tusuario` ADD COLUMN `metaconsole_access` enum('basic','advanced','custom','all','only_console') DEFAULT 'only_console'; ALTER TABLE `tusuario` ADD COLUMN `metaconsole_access` enum('basic','advanced','custom','all','only_console') DEFAULT 'only_console';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tmensajes` -- Table `tmensajes`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL; ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `talert_compound` -- Table `talert_compound`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0'; ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `talert_commands` -- Table `talert_commands`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`) VALUES ('Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1); INSERT INTO `talert_commands` (`name`, `command`, `description`, `internal`) VALUES ('Validate Event','Internal type','This alert validate the events matched with a module given the agent name (_field1_) and module name (_field2_)', 1);
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tpassword_history` -- Table `tpassword_history`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tpassword_history` ( CREATE TABLE IF NOT EXISTS `tpassword_history` (
`id_pass` int(10) unsigned NOT NULL auto_increment, `id_pass` int(10) unsigned NOT NULL auto_increment,
`id_user` varchar(60) NOT NULL, `id_user` varchar(60) NOT NULL,
@ -282,34 +282,35 @@ CREATE TABLE IF NOT EXISTS `tpassword_history` (
PRIMARY KEY (`id_pass`) PRIMARY KEY (`id_pass`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tplugin` -- Table `tplugin`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE tplugin ADD `macros` text; ALTER TABLE tplugin ADD `macros` text;
ALTER TABLE tplugin ADD `parameters` text; ALTER TABLE tplugin ADD `parameters` text;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `trecon_script` -- Table `trecon_script`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
UPDATE trecon_script SET `description`='This&#x20;script&#x20;is&#x20;used&#x20;to&#x20;automatically&#x20;detect&#x20;SNMP&#x20;Interfaces&#x20;on&#x20;devices,&#x20;used&#x20;as&#x20;Recon&#x20;Custom&#x20;Script&#x20;in&#x20;the&#x20;recon&#x20;task.&#x20;Parameters&#x20;used&#x20;are:&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;network.&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;several&#x20;communities&#x20;separated&#x20;by&#x20;comma.&#x20;For&#x20;example:&#x20;snmp_community,public,private&#x20;&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;optative&#x20;parameter&#x20;to&#x20;force&#x20;process&#x20;downed&#x20;interfaces&#x20;&#40;use:&#x20;&#039;-a&#039;&#41;.&#x20;Only&#x20;up&#x20;interfaces&#x20;are&#x20;processed&#x20;by&#x20;default&#x20;&#x0d;&#x0a;&#x0d;&#x0a;See&#x20;documentation&#x20;for&#x20;more&#x20;information.' UPDATE trecon_script SET `description`='This&#x20;script&#x20;is&#x20;used&#x20;to&#x20;automatically&#x20;detect&#x20;SNMP&#x20;Interfaces&#x20;on&#x20;devices,&#x20;used&#x20;as&#x20;Recon&#x20;Custom&#x20;Script&#x20;in&#x20;the&#x20;recon&#x20;task.&#x20;Parameters&#x20;used&#x20;are:&#x0d;&#x0a;&#x0d;&#x0a;*&#x20;custom_field1&#x20;=&#x20;network.&#x20;i.e.:&#x20;192.168.100.0/24&#x0d;&#x0a;*&#x20;custom_field2&#x20;=&#x20;several&#x20;communities&#x20;separated&#x20;by&#x20;comma.&#x20;For&#x20;example:&#x20;snmp_community,public,private&#x20;&#x0d;&#x0a;*&#x20;custom_field3&#x20;=&#x20;optative&#x20;parameter&#x20;to&#x20;force&#x20;process&#x20;downed&#x20;interfaces&#x20;&#40;use:&#x20;&#039;-a&#039;&#41;.&#x20;Only&#x20;up&#x20;interfaces&#x20;are&#x20;processed&#x20;by&#x20;default&#x20;&#x0d;&#x0a;&#x0d;&#x0a;See&#x20;documentation&#x20;for&#x20;more&#x20;information.'
WHERE id_recon_script = 1; WHERE id_recon_script = 1;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `trecon_task -- Table `trecon_task
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE trecon_task MODIFY subnet TEXT NOT NULL DEFAULT ''; ALTER TABLE trecon_task MODIFY subnet TEXT NOT NULL DEFAULT '';
ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL DEFAULT ''; ALTER TABLE trecon_task MODIFY field1 TEXT NOT NULL DEFAULT '';
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tlayout_data -- Table `tlayout_data
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE tlayout_data ADD COLUMN `enable_link` tinyint(1) UNSIGNED NOT NULL default 1; ALTER TABLE tlayout_data ADD COLUMN `enable_link` tinyint(1) UNSIGNED NOT NULL default 1;
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
-- Table `tnetwork_map` -- Table `tnetwork_map`
-- ---------------------------------------------------------------------- ------------------------------------------------------------------------
ALTER TABLE tnetwork_map ADD `text_filter` VARCHAR(100) NOT NULL DEFAULT ""; ALTER TABLE tnetwork_map ADD `text_filter` VARCHAR(100) NOT NULL DEFAULT "";
ALTER TABLE tnetwork_map ADD `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE tnetwork_map ADD `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE tnetwork_map ADD `pandoras_children` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0;
-- ---------------------------------------------------------------------- -- ----------------------------------------------------------------------
-- Table `tagente_estado` -- Table `tagente_estado`

View File

@ -18,9 +18,9 @@ ALTER TABLE tusuario ADD COLUMN (metaconsole_access VARCHAR2(100) DEFAULT 'only_
ALTER TABLE tusuario ADD CONSTRAINT t_usuario_metaconsole_access_cons CHECK (metaconsole_access IN ('basic','advanced','custom','all','only_console')); ALTER TABLE tusuario ADD CONSTRAINT t_usuario_metaconsole_access_cons CHECK (metaconsole_access IN ('basic','advanced','custom','all','only_console'));
ALTER TABLE tusuario ADD COLUMN (not_login NUMBER(5,0) default 0 NOT NULL); ALTER TABLE tusuario ADD COLUMN (not_login NUMBER(5,0) default 0 NOT NULL);
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table "tnetflow_filter" -- Table "tnetflow_filter"
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
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,
@ -341,6 +341,7 @@ evento
------------------------------------------------------------------------ ------------------------------------------------------------------------
ALTER TABLE tnetwork_map ADD (text_filter VARCHAR(100) DEFAULT ''); ALTER TABLE tnetwork_map ADD (text_filter VARCHAR(100) DEFAULT '');
ALTER TABLE tnetwork_map ADD (dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL); ALTER TABLE tnetwork_map ADD (dont_show_subgroups NUMBER(10, 0) default 0 NOT NULL);
ALTER TABLE tnetwork_map ADD (pandoras_children NUMBER(10, 0) default 0 NOT NULL);
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Table `tagente_estado` -- Table `tagente_estado`

View File

@ -332,6 +332,7 @@ ALTER TABLE "tnetwork_component" ADD COLUMN "warning_inverse" SMALLINT NOT NULL
------------------------------------------------------------------------ ------------------------------------------------------------------------
ALTER TABLE "tnetwork_map" ADD COLUMN "text_filter" VARCHAR(100) DEFAULT ''; ALTER TABLE "tnetwork_map" ADD COLUMN "text_filter" VARCHAR(100) DEFAULT '';
ALTER TABLE "tnetwork_map" ADD COLUMN "dont_show_subgroups" INTEGER NOT NULL DEFAULT 0; ALTER TABLE "tnetwork_map" ADD COLUMN "dont_show_subgroups" INTEGER NOT NULL DEFAULT 0;
ALTER TABLE "tnetwork_map" ADD COLUMN "pandoras_children" INTEGER NOT NULL DEFAULT 0;
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Table `tagente_estado` -- Table `tagente_estado`

View File

@ -32,20 +32,32 @@ switch($action) {
case 'get_networkmap_summary': case 'get_networkmap_summary':
$stats = get_parameter('stats', array()); $stats = get_parameter('stats', array());
$stats = json_decode(base64_decode($stats),true); $stats = json_decode(base64_decode($stats),true);
$metaconsole = (bool)get_parameter('metaconsole', false);
$hack_metaconsole = '';
if ($metaconsole) {
$hack_metaconsole = '../../';
}
$summary = '<br>'; $summary = '<br>';
if(isset($stats['policies'])) { if (isset($stats['policies'])) {
$summary .= count($stats['policies'])." x ".html_print_image('images/policies.png',true).' '.__('Policies')."<br>"; $summary .= count($stats['policies']) . " x " .
html_print_image($hack_metaconsole . 'images/policies.png',true) . ' '.
__('Policies') . "<br>";
} }
if(isset($stats['groups'])) { if (isset($stats['groups'])) {
// TODO: GET STATUS OF THE GROUPS AND ADD IT TO SUMMARY // TODO: GET STATUS OF THE GROUPS AND ADD IT TO SUMMARY
$summary .= count($stats['groups'])." x ".html_print_image('images/group.png',true).' '.__('Groups')."<br>"; $summary .= count($stats['groups']) . " x " .
html_print_image($hack_metaconsole . 'images/group.png',true) . ' ' .
__('Groups') . "<br>";
} }
if(isset($stats['agents'])) { if (isset($stats['agents'])) {
$summary .= count($stats['agents'])." x ".html_print_image('images/bricks.png',true).' '.__('Agents')."<br>"; $summary .= count($stats['agents']) .
" x " . html_print_image($hack_metaconsole . 'images/bricks.png',true) .
' ' . __('Agents') . "<br>";
// TODO: GET STATUS OF THE AGENTS AND ADD IT TO SUMMARY // TODO: GET STATUS OF THE AGENTS AND ADD IT TO SUMMARY
//~ $status_agents = array(); //~ $status_agents = array();
//~ foreach($stats['agents'] as $id_agent) { //~ foreach($stats['agents'] as $id_agent) {
@ -57,7 +69,7 @@ switch($action) {
//~ } //~ }
} }
if(isset($stats['modules'])) { if (isset($stats['modules'])) {
// TODO: GET STATUS OF THE MODULES AND ADD IT TO SUMMARY // TODO: GET STATUS OF THE MODULES AND ADD IT TO SUMMARY
$summary .= count($stats['modules'])." x ".html_print_image('images/brick.png',true).' '.__('Modules')."<br>"; $summary .= count($stats['modules'])." x ".html_print_image('images/brick.png',true).' '.__('Modules')."<br>";
} }

View File

@ -368,14 +368,14 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
WHERE tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente WHERE tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND tagente_modulo.disabled = 0 AND estado = 2 AND tagente_estado.utimestamp != 0'; AND tagente_modulo.disabled = 0 AND estado = 2 AND tagente_estado.utimestamp != 0';
$critical_modules = 'SELECT tagente.id_agente $critical_modules = 'SELECT tagente.id_agente
FROM tagente_estado, tagente, tagente_modulo FROM tagente_estado, tagente, tagente_modulo
WHERE tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente WHERE tagente.disabled = 0 AND tagente_estado.id_agente = tagente.id_agente
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND tagente_modulo.disabled = 0 AND estado = 1 AND tagente_estado.utimestamp != 0'; AND tagente_modulo.disabled = 0 AND estado = 1 AND tagente_estado.utimestamp != 0';
$unknown_modules = 'SELECT tagente.id_agente $unknown_modules = 'SELECT tagente.id_agente
FROM tagente_estado, tagente, tagente_modulo FROM tagente_estado, tagente, tagente_modulo
WHERE tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente WHERE tagente.disabled = 0 AND tagente.id_agente = tagente_estado.id_agente
@ -423,7 +423,7 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
break; break;
} }
unset($filter['status']); unset($filter['status']);
} }
unset($filter['order']); unset($filter['order']);
@ -526,19 +526,19 @@ function agents_get_agents ($filter = false, $fields = false, $access = 'AR', $o
$limit_sql = " OFFSET $offset LIMIT $limit "; $limit_sql = " OFFSET $offset LIMIT $limit ";
} }
$sql = sprintf("%s %s", $sql, $limit_sql); $sql = sprintf("%s %s", $sql, $limit_sql);
if ($return) if ($return)
return $sql; return $sql;
else else
$agents = db_get_all_rows_sql($sql); $agents = db_get_all_rows_sql($sql);
break; break;
case "oracle": case "oracle":
$set = array(); $set = array();
if (isset($offset) && isset($limit)) { if (isset($offset) && isset($limit)) {
$set['limit'] = $limit; $set['limit'] = $limit;
$set['offset'] = $offset; $set['offset'] = $offset;
} }
if ($return) if ($return)
return $sql; return $sql;
else else

View File

@ -26,7 +26,10 @@ require_once ('functions_agents.php');
require_once($config['homedir'] . "/include/functions_modules.php"); require_once($config['homedir'] . "/include/functions_modules.php");
require_once($config['homedir'] . "/include/functions_groups.php"); require_once($config['homedir'] . "/include/functions_groups.php");
ui_require_css_file ('cluetip'); ui_require_css_file ('cluetip');
ui_require_jquery_file ('cluetip'); $hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
ui_require_jquery_file ('cluetip', $hack_metaconsole . 'include/javascript/');
// Check if a node descends from a given node // Check if a node descends from a given node
function networkmap_is_descendant ($node, $ascendant, $parents) { function networkmap_is_descendant ($node, $ascendant, $parents) {
@ -393,14 +396,21 @@ function networkmap_generate_dot_groups ($pandora_name, $group = 0, $simple = 0,
// Returns an edge definition // Returns an edge definition
function networkmap_create_edge ($head, $tail, $layout, $nooverlap, $pure, $zoom, $ranksep, $simple, $regen, $font_size, $group, $sec2 = 'operation/agentes/networkmap', $tab = 'topology', $id_networkmap = 0) { function networkmap_create_edge ($head, $tail, $layout, $nooverlap, $pure, $zoom, $ranksep, $simple, $regen, $font_size, $group, $sec2 = 'operation/agentes/networkmap', $tab = 'topology', $id_networkmap = 0) {
// edgeURL allows node navigation if (defined("METACONSOLE")) {
$edge = $head.' -- '.$tail.'[color="#BDBDBD", headclip=false, tailclip=false, $url = '';
edgeURL="index.php?sec=estado&sec2='.$sec2.'&tab='.$tab.'&recenter_networkmap=1&center='.$head. }
else {
$url = 'index.php?sec=estado&sec2='.$sec2.'&tab='.$tab.'&recenter_networkmap=1&center='.$head.
'&layout='.$layout.'&nooverlap=' .$nooverlap.'&pure='.$pure. '&layout='.$layout.'&nooverlap=' .$nooverlap.'&pure='.$pure.
'&zoom='.$zoom.'&ranksep='.$ranksep.'&simple='.$simple.'&regen=1'. '&zoom='.$zoom.'&ranksep='.$ranksep.'&simple='.$simple.'&regen=1'.
'&font_size='.$font_size.'&group='.$group.'&id_networkmap='.$id_networkmap.'"];'; '&font_size='.$font_size.'&group='.$group.'&id_networkmap='.$id_networkmap;
}
// edgeURL allows node navigation
$edge = "\n" . $head.' -- '.$tail.'[color="#BDBDBD", headclip=false, tailclip=false,
edgeURL=""];' . "\n";
return $edge; return $edge;
} }
@ -429,7 +439,7 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10) {
$icon = groups_get_icon($group['id_grupo']); $icon = groups_get_icon($group['id_grupo']);
if ($simple == 0){ if ($simple == 0) {
// Set node icon // Set node icon
if (file_exists (html_print_image("images/groups_small/" . $icon . ".png", true, false, true, true))) { if (file_exists (html_print_image("images/groups_small/" . $icon . ".png", true, false, true, true))) {
$img_node = html_print_image("images/groups_small/" . $icon . ".png", true, false, false, true); $img_node = html_print_image("images/groups_small/" . $icon . ".png", true, false, false, true);
@ -445,13 +455,13 @@ function networkmap_create_group_node ($group, $simple = 0, $font_size = 10) {
$name = groups_get_name($group['id_grupo']); $name = groups_get_name($group['id_grupo']);
} }
$node = $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>'.$img_node.'</TD></TR> $node = "\n" . $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>'.$img_node.'</TD></TR>
<TR><TD>'.io_safe_output($name).'</TD></TR></TABLE>>, <TR><TD>'.io_safe_output($name).'</TD></TR></TABLE>>,
shape="invtrapezium", URL="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$group['id_grupo'].'", shape="invtrapezium", URL="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$group['id_grupo'].'",
tooltip="ajax.php?page=operation/agentes/ver_agente&get_group_status_tooltip=1&id_group='.$group['id_grupo'].'"];'; tooltip="ajax.php?page=operation/agentes/ver_agente&get_group_status_tooltip=1&id_group='.$group['id_grupo'].'"];' . "\n";
} }
else { else {
$node = $group['id_node'] . ' [ color="'.$status_color.'", fontsize='.$font_size.', shape="invtrapezium", URL="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$group['id_grupo'].'", style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_group_status_tooltip=1&id_group='.$group['id_grupo'].'"];'; $node = "\n" . $group['id_node'] . ' [ color="'.$status_color.'", fontsize='.$font_size.', shape="invtrapezium", URL="index.php?sec=estado&sec2=operation/agentes/estado_agente&refr=60&group_id='.$group['id_grupo'].'", style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_group_status_tooltip=1&id_group='.$group['id_grupo'].'"];' . "\n";
} }
return $node; return $node;
} }
@ -463,21 +473,21 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
$status = agents_get_status($agent['id_agente']); $status = agents_get_status($agent['id_agente']);
// 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;
case 1: case 1:
$status_color = '#FF1D1D'; // Critical monitor $status_color = '#FF1D1D'; // Critical monitor
break; break;
case 2: case 2:
$status_color = '#FFE308'; // Warning monitor $status_color = '#FFE308'; // Warning monitor
break; break;
case 4: case 4:
$status_color = '#FFA300'; // Alert fired $status_color = '#FFA300'; // Alert fired
break; break;
default: default:
$status_color = '#BBBBBB'; // Unknown monitor $status_color = '#BBBBBB'; // Unknown monitor
break; break;
} }
@ -487,11 +497,15 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
$name = substr ($name, 0, 16) . '...'; $name = substr ($name, 0, 16) . '...';
} }
if ($simple == 0){ if ($simple == 0) {
// Set node icon // Set node icon
$img_node = ui_print_os_icon ($agent['id_os'], false, true, true, true, true, $relative); $img_node = ui_print_os_icon ($agent['id_os'], false, true, true, true, true, $relative);
$img_node = str_replace($config['homeurl'] . '/', '', $img_node); $img_node = str_replace($config['homeurl'] . '/', '', $img_node);
if (defined('METACONSOLE')) {
$img_node = '../../' . $img_node;
}
if ($relative) { if ($relative) {
$img_node = html_print_image($img_node, true, false, false, true); $img_node = html_print_image($img_node, true, false, false, true);
} }
@ -499,13 +513,27 @@ function networkmap_create_agent_node ($agent, $simple = 0, $font_size = 10, $cu
$img_node = html_print_image($img_node, true, false, false, false); $img_node = html_print_image($img_node, true, false, false, false);
} }
$node = $agent['id_node'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.40, height=0.40, label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . $img_node . '</TD></TR> if (defined("METACONSOLE")) {
$url = 'TODO'; //TODO
$url_tooltip = '../../ajax.php?' .
'page=operation/agentes/ver_agente&' .
'get_agent_status_tooltip=1&' .
'id_agent='.$agent['id_agente'] . '&' .
'metaconsole=1&' .
'id_server=' . $agent['id_server'];
}
else {
$url = 'index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'];
$url_tooltip = 'ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'];
}
$node = "\n" . $agent['id_node'].' [ color="'.$status_color.'", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.40, height=0.40, label=<<TABLE CELLPADDING="0" CELLSPACING="0" BORDER="0"><TR><TD>' . $img_node . '</TD></TR>
<TR><TD>'.io_safe_output($name).'</TD></TR></TABLE>>, <TR><TD>'.io_safe_output($name).'</TD></TR></TABLE>>,
shape="doublecircle", URL="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'", shape="doublecircle", URL="'.$url.'",
tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];'; tooltip="' . $url_tooltip . '"];' . "\n";
} }
else { else {
$node = $agent['id_node'] . ' [ color="' . $status_color . '", fontsize='.$font_size.', shape="doublecircle", URL="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'",style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];'; $node = $agent['id_node'] . ' [ color="' . $status_color . '", fontsize='.$font_size.', shape="doublecircle", URL="index.php?sec=estado&sec2=operation/agentes/ver_agente&id_agente='.$agent['id_agente'].'",style="filled", fixedsize=true, width=0.20, height=0.20, label="", tooltip="ajax.php?page=operation/agentes/ver_agente&get_agent_status_tooltip=1&id_agent='.$agent['id_agente'].'"];' . "\n";
} }
return $node; return $node;
@ -549,17 +577,36 @@ function networkmap_create_module_node ($module, $simple = 0, $font_size = 10) {
// Returns the definition of the central module // Returns the definition of the central module
function networkmap_create_pandora_node ($name, $font_size = 10, $simple = 0, $stats = array()) { function networkmap_create_pandora_node ($name, $font_size = 10, $simple = 0, $stats = array()) {
$img = '<TR><TD>' . html_print_image("images/networkmap/pandora_node.png", true, false, false, true) . '</TD></TR>';
$name = '<TR><TD BGCOLOR="#FFFFFF">'.$name.'</TD></TR>';
$label = '<TABLE BORDER="0">'.$img.$name.'</TABLE>';
if ($simple == 1){
$label = '';
}
$stats_json = base64_encode(json_encode($stats)); $stats_json = base64_encode(json_encode($stats));
$img_src = "images/networkmap/pandora_node.png";
if (defined('METACONSOLE')) {
$img_src = '../../' . $img_src;
$url_tooltip = '../../ajax.php?' .
'page=include/ajax/networkmap.ajax&' .
'action=get_networkmap_summary&' .
'stats='.$stats_json . '&' .
'metaconsole=1';
$url = 'index.php?sec=monitoring&sec2=monitoring/tree_view';
}
else {
$url_tooltip = 'ajax.php?page=include/ajax/networkmap.ajax&action=get_networkmap_summary&stats='.$stats_json.'", URL="index.php?sec=estado&sec2=operation/agentes/group_view';
$url = 'index.php?sec=estado&sec2=operation/agentes/group_view';
}
$img_tag = html_print_image($img_src, true, false, false, true);
$img = '<TR><TD>' . $img_tag . '</TD></TR>';
$name = '<TR><TD BGCOLOR="#FFFFFF">'.$name.'</TD></TR>';
$label = '<TABLE BORDER="0">'.$img.$name.'</TABLE>';
if ($simple == 1) {
$label = '';
}
$node = '0 [ color="#364D1F", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.8, height=0.6, label=<'.$label.'>, $node = '0 [ color="#364D1F", fontsize='.$font_size.', style="filled", fixedsize=true, width=0.8, height=0.6, label=<'.$label.'>,
shape="ellipse", tooltip="ajax.php?page=include/ajax/networkmap.ajax&action=get_networkmap_summary&stats='.$stats_json.'", URL="index.php?sec=estado&sec2=operation/agentes/group_view" ];'; shape="ellipse", tooltip="' . $url_tooltip . '", URL="' . $url . '" ];';
return $node; return $node;
} }
@ -833,18 +880,18 @@ function networkmap_update_networkmap ($id_networkmap, $values) {
*/ */
function networkmap_get_types () { function networkmap_get_types () {
$networkmap_types = array(); $networkmap_types = array();
$is_enterprise = enterprise_include_once('include/functions_policies.php'); $is_enterprise = enterprise_include_once('include/functions_policies.php');
$networkmap_types['topology'] = __('Create a new topology map'); $networkmap_types['topology'] = __('Create a new topology map');
$networkmap_types['groups'] = __('Create a new group map'); $networkmap_types['groups'] = __('Create a new group map');
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) { if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
$enterprise_types = enterprise_hook('policies_get_networkmap_types'); $enterprise_types = enterprise_hook('policies_get_networkmap_types');
$networkmap_types = array_merge($networkmap_types, $enterprise_types); $networkmap_types = array_merge($networkmap_types, $enterprise_types);
} }
return $networkmap_types; return $networkmap_types;
} }
@ -855,18 +902,18 @@ function networkmap_get_types () {
*/ */
function networkmap_get_filter_types () { function networkmap_get_filter_types () {
$networkmap_types = array(); $networkmap_types = array();
$is_enterprise = enterprise_include_once('include/functions_policies.php'); $is_enterprise = enterprise_include_once('include/functions_policies.php');
$networkmap_types['topology'] = __('Topology'); $networkmap_types['topology'] = __('Topology');
$networkmap_types['groups'] = __('Group'); $networkmap_types['groups'] = __('Group');
if ($is_enterprise !== ENTERPRISE_NOT_HOOK) { if ($is_enterprise !== ENTERPRISE_NOT_HOOK) {
$enterprise_types = enterprise_hook('policies_get_networkmap_filter_types'); $enterprise_types = enterprise_hook('policies_get_networkmap_filter_types');
$networkmap_types = array_merge($networkmap_types, $enterprise_types); $networkmap_types = array_merge($networkmap_types, $enterprise_types);
} }
return $networkmap_types; return $networkmap_types;
} }

View File

@ -181,6 +181,10 @@ function printSmallFont ($string, $return = true) {
* @return string HTML code if return parameter is true. * @return string HTML code if return parameter is true.
*/ */
function ui_print_message ($message, $class = '', $attributes = '', $return = false, $tag = 'h3') { function ui_print_message ($message, $class = '', $attributes = '', $return = false, $tag = 'h3') {
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
static $first_execution = true; static $first_execution = true;
$text_title = ''; $text_title = '';
@ -232,6 +236,8 @@ function ui_print_message ($message, $class = '', $attributes = '', $return = fa
$icon_image = 'images/suc.png'; $icon_image = 'images/suc.png';
break; break;
} }
$icon_image = $hack_metaconsole . $icon_image;
} }
$id = 'info_box_' . uniqid(); $id = 'info_box_' . uniqid();
@ -244,7 +250,7 @@ function ui_print_message ($message, $class = '', $attributes = '', $return = fa
<td class="icon">'; <td class="icon">';
if (!$no_close_bool) { if (!$no_close_bool) {
$output .= '<a href="javascript: close_info_box(\'' . $id . '\')">' . $output .= '<a href="javascript: close_info_box(\'' . $id . '\')">' .
html_print_image('images/cross.disabled.png', true) . '</a>'; html_print_image($hack_metaconsole . 'images/cross.disabled.png', true) . '</a>';
} }
$output .= '</td> $output .= '</td>
@ -482,8 +488,14 @@ function ui_print_group_icon ($id_group, $return = false, $path = "groups_small"
if (empty ($icon)) if (empty ($icon))
$output .= '<span title="'. groups_get_name($id_group, true).'">&nbsp;-&nbsp</span>'; $output .= '<span title="'. groups_get_name($id_group, true).'">&nbsp;-&nbsp</span>';
else else {
$output .= html_print_image("images/" . $path . "/" . $icon . ".png", true, array("style" => $style, "class" => "bot", "alt" => groups_get_name($id_group, true), "title" => groups_get_name ($id_group, true))); $hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
$output .= html_print_image($hack_metaconsole . "images/" . $path . "/" . $icon . ".png",
true, array("style" => $style, "class" => "bot", "alt" => groups_get_name($id_group, true), "title" => groups_get_name ($id_group, true)));
}
if ($link) if ($link)
$output .= '</a>'; $output .= '</a>';
@ -550,7 +562,7 @@ function ui_print_os_icon ($id_os, $name = true, $return = false, $apply_skin =
$os_name = get_os_name ($id_os); $os_name = get_os_name ($id_os);
if (empty ($icon)) { if (empty ($icon)) {
if ($only_src) { if ($only_src) {
$output = html_print_image("images/".$subfolter."/unknown.png", false, false, true, $relative); $output = html_print_image("images/" . $subfolter . "/unknown.png", false, false, true, $relative);
} }
else { else {
return "-"; return "-";
@ -559,18 +571,18 @@ function ui_print_os_icon ($id_os, $name = true, $return = false, $apply_skin =
if ($apply_skin) { if ($apply_skin) {
if ($only_src) { if ($only_src) {
$output = html_print_image("images/".$subfolter."/".$icon, true, false, true, $relative); $output = html_print_image("images/" . $subfolter . "/" . $icon, true, false, true, $relative);
} }
else { else {
$output = html_print_image("images/".$subfolter."/".$icon, true, array("alt" => $os_name, "title" => $os_name), false, $relative); $output = html_print_image("images/" . $subfolter . "/" . $icon, true, array("alt" => $os_name, "title" => $os_name), false, $relative);
} }
} }
else else
//$output = "<img src='images/os_icons/" . $icon . "' alt='" . $os_name . "' title='" . $os_name . "'>"; //$output = "<img src='images/os_icons/" . $icon . "' alt='" . $os_name . "' title='" . $os_name . "'>";
$output = "images/".$subfolter."/" . $icon; $output = "images/" . $subfolter . "/" . $icon;
if ($name === true) { if ($name === true) {
$output .= ' - '.$os_name; $output .= ' - ' . $os_name;
} }
if (!$return) if (!$return)
@ -1712,10 +1724,15 @@ function ui_print_status_image ($type, $title = "", $return = false, $options =
* @param string name of the link * @param string name of the link
* @param string title of the link * @param string title of the link
* @param bool if the div will be hidden by default (default: true) * @param bool if the div will be hidden by default (default: true)
* @param bool Whether to return an output string or echo now (default: true)
* *
*/ */
function ui_toggle($code, $name, $title = '', $hidde_default = true) { function ui_toggle($code, $name, $title = '', $hidde_default = true, $return = false) {
$hack_metaconsole = '';
if (defined('METACONSOLE'))
$hack_metaconsole = '../../';
// Generate unique Id // Generate unique Id
$uniqid = uniqid(''); $uniqid = uniqid('');
@ -1724,41 +1741,49 @@ function ui_toggle($code, $name, $title = '', $hidde_default = true) {
$style = 'display:none'; $style = 'display:none';
$toggle_a = "$('#tgl_div_".$uniqid."').show();"; $toggle_a = "$('#tgl_div_".$uniqid."').show();";
$toggle_b = "$('#tgl_div_".$uniqid."').hide();"; $toggle_b = "$('#tgl_div_".$uniqid."').hide();";
$image_a = html_print_image("images/go.png", true, false, true); $image_a = html_print_image($hack_metaconsole . "images/go.png", true, false, true);
$image_b = html_print_image("images/down.png", true, false, true); $image_b = html_print_image($hack_metaconsole . "images/down.png", true, false, true);
$original = "images/down.png"; $original = $hack_metaconsole . "images/down.png";
} }
else { else {
$style = ''; $style = '';
$toggle_a = "$('#tgl_div_".$uniqid."').hide();"; $toggle_a = "$('#tgl_div_".$uniqid."').hide();";
$toggle_b = "$('#tgl_div_".$uniqid."').show();"; $toggle_b = "$('#tgl_div_".$uniqid."').show();";
$image_a = html_print_image("images/down.png", true, false, true); $image_a = html_print_image($hack_metaconsole . "images/down.png", true, false, true);
$image_b = html_print_image("images/go.png", true, false, true); $image_b = html_print_image($hack_metaconsole . "images/go.png", true, false, true);
$original = "images/go.png"; $original = $hack_metaconsole . "images/go.png";
} }
// Link to toggle // Link to toggle
echo '<a href="#" id="tgl_ctrl_'.$uniqid.'"><b>'.$name.'</b>&nbsp;'.html_print_image ($original, true, array ("title" => $title, "id" => "image_".$uniqid)).'</a><br /><br />'; $output = '';
$output .= '<a href="#" id="tgl_ctrl_'.$uniqid.'"><b>'.$name.'</b>&nbsp;'.html_print_image ($original, true, array ("title" => $title, "id" => "image_".$uniqid)).'</a><br /><br />';
// Code into a div // Code into a div
echo "<div id='tgl_div_".$uniqid."' style='".$style."'>\n"; $output .= "<div id='tgl_div_".$uniqid."' style='".$style."'>\n";
echo $code; $output .= $code;
echo "</div>"; $output .= "</div>";
// JQuery Toggle // JQuery Toggle
echo '<script type="text/javascript">'; $output .= '<script type="text/javascript">';
echo '/* <![CDATA[ */'; $output .= '/* <![CDATA[ */';
echo "$(document).ready (function () {"; $output .= "$(document).ready (function () {";
echo "$('#tgl_ctrl_".$uniqid."').toggle(function() {"; $output .= "$('#tgl_ctrl_".$uniqid."').toggle(function() {";
echo $toggle_a; $output .= $toggle_a;
echo "$('#image_".$uniqid."').attr({src: '".$image_a."'});"; $output .= "$('#image_".$uniqid."').attr({src: '".$image_a."'});";
echo "}, function() {"; $output .= "}, function() {";
echo $toggle_b; $output .= $toggle_b;
echo "$('#image_".$uniqid."').attr({src: '".$image_b."'});"; $output .= "$('#image_".$uniqid."').attr({src: '".$image_b."'});";
echo "});"; $output .= "});";
echo "});"; $output .= "});";
echo '/* ]]> */'; $output .= '/* ]]> */';
echo '</script>'; $output .= '</script>';
if (!$return) {
echo $output;
}
else {
return $output;
}
} }
/** /**

View File

@ -26,7 +26,7 @@ if (! check_acl ($config['id_user'], 0, "AR")) {
exit; exit;
} }
require_once ('include/functions_networkmap.php'); require_once('include/functions_networkmap.php');
ui_print_page_header(__('Network map'), "images/bricks.png", false, "network_map", false); ui_print_page_header(__('Network map'), "images/bricks.png", false, "network_map", false);
@ -49,22 +49,39 @@ if ($delete_networkmap) {
$group_search = get_parameter('group_search', '0'); $group_search = get_parameter('group_search', '0');
$type_search = get_parameter('type_filter', '0'); $type_search = get_parameter('type_filter', '0');
echo '<form method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap_list">'; ?>
echo "<table style='width: 100%' class='databox'>"; <form method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap_list">
echo "<tr><td class='datos' >"; <table style='width: 100%' class='databox'>
echo __('Group'); <tr>
echo "</td><td class='datos'>"; <td class='datos' >
html_print_select_groups($config['id_user'], 'AR', true, 'group_search', $group_search); <?php echo __('Group'); ?>
echo "</td><td class='datos'>"; </td>
echo __('Type'); <td class='datos'>
echo "</td><td class='datos'>"; <?php
$networkmap_filter_types = networkmap_get_filter_types(); html_print_select_groups($config['id_user'], 'AR',
html_print_select($networkmap_filter_types, 'type_filter', $type_search, '', __('All'), 0, false); true, 'group_search', $group_search);
echo "</td>"; ?>
echo "<td class='datos'>"; </td>
html_print_submit_button (__('Filter'), 'crt', false, 'class="sub search"'); <td class='datos'>
echo "</td></tr></table>"; <?php echo __('Type'); ?>
echo "</form>"; </td>
<td class='datos'>
<?php
$networkmap_filter_types = networkmap_get_filter_types();
html_print_select($networkmap_filter_types, 'type_filter',
$type_search, '', __('All'), 0, false);
?>
</td>
<td class='datos'>
<?php
html_print_submit_button (__('Filter'), 'crt', false,
'class="sub search"');
?>
</td>
</tr>
</table>
</form>
<?php
// Display table // Display table
$table = null; $table = null;
@ -150,14 +167,21 @@ else {
// Create networkmap form // Create networkmap form
$networkmap_types = networkmap_get_types(); $networkmap_types = networkmap_get_types();
echo "<table style='width: 100%' class='databox'>";
echo "<tr><td class='datos' style='width: 50%'>";
echo '<form method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap">';
html_print_input_hidden('add_networkmap', 1);
html_print_select($networkmap_types, 'tab', 'topology', '');
echo "</td><td class='datos'>";
html_print_submit_button (__('Create networkmap'), 'crt', false, 'class="sub next"');
echo "</form>";
echo "</td></tr></table>";
?> ?>
<form method="post" action="index.php?sec=network&amp;sec2=operation/agentes/networkmap">
<table style='width: 100%' class='databox'>
<tr>
<td class='datos' style='width: 50%'>
<?php
html_print_input_hidden('add_networkmap', 1);
html_print_select($networkmap_types, 'tab', 'topology', '');
?>
</td>
<td class='datos'>
<?php
html_print_submit_button (__('Create networkmap'), 'crt', false, 'class="sub next"');
?>
</td>
</tr>
</table>
</form>

View File

@ -357,16 +357,43 @@ if (is_ajax ()) {
if ($get_agent_status_tooltip) { if ($get_agent_status_tooltip) {
$id_agent = (int) get_parameter ('id_agent'); $id_agent = (int) get_parameter ('id_agent');
$agent = db_get_row ('tagente', 'id_agente', $id_agent); $metaconsole = (bool)get_parameter('metaconsole', false);
$id_server = (int)get_parameter('id_server', 0); //Metaconsole
$server = null;
if ($metaconsole) {
$server = db_get_row('tmetaconsole_setup', 'id', $id_server);
if (metaconsole_connect($server) != NOERR) {
return;
}
$agent = db_get_row ('tagente', 'id_agente', $id_agent);
metaconsole_restore_db();
}
else {
$agent = db_get_row ('tagente', 'id_agente', $id_agent);
}
echo '<h3>'.$agent['nombre'].'</h3>'; echo '<h3>'.$agent['nombre'].'</h3>';
echo '<strong>'.__('Main IP').':</strong> '.$agent['direccion'].'<br />'; echo '<strong>'.__('Main IP').':</strong> '.$agent['direccion'].'<br />';
echo '<strong>'.__('Group').':</strong> '; echo '<strong>'.__('Group').':</strong> ';
echo html_print_image('images/groups_small/'.groups_get_icon ($agent['id_grupo']).'.png', true);
$hack_metaconsole = '';
if ($metaconsole) {
$hack_metaconsole = '../../';
}
echo html_print_image($hack_metaconsole . 'images/groups_small/'.groups_get_icon ($agent['id_grupo']).'.png', true);
echo groups_get_name ($agent['id_grupo']).'<br />'; echo groups_get_name ($agent['id_grupo']).'<br />';
echo '<strong>'.__('Last contact').':</strong> '.human_time_comparation($agent['ultimo_contacto']).'<br />'; echo '<strong>'.__('Last contact').':</strong> '.human_time_comparation($agent['ultimo_contacto']).'<br />';
echo '<strong>'.__('Last remote contact').':</strong> '.human_time_comparation($agent['ultimo_contacto_remoto']).'<br />'; echo '<strong>'.__('Last remote contact').':</strong> '.human_time_comparation($agent['ultimo_contacto_remoto']).'<br />';
$sql = sprintf ('SELECT tagente_modulo.descripcion, $sql = sprintf ('SELECT tagente_modulo.descripcion,
tagente_modulo.nombre tagente_modulo.nombre
FROM tagente_estado, tagente_modulo FROM tagente_estado, tagente_modulo
@ -374,12 +401,35 @@ if (is_ajax ()) {
AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo AND tagente_estado.id_agente_modulo = tagente_modulo.id_agente_modulo
AND tagente_modulo.disabled = 0 AND tagente_modulo.disabled = 0
AND tagente_estado.estado = 1', $id_agent); AND tagente_estado.estado = 1', $id_agent);
$bad_modules = db_get_all_rows_sql ($sql); if ($metaconsole) {
if (metaconsole_connect($server) != NOERR) {
return;
}
$bad_modules = db_get_all_rows_sql ($sql);
metaconsole_restore_db();
}
else {
$bad_modules = db_get_all_rows_sql ($sql);
}
$sql = sprintf ('SELECT COUNT(*) $sql = sprintf ('SELECT COUNT(*)
FROM tagente_modulo FROM tagente_modulo
WHERE id_agente = %d WHERE id_agente = %d
AND disabled = 0', $id_agent); AND disabled = 0', $id_agent);
$total_modules = db_get_sql ($sql); if ($metaconsole) {
if (metaconsole_connect($server) != NOERR) {
return;
}
$total_modules = db_get_sql ($sql);
metaconsole_restore_db();
}
else {
$total_modules = db_get_sql ($sql);
}
if ($bad_modules === false) if ($bad_modules === false)
$size_bad_modules = 0; $size_bad_modules = 0;
@ -408,7 +458,19 @@ if (is_ajax ()) {
AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module
AND talert_template_modules.times_fired > 0 ', AND talert_template_modules.times_fired > 0 ',
$id_agent); $id_agent);
$alert_modules = db_get_sql ($sql); if ($metaconsole) {
if (metaconsole_connect($server) != NOERR) {
return;
}
$alert_modules = db_get_sql ($sql);
metaconsole_restore_db();
}
else {
$alert_modules = db_get_sql ($sql);
}
if ($alert_modules > 0) { if ($alert_modules > 0) {
$sql = sprintf ('SELECT tagente_modulo.nombre, talert_template_modules.last_fired $sql = sprintf ('SELECT tagente_modulo.nombre, talert_template_modules.last_fired
FROM talert_template_modules, tagente_modulo, tagente FROM talert_template_modules, tagente_modulo, tagente
@ -419,7 +481,18 @@ if (is_ajax ()) {
AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module AND tagente_modulo.id_agente_modulo = talert_template_modules.id_agent_module
AND talert_template_modules.times_fired > 0 ', AND talert_template_modules.times_fired > 0 ',
$id_agent); $id_agent);
$alerts = db_get_all_rows_sql ($sql); if ($metaconsole) {
if (metaconsole_connect($server) != NOERR) {
return;
}
$alerts = db_get_all_rows_sql ($sql);
metaconsole_restore_db();
}
else {
$alerts = db_get_all_rows_sql ($sql);
}
echo '<strong>'.__('Alerts fired').':</strong>'; echo '<strong>'.__('Alerts fired').':</strong>';
echo "<ul>"; echo "<ul>";
foreach ($alerts as $alert_item) { foreach ($alerts as $alert_item) {

View File

@ -40,9 +40,9 @@ CREATE SEQUENCE taddress_s INCREMENT BY 1 START WITH 1;
-- Triggers must end with double semicolons because Pandora installer need it -- Triggers must end with double semicolons because Pandora installer need it
CREATE OR REPLACE TRIGGER taddress_inc BEFORE INSERT ON taddress REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT taddress_s.nextval INTO :NEW.ID_A FROM dual; END;; CREATE OR REPLACE TRIGGER taddress_inc BEFORE INSERT ON taddress REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT taddress_s.nextval INTO :NEW.ID_A FROM dual; END;;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `taddress_agent` -- Table `taddress_agent`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE taddress_agent ( CREATE TABLE taddress_agent (
id_ag NUMBER(19, 0) NOT NULL PRIMARY KEY, id_ag NUMBER(19, 0) NOT NULL PRIMARY KEY,
id_a NUMBER(19, 0) default 0 NOT NULL, id_a NUMBER(19, 0) default 0 NOT NULL,
@ -1502,7 +1502,8 @@ CREATE TABLE tnetwork_map (
contracted_nodes CLOB, contracted_nodes CLOB,
show_snmp_modules NUMBER(5, 0) default 0 NOT NULL, show_snmp_modules NUMBER(5, 0) default 0 NOT NULL,
text_filter VARCHAR(100) DEFAULT '', text_filter VARCHAR(100) DEFAULT '',
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
); );
CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1; CREATE SEQUENCE tnetwork_map_s INCREMENT BY 1 START WITH 1;

View File

@ -1280,7 +1280,8 @@ CREATE TABLE "tnetwork_map" (
"contracted_nodes" TEXT, "contracted_nodes" TEXT,
"show_snmp_modules" SMALLINT NOT NULL default 0, "show_snmp_modules" SMALLINT NOT NULL default 0,
"text_filter" VARCHAR(100) DEFAULT '', "text_filter" VARCHAR(100) DEFAULT '',
"dont_show_subgroups" INTEGER NOT NULL default 0 "dont_show_subgroups" INTEGER NOT NULL default 0,
"pandoras_children" INTEGER NOT NULL default 0
); );
------------------------------------------------------------------------ ------------------------------------------------------------------------

View File

@ -1311,24 +1311,24 @@ CREATE TABLE IF NOT EXISTS `tgis_map` (
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'Table containing information about a gis map'; COMMENT = 'Table containing information about a gis map';
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tgis_map_connection` -- Table `tgis_map_connection`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tgis_map_connection` ( CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
`id_tmap_connection` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' , `id_tmap_connection` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' ,
`conection_name` VARCHAR(45) NULL COMMENT 'Name of the connection (name of the base layer)' , `conection_name` VARCHAR(45) NULL COMMENT 'Name of the connection (name of the base layer)' ,
`connection_type` VARCHAR(45) NULL COMMENT 'Type of map server to connect' , `connection_type` VARCHAR(45) NULL COMMENT 'Type of map server to connect' ,
`conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' , `conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' ,
`num_zoom_levels` TINYINT(2) NULL COMMENT 'Number of zoom levels available' , `num_zoom_levels` TINYINT(2) NULL COMMENT 'Number of zoom levels available' ,
`default_zoom_level` TINYINT(2) NOT NULL DEFAULT 16 COMMENT 'Default Zoom Level for the connection' , `default_zoom_level` TINYINT(2) NOT NULL DEFAULT 16 COMMENT 'Default Zoom Level for the connection' ,
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' , `default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' , `default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' , `default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
`initial_longitude` DOUBLE NULL COMMENT "longitude of the center of the map when it\'s loaded" , `initial_longitude` DOUBLE NULL COMMENT "longitude of the center of the map when it\'s loaded" ,
`initial_latitude` DOUBLE NULL COMMENT "latitude of the center of the map when it\'s loaded" , `initial_latitude` DOUBLE NULL COMMENT "latitude of the center of the map when it\'s loaded" ,
`initial_altitude` DOUBLE NULL COMMENT "altitude of the center of the map when it\'s loaded" , `initial_altitude` DOUBLE NULL COMMENT "altitude of the center of the map when it\'s loaded" ,
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map', `group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map',
PRIMARY KEY (`id_tmap_connection`) ) PRIMARY KEY (`id_tmap_connection`) )
ENGINE = InnoDB ENGINE = InnoDB
COMMENT = 'Table to store the map connection information'; COMMENT = 'Table to store the map connection information';
@ -1445,6 +1445,7 @@ CREATE TABLE IF NOT EXISTS `tnetwork_map` (
`show_snmp_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `show_snmp_modules` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`text_filter` VARCHAR(100) NOT NULL DEFAULT "", `text_filter` VARCHAR(100) NOT NULL DEFAULT "",
`dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0, `dont_show_subgroups` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
`pandoras_children` 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;
@ -1558,9 +1559,9 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report` (
PRIMARY KEY(`id_report`) PRIMARY KEY(`id_report`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- 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,
@ -1578,9 +1579,9 @@ CREATE TABLE IF NOT EXISTS `tnetflow_report_content` (
ON DELETE CASCADE ON DELETE CASCADE
) ENGINE = InnoDB DEFAULT CHARSET=utf8; ) ENGINE = InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
-- Table `tevent_filter` -- Table `tevent_filter`
-- ----------------------------------------------------- -- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `tevent_filter` ( CREATE TABLE IF NOT EXISTS `tevent_filter` (
`id_filter` int(10) unsigned NOT NULL auto_increment, `id_filter` int(10) unsigned NOT NULL auto_increment,