Merge branch 'develop' of https://github.com/pandorafms/pandorafms into develop

This commit is contained in:
m-lopez-f 2015-07-02 12:41:29 +02:00
commit 224f95466c
6 changed files with 119 additions and 106 deletions

View File

@ -143,3 +143,6 @@ CREATE TABLE IF NOT EXISTS `tgis_map_has_tgis_map_con` (
INSERT INTO `tgis_map_has_tgis_map_con` SELECT * FROM `tgis_map_has_tgis_map_connection`;
DROP TABLE `tgis_map_has_tgis_map_connection`;
ALTER TABLE `tmodule_relationship`
ADD COLUMN `id_rt` int(10) unsigned NOT NULL DEFAULT 0,
ADD FOREIGN KEY (`id_rt`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE;

View File

@ -48,6 +48,7 @@ $table->class = 'databox filters';
$table->head = array ();
if (defined("METACONSOLE")) {
$table->styleTable = "margin-top:0px";
$table->head[0] = __('Main data');
$table->head_colspan[0] = 4;
$table->headstyle[0] = 'text-align: center';

View File

@ -1774,15 +1774,15 @@ else {
// Page header for metaconsole
if ($enterpriseEnable and defined('METACONSOLE')) {
// Bread crumbs
ui_meta_add_breadcrumb(
array('link' =>
'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure=' . $pure,
'text' => __('Reporting')));
//ui_meta_add_breadcrumb(
//array('link' =>
// 'index.php?sec=reporting&sec2=godmode/reporting/reporting_builder&pure=' . $pure,
//'text' => __('Reporting')));
ui_meta_print_page_header($nav_bar);
//ui_meta_print_page_header($nav_bar);
// Print header
ui_meta_print_header(__('Reporting'). $textReportName, "", $buttons);
//ui_meta_print_header(__('Reporting'). $textReportName, "", $buttons);
}
else {
ui_print_page_header(__('Reporting') . $textReportName,

View File

@ -747,11 +747,49 @@ CREATE TABLE tmodule_group (
CREATE SEQUENCE tmodule_group_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER tmodule_group_inc BEFORE INSERT ON tmodule_group REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tmodule_group_s.nextval INTO :NEW.id_mg FROM dual; END;;
-- This table was moved cause the `tmodule_relationship` will add
-- a foreign key for the trecon_task(id_rt)
-- ----------------------------------------------------------------------
-- Table `trecon_task`
-- ----------------------------------------------------------------------
CREATE TABLE trecon_task (
id_rt NUMBER(10, 0) PRIMARY KEY,
name VARCHAR2(100) DEFAULT '',
description VARCHAR2(250) DEFAULT '',
subnet CLOB DEFAULT NULL,
id_network_profile NUMBER(10, 0) DEFAULT 0,
create_incident NUMBER(10, 0) DEFAULT 0,
id_group NUMBER(10, 0) DEFAULT 1,
utimestamp NUMBER(19, 0) DEFAULT 0,
status NUMBER(10, 0) DEFAULT 0,
interval_sweep NUMBER(10, 0) DEFAULT 0,
id_recon_server NUMBER(10, 0) DEFAULT 0,
id_os NUMBER(10, 0) DEFAULT 0,
recon_ports VARCHAR2(250) DEFAULT '',
snmp_community VARCHAR2(64) DEFAULT 'public',
id_recon_script NUMBER(10, 0),
field1 CLOB DEFAULT NULL,
field2 VARCHAR2(250) DEFAULT '',
field3 VARCHAR2(250) DEFAULT '',
field4 VARCHAR2(250) DEFAULT '',
os_detect NUMBER(5, 0) DEFAULT 1,
resolve_names NUMBER(5, 0) DEFAULT 1,
parent_detection NUMBER(5, 0) DEFAULT 1,
parent_recursion NUMBER(5, 0) DEFAULT 1,
disabled NUMBER(5, 0) DEFAULT 1,
macros CLOB DEFAULT ''
);
CREATE INDEX trecon_task_id_rec_serv_idx ON trecon_task(id_recon_server);
CREATE SEQUENCE trecon_task_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER trecon_task_inc BEFORE INSERT ON trecon_task REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT trecon_task_s.nextval INTO :NEW.id_rt FROM dual; END trecon_task_inc;;
-- ----------------------------------------------------------------------
-- Table `tmodule_relationship`
-- ----------------------------------------------------------------------
CREATE TABLE tmodule_relationship (
id NUMBER(10, 0) PRIMARY KEY,
id_rt NUMBER(10, 0) DEFAULT 0 REFERENCES trecon_task(id_rt) ON DELETE CASCADE,
module_a NUMBER(10, 0) REFERENCES tagente_modulo(id_agente_modulo) ON DELETE CASCADE,
module_b NUMBER(10, 0) REFERENCES tagente_modulo(id_agente_modulo) ON DELETE CASCADE,
disable_update NUMBER(1, 0) DEFAULT 0
@ -927,41 +965,6 @@ CREATE TABLE trecon_script (
CREATE SEQUENCE trecon_script_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER trecon_script_inc BEFORE INSERT ON trecon_script REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT trecon_script_s.nextval INTO :NEW.id_recon_script FROM dual; END;;
-- ----------------------------------------------------------------------
-- Table `trecon_task`
-- ----------------------------------------------------------------------
CREATE TABLE trecon_task (
id_rt NUMBER(10, 0) PRIMARY KEY,
name VARCHAR2(100) DEFAULT '',
description VARCHAR2(250) DEFAULT '',
subnet CLOB DEFAULT NULL,
id_network_profile NUMBER(10, 0) DEFAULT 0,
create_incident NUMBER(10, 0) DEFAULT 0,
id_group NUMBER(10, 0) DEFAULT 1,
utimestamp NUMBER(19, 0) DEFAULT 0,
status NUMBER(10, 0) DEFAULT 0,
interval_sweep NUMBER(10, 0) DEFAULT 0,
id_recon_server NUMBER(10, 0) DEFAULT 0,
id_os NUMBER(10, 0) DEFAULT 0,
recon_ports VARCHAR2(250) DEFAULT '',
snmp_community VARCHAR2(64) DEFAULT 'public',
id_recon_script NUMBER(10, 0),
field1 CLOB DEFAULT NULL,
field2 VARCHAR2(250) DEFAULT '',
field3 VARCHAR2(250) DEFAULT '',
field4 VARCHAR2(250) DEFAULT '',
os_detect NUMBER(5, 0) DEFAULT 1,
resolve_names NUMBER(5, 0) DEFAULT 1,
parent_detection NUMBER(5, 0) DEFAULT 1,
parent_recursion NUMBER(5, 0) DEFAULT 1,
disabled NUMBER(5, 0) DEFAULT 1,
macros CLOB DEFAULT ''
);
CREATE INDEX trecon_task_id_rec_serv_idx ON trecon_task(id_recon_server);
CREATE SEQUENCE trecon_task_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER trecon_task_inc BEFORE INSERT ON trecon_task REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT trecon_task_s.nextval INTO :NEW.id_rt FROM dual; END trecon_task_inc;;
-- ----------------------------------------------------------------------
-- Table `tserver`
-- ----------------------------------------------------------------------

View File

@ -600,11 +600,47 @@ CREATE TABLE "tmodule_group" (
"name" varchar(150) NOT NULL default ''
);
-- This table was moved cause the "tmodule_relationship" will add
-- a foreign key for the trecon_task(id_rt)
-- ---------------------------------------------------------------------
-- Table `trecon_task`
-- ---------------------------------------------------------------------
CREATE TABLE "trecon_task" (
"id_rt" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL default '',
"description" varchar(250) NOT NULL default '',
"subnet" TEXT default NULL,
"id_network_profile" INTEGER NOT NULL default 0,
"create_incident" INTEGER NOT NULL default 0,
"id_group" INTEGER NOT NULL default 1,
"utimestamp" BIGINT NOT NULL default 0,
"status" INTEGER NOT NULL default 0,
"interval_sweep" INTEGER NOT NULL default 0,
"id_recon_server" INTEGER NOT NULL default 0,
"id_os" INTEGER NOT NULL default 0,
"recon_ports" varchar(250) NOT NULL default '',
"snmp_community" varchar(64) NOT NULL default 'public',
"id_recon_script" INTEGER,
"field1" TEXT default NULL,
"field2" varchar(250) NOT NULL default '',
"field3" varchar(250) NOT NULL default '',
"field4" varchar(250) NOT NULL default '',
"os_detect" SMALLINT NOT NULL default 1,
"resolve_names" SMALLINT NOT NULL default 1,
"parent_detection" SMALLINT NOT NULL default 1,
"parent_recursion" SMALLINT NOT NULL default 1,
"disabled" SMALLINT NOT NULL default 1,
"macros" TEXT NOT NULL default ''
);
CREATE INDEX "trecon_task_id_recon_server_idx" ON "trecon_task"("id_recon_server");
-- ----------------------------------------------------------------------
-- Table `tmodule_relationship`
-- ----------------------------------------------------------------------
CREATE TABLE "tmodule_relationship" (
"id" SERIAL NOT NULL PRIMARY KEY,
"id_rt" INTEGER NOT NULL REFERENCES trecon_task("id_rt")
ON DELETE CASCADE,
"module_a" INTEGER NOT NULL REFERENCES tagente_modulo("id_agente_modulo")
ON DELETE CASCADE,
"module_b" INTEGER NOT NULL REFERENCES tagente_modulo("id_agente_modulo")
@ -758,38 +794,6 @@ CREATE TABLE "trecon_script" (
"macros" TEXT NOT NULL default ''
);
-- ---------------------------------------------------------------------
-- Table `trecon_task`
-- ---------------------------------------------------------------------
CREATE TABLE "trecon_task" (
"id_rt" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL default '',
"description" varchar(250) NOT NULL default '',
"subnet" TEXT default NULL,
"id_network_profile" INTEGER NOT NULL default 0,
"create_incident" INTEGER NOT NULL default 0,
"id_group" INTEGER NOT NULL default 1,
"utimestamp" BIGINT NOT NULL default 0,
"status" INTEGER NOT NULL default 0,
"interval_sweep" INTEGER NOT NULL default 0,
"id_recon_server" INTEGER NOT NULL default 0,
"id_os" INTEGER NOT NULL default 0,
"recon_ports" varchar(250) NOT NULL default '',
"snmp_community" varchar(64) NOT NULL default 'public',
"id_recon_script" INTEGER,
"field1" TEXT default NULL,
"field2" varchar(250) NOT NULL default '',
"field3" varchar(250) NOT NULL default '',
"field4" varchar(250) NOT NULL default '',
"os_detect" SMALLINT NOT NULL default 1,
"resolve_names" SMALLINT NOT NULL default 1,
"parent_detection" SMALLINT NOT NULL default 1,
"parent_recursion" SMALLINT NOT NULL default 1,
"disabled" SMALLINT NOT NULL default 1,
"macros" TEXT NOT NULL default ''
);
CREATE INDEX "trecon_task_id_recon_server_idx" ON "trecon_task"("id_recon_server");
CREATE TABLE "tserver" (
"id_server" SERIAL NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL default '',

View File

@ -653,6 +653,41 @@ CREATE TABLE IF NOT EXISTS `tmodule_group` (
PRIMARY KEY (`id_mg`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- This table was moved cause the `tmodule_relationship` will add
-- a foreign key for the trecon_task(id_rt)
-- ----------------------------------------------------------------------
-- Table `trecon_task`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `trecon_task` (
`id_rt` int(10) unsigned NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`description` varchar(250) NOT NULL default '',
`subnet` text NOT NULL,
`id_network_profile` int(10) unsigned NOT NULL default '0',
`create_incident` tinyint(3) unsigned NOT NULL default '0',
`id_group` int(10) unsigned NOT NULL default '1',
`utimestamp` bigint(20) unsigned NOT NULL default '0',
`status` tinyint(4) NOT NULL default '0',
`interval_sweep` int(10) unsigned NOT NULL default '0',
`id_recon_server` int(10) unsigned NOT NULL default '0',
`id_os` tinyint(4) NOT NULL default '0',
`recon_ports` varchar(250) NOT NULL default '',
`snmp_community` varchar(64) NOT NULL default 'public',
`id_recon_script` int(10),
`field1` text NOT NULL,
`field2` varchar(250) NOT NULL default '',
`field3` varchar(250) NOT NULL default '',
`field4` varchar(250) NOT NULL default '',
`os_detect` tinyint(1) unsigned default '0',
`resolve_names` tinyint(1) unsigned default '0',
`parent_detection` tinyint(1) unsigned default '0',
`parent_recursion` tinyint(1) unsigned default '0',
`disabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
`macros` TEXT,
PRIMARY KEY (`id_rt`),
KEY `recon_task_daemon` (`id_recon_server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tmodule_relationship`
-- ----------------------------------------------------------------------
@ -822,39 +857,6 @@ CREATE TABLE IF NOT EXISTS `trecon_script` (
PRIMARY KEY (`id_recon_script`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `trecon_task`
-- ----------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `trecon_task` (
`id_rt` int(10) unsigned NOT NULL auto_increment,
`name` varchar(100) NOT NULL default '',
`description` varchar(250) NOT NULL default '',
`subnet` text NOT NULL,
`id_network_profile` int(10) unsigned NOT NULL default '0',
`create_incident` tinyint(3) unsigned NOT NULL default '0',
`id_group` int(10) unsigned NOT NULL default '1',
`utimestamp` bigint(20) unsigned NOT NULL default '0',
`status` tinyint(4) NOT NULL default '0',
`interval_sweep` int(10) unsigned NOT NULL default '0',
`id_recon_server` int(10) unsigned NOT NULL default '0',
`id_os` tinyint(4) NOT NULL default '0',
`recon_ports` varchar(250) NOT NULL default '',
`snmp_community` varchar(64) NOT NULL default 'public',
`id_recon_script` int(10),
`field1` text NOT NULL,
`field2` varchar(250) NOT NULL default '',
`field3` varchar(250) NOT NULL default '',
`field4` varchar(250) NOT NULL default '',
`os_detect` tinyint(1) unsigned default '0',
`resolve_names` tinyint(1) unsigned default '0',
`parent_detection` tinyint(1) unsigned default '0',
`parent_recursion` tinyint(1) unsigned default '0',
`disabled` tinyint(1) unsigned NOT NULL DEFAULT '0',
`macros` TEXT,
PRIMARY KEY (`id_rt`),
KEY `recon_task_daemon` (`id_recon_server`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------------------------------------------------
-- Table `tserver`
-- ----------------------------------------------------------------------