2012-01-10 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.sql pandoradb.oracle.sql pandoradb.postgreSQL.sql extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql godmode/netflow/nf_edit_form.php operation/netflow/nf_view.php: Changes in output format of netflow. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5339 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
ed64ae9ae7
commit
ad38df3345
|
@ -1,3 +1,14 @@
|
|||
2012-01-10 Vanessa Gil <vanessa.gil@artica.es>
|
||||
* pandoradb.sql
|
||||
pandoradb.oracle.sql
|
||||
pandoradb.postgreSQL.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql
|
||||
godmode/netflow/nf_edit_form.php
|
||||
operation/netflow/nf_view.php: Changes in output format
|
||||
of netflow.
|
||||
|
||||
2012-01-10 Vanessa Gil <vanessa.gil@artica.es>
|
||||
* operation/netflow/nf_view.php: Fixed filter
|
||||
netflow.
|
||||
|
|
|
@ -11,10 +11,7 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
|
|||
`dst_port` varchar(100),
|
||||
`src_port` varchar(100),
|
||||
`aggregate` varchar(60),
|
||||
`show_packets` int(1) default '0',
|
||||
`show_bytes` int(1) default '0',
|
||||
`show_bps` int(1) default '0',
|
||||
`show_bpp` int(1) default '0',
|
||||
`output` varchar(60),
|
||||
PRIMARY KEY (`id_sg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
|
@ -4,6 +4,25 @@
|
|||
|
||||
alter table tusuario add (disabled NUMBER(10,0) default 0 NOT NULL);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table "tnetflow_filter"
|
||||
-- -----------------------------------------------------
|
||||
|
||||
CREATE TABLE tnetflow_filter (
|
||||
id_sg NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||
id_name VARCHAR2(100) NOT NULL,
|
||||
"group" VARCHAR2(50),
|
||||
ip_dst VARCHAR2(100),
|
||||
ip_src VARCHAR2(100),
|
||||
dst_port VARCHAR2(100),
|
||||
src_port VARCHAR2(100),
|
||||
aggregate VARCHAR2(60),
|
||||
output VARCHAR2(60)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE tnetflow_filter_s INCREMENT BY 1 START WITH 1;
|
||||
CREATE OR REPLACE TRIGGER tnetflow_filter_inc BEFORE INSERT ON tnetflow_filter REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT tnetflow_filter_s.nextval INTO :NEW.ID_SG FROM dual; END tnetflow_filter_inc;;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table "tnetflow_report"
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -16,10 +16,7 @@ CREATE TABLE "tnetflow_filter" (
|
|||
"dst_port" varchar(100),
|
||||
"src_port" varchar(100),
|
||||
"aggregate" varchar(60),
|
||||
"show_packets" SMALLINT default 0,
|
||||
"show_bytes" SMALLINT default 0,
|
||||
"show_bps" SMALLINT default 0,
|
||||
"show_bpp" SMALLINT default 0
|
||||
"output" varchar(60)
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -56,10 +56,7 @@ if ($id) {
|
|||
$dst_port = $filter['dst_port'];
|
||||
$src_port = $filter['src_port'];
|
||||
$aggregate = $filter['aggregate'];
|
||||
$show_packets = $filter['show_packets'];
|
||||
$show_bytes = $filter['show_bytes'];
|
||||
$show_bps = $filter['show_bps'];
|
||||
$show_bpp = $filter['show_bpp'];
|
||||
$output = $filter['output'];
|
||||
|
||||
} else {
|
||||
$name = '';
|
||||
|
@ -69,21 +66,14 @@ if ($id) {
|
|||
$dst_port = '';
|
||||
$src_port = '';
|
||||
$aggregate = 'none';
|
||||
$show_packets = '';
|
||||
$show_bytes = 1;
|
||||
$show_bps = '';
|
||||
$show_bpp = '';
|
||||
|
||||
$output = 'bytes';
|
||||
}
|
||||
|
||||
if ($update) {
|
||||
$name = (string) get_parameter ('name');
|
||||
$assign_group = (int) get_parameter ('assign_group');
|
||||
$aggregate = get_parameter('aggregate','');
|
||||
$show_packets = (bool)get_parameter('show_packets');
|
||||
$show_bytes = (bool)get_parameter('show_bytes');
|
||||
$show_bps = (bool)get_parameter('show_bps');
|
||||
$show_bpp = (bool)get_parameter('show_bpp');
|
||||
$output = get_parameter('output','bytes');
|
||||
$ip_dst = get_parameter('ip_dst','');
|
||||
$ip_src = get_parameter('ip_src','');
|
||||
$dst_port = get_parameter('dst_port','');
|
||||
|
@ -117,10 +107,7 @@ if ($create){
|
|||
$name = (string) get_parameter ('name');
|
||||
$assign_group = (int) get_parameter ('assign_group');
|
||||
$aggregate = get_parameter('aggregate','none');
|
||||
$show_packets = (bool)get_parameter('show_packets',0);
|
||||
$show_bytes = (bool)get_parameter('show_bytes',1);
|
||||
$show_bps = (bool)get_parameter('show_bps',0);
|
||||
$show_bpp = (bool)get_parameter('show_bpp',0);
|
||||
$output = get_parameter('output','bytes');
|
||||
$ip_dst = get_parameter('ip_dst','');
|
||||
$ip_src = get_parameter('ip_src','');
|
||||
$dst_port = get_parameter('dst_port','');
|
||||
|
@ -137,10 +124,7 @@ if ($create){
|
|||
'dst_port'=>$dst_port,
|
||||
'src_port'=>$src_port,
|
||||
'aggregate'=>$aggregate,
|
||||
'show_packets'=>$show_packets,
|
||||
'show_bytes'=>$show_bytes,
|
||||
'show_bps'=>$show_bps,
|
||||
'show_bpp'=>$show_bpp
|
||||
'output'=>$output
|
||||
);
|
||||
$result = db_process_sql_insert('tnetflow_filter', $values);
|
||||
}
|
||||
|
@ -190,15 +174,9 @@ $aggregate_list = array ('none' => __('None'), 'proto' => __('Protocol'), 'srcip
|
|||
$table->data[7][1] = html_print_select ($aggregate_list, "aggregate", $aggregate, '', '', 0, true, false, true, '', false);
|
||||
|
||||
$table->data[8][0] = '<b>'.__('Output format').'</b>';
|
||||
|
||||
$table->data[8][1] = __('Packets');
|
||||
$table->data[8][1] .= html_print_checkbox ('show_packets', 1, $show_packets, true);
|
||||
$table->data[8][1] .= __('Bytes');
|
||||
$table->data[8][1] .= html_print_checkbox ('show_bytes', 1, $show_bytes, true);
|
||||
$table->data[8][1] .= __('Bits per second');
|
||||
$table->data[8][1] .= html_print_checkbox ('show_bps', 1, $show_bps, true);
|
||||
$table->data[8][1] .= __('Bytes per packet');
|
||||
$table->data[8][1] .= html_print_checkbox ('show_bpp', 1, $show_bpp, true);
|
||||
$show_output = array();
|
||||
$show_output = array ('packets' => __('Packets'), 'bytes' => __('Bytes'), 'bps' =>__('Bits per second'), 'bpp' =>__('Bytes per packet'));
|
||||
$table->data[8][1] = html_print_select ($show_output, 'output', $output, '', '', 0, true, false, true, '', false);
|
||||
|
||||
echo '<form method="post" action="index.php?sec=netf&sec2=godmode/netflow/nf_edit_form">';
|
||||
html_print_table ($table);
|
||||
|
|
|
@ -285,10 +285,7 @@ if ($id!=''){
|
|||
$dst_port = $result['dst_port'];
|
||||
$src_port = $result['src_port'];
|
||||
$aggregate = $result['aggregate'];
|
||||
$show_packets = $result['show_packets'];
|
||||
$show_bytes = $result['show_bytes'];
|
||||
$show_bps = $result['show_bps'];
|
||||
$show_bpp = $result['show_bpp'];
|
||||
$show = $result['output'];
|
||||
|
||||
if(isset($ip_dst)){
|
||||
$val_ipdst = explode(',',$ip_dst);
|
||||
|
@ -389,15 +386,6 @@ if ($id!=''){
|
|||
$command .= $filter;
|
||||
}
|
||||
|
||||
if ($show_packets)
|
||||
$show = 'packets';
|
||||
if ($show_bytes)
|
||||
$show = 'bytes';
|
||||
if ($show_bps)
|
||||
$show = 'bps';
|
||||
if ($show_bpp)
|
||||
$show = 'bpp';
|
||||
|
||||
// Data iterator
|
||||
$j = 0;
|
||||
$values = array();
|
||||
|
|
|
@ -1489,10 +1489,7 @@ ip_src VARCHAR2(100),
|
|||
dst_port VARCHAR2(100),
|
||||
src_port VARCHAR2(100),
|
||||
aggregate VARCHAR2(60),
|
||||
show_packets NUMBER(1, 0) default 0,
|
||||
show_bytes NUMBER(1, 0) default 0,
|
||||
show_bps NUMBER(1, 0) default 0,
|
||||
show_bpp NUMBER(1, 0) default 0
|
||||
output VARCHAR2(60)
|
||||
);
|
||||
|
||||
CREATE SEQUENCE tnetflow_filter_s INCREMENT BY 1 START WITH 1;
|
||||
|
|
|
@ -1202,10 +1202,7 @@ CREATE TABLE "tnetflow_filter" (
|
|||
"dst_port" varchar(100),
|
||||
"src_port" varchar(100),
|
||||
"aggregate" varchar(60),
|
||||
"show_packets" SMALLINT default 0,
|
||||
"show_bytes" SMALLINT default 0,
|
||||
"show_bps" SMALLINT default 0,
|
||||
"show_bpp" SMALLINT default 0
|
||||
"output" varchar(60)
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
|
|
@ -1293,10 +1293,7 @@ CREATE TABLE IF NOT EXISTS `tnetflow_filter` (
|
|||
`dst_port` varchar(100),
|
||||
`src_port` varchar(100),
|
||||
`aggregate` varchar(60),
|
||||
`show_packets` int(1) default '0',
|
||||
`show_bytes` int(1) default '0',
|
||||
`show_bps` int(1) default '0',
|
||||
`show_bpp` int(1) default '0',
|
||||
`output` varchar(60),
|
||||
PRIMARY KEY (`id_sg`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
|
Loading…
Reference in New Issue