From aa8c4cd27655b99055c3e63e4e8edecfa6d53daf Mon Sep 17 00:00:00 2001 From: vgilc Date: Wed, 21 Dec 2011 13:00:38 +0000 Subject: [PATCH] 2011-12-21 Vanessa Gil * godmode/menu.php godmode/setup/setup.php include/functions_config.php include/functions_graph.php include/styles/menu.css operation/menu.php pandoradb.data.oracle.sql pandoradb.data.postgreSQL.sql pandoradb.data.sql added files: operation/netflow/nf_reporting.php operation/netflow/nf_view.php godmode/netflow/nf_edit.php godmode/netflow/nf_edit_form.php godmode/netflow/nf_report.php godmode/netflow/nf_report_form.php godmode/netflow/nf_report_item.php godmode/netflow/nf_item_list.php godmode/netflow/nf_manage.php godmode/netflow/nf_option_form.php images/networkmap/so_cisco_new.png: Netflow traffic monitoring. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5288 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/godmode/menu.php | 19 +++++++- .../godmode/reporting/graph_builder.php | 1 + pandora_console/godmode/setup/setup.php | 46 ++++++++++--------- 3 files changed, 44 insertions(+), 22 deletions(-) diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index ed3cc7caca..9141285a0c 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -199,7 +199,7 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu["gtag"]["text"] = __('Manage tags'); $menu["gtag"]["sec2"] = "godmode/tag/tag"; $menu["gtag"]["id"] = "god-tag"; - + // Setup $menu["gsetup"]["text"] = __('Setup'); $menu["gsetup"]["sec2"] = "godmode/setup/setup"; @@ -211,6 +211,8 @@ if (check_acl ($config['id_user'], 0, "PM")) { $sub["godmode/setup/performance"]["text"] = __('Performance'); $sub["godmode/setup/setup_visuals"]["text"] = __('Visual styles'); $sub["godmode/setup/file_manager"]["text"] = __('File manager'); + if ($config['activate_netflow']) + $sub["godmode/netflow/nf_manage"]["text"] = __('Netflow'); if ($config['activate_gis']) $sub["godmode/setup/gis"]["text"] = __('Map conections GIS'); $sub["godmode/setup/links"]["text"] = __('Links'); @@ -224,6 +226,21 @@ if (check_acl ($config['id_user'], 0, "PM")) { $menu["gsetup"]["sub"] = $sub; } +if (check_acl ($config['id_user'], 0, "AW")) { + if ($config['activate_netflow']) { + //Netflow + $menu["netf"]["text"] = __('Netflow'); + $menu["netf"]["sec2"] = "godmode/netflow/nf_report"; + $menu["netf"]["id"] = "god-netflow"; + + $sub = array (); + + $sub["godmode/netflow/nf_edit"]["text"] = __('Filters'); + $sub["godmode/netflow/nf_report"]["text"] = __('Manage reports'); + $menu["netf"]["sub"] = $sub; + } +} + if (check_acl ($config['id_user'], 0, "DM")) { $menu["gdbman"]["text"] = __('DB maintenance'); $menu["gdbman"]["sec2"] = "godmode/db/db_main"; diff --git a/pandora_console/godmode/reporting/graph_builder.php b/pandora_console/godmode/reporting/graph_builder.php index caee62aa08..9d2be086f1 100644 --- a/pandora_console/godmode/reporting/graph_builder.php +++ b/pandora_console/godmode/reporting/graph_builder.php @@ -72,6 +72,7 @@ if ($add_graph) { $events = get_parameter_post ("events"); $stacked = get_parameter ("stacked", 0); $period = get_parameter_post ("period"); + // Create graph $values = array( 'id_user' => $config['id_user'], 'name' => $name, 'description' => $description, 'period' => $period, 'width' => $width, 'height' => $height, diff --git a/pandora_console/godmode/setup/setup.php b/pandora_console/godmode/setup/setup.php index af3d109420..f5f54cafea 100644 --- a/pandora_console/godmode/setup/setup.php +++ b/pandora_console/godmode/setup/setup.php @@ -116,6 +116,10 @@ $table->data[18][0] = __('Enable Integria incidents in Pandora Console'); $table->data[18][1] = __('Yes').' '.html_print_radio_button ('integria_enabled', 1, '', $config["integria_enabled"], true).'  '; $table->data[18][1] .= __('No').' '.html_print_radio_button ('integria_enabled', 0, '', $config["integria_enabled"], true); +$table->data[19][0] = __('Enable Netflow'); +$table->data[19][1] = __('Yes').' '.html_print_radio_button ('activate_netflow', 1, '', $config["activate_netflow"], true).'  '; +$table->data[19][1] .= __('No').' '.html_print_radio_button ('activate_netflow', 0, '', $config["activate_netflow"], true); + if($config["integria_enabled"]) { require_once('include/functions_incidents.php'); $invent = incidents_call_api($config['integria_url']."/include/api.php?user=".$config['id_user']."&pass=".$config['integria_api_password']."&op=get_inventories"); @@ -149,15 +153,15 @@ if($config["integria_enabled"]) { } } } - $table->data[19][0] = __('Integria URL') . ui_print_help_icon ("integria_url", true); - $table->data[19][1] = html_print_input_text ('integria_url', $config["integria_url"], '', 25, 255, true); + $table->data[20][0] = __('Integria URL') . ui_print_help_icon ("integria_url", true); + $table->data[20][1] = html_print_input_text ('integria_url', $config["integria_url"], '', 25, 255, true); // If something goes wrong if ($bad_input){ - $table->data[19][1] .= html_print_image('images/error.png', true, array('title' => __('URL and/or Integria password are incorrect'))); + $table->data[20][1] .= html_print_image('images/error.png', true, array('title' => __('URL and/or Integria password are incorrect'))); } - $table->data[20][0] = __('Integria API password'); - $table->data[20][1] = html_print_input_text ('integria_api_password', $config["integria_api_password"], '', 25, 25, true); + $table->data[21][0] = __('Integria API password'); + $table->data[21][1] = html_print_input_text ('integria_api_password', $config["integria_api_password"], '', 25, 25, true); if (!$bad_input){ foreach($invent as $inv) { @@ -172,28 +176,28 @@ if($config["integria_enabled"]) { $inventories[$invexp[0]] = $invexp[1]; } } - $table->data[21][0] = __('Integria inventory'); - $table->data[21][1] = html_print_select($inventories, 'integria_inventory', $config["integria_inventory"], '', '', '', true); + $table->data[22][0] = __('Integria inventory'); + $table->data[22][1] = html_print_select($inventories, 'integria_inventory', $config["integria_inventory"], '', '', '', true); } -$table->data[22][0] = __('Timezone setup'); -$table->data[22][1] = html_print_input_text ('timezone', $config["timezone"], '', 25, 25, true); +$table->data[23][0] = __('Timezone setup'); +$table->data[23][1] = html_print_input_text ('timezone', $config["timezone"], '', 25, 25, true); $sounds = get_sounds(); -$table->data[23][0] = __('Sound for Alert fired'); -$table->data[23][1] = html_print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true); -$table->data[23][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_alert", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[23][1] .= '
'; +$table->data[24][0] = __('Sound for Alert fired'); +$table->data[24][1] = html_print_select($sounds, 'sound_alert', $config['sound_alert'], 'replaySound(\'alert\');', '', '', true); +$table->data[24][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_alert", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[24][1] .= '
'; -$table->data[24][0] = __('Sound for Monitor critical'); -$table->data[24][1] = html_print_select($sounds, 'sound_critical', $config['sound_critical'], 'replaySound(\'critical\');', '', '', true); -$table->data[24][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_critical", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[24][1] .= '
'; +$table->data[25][0] = __('Sound for Monitor critical'); +$table->data[25][1] = html_print_select($sounds, 'sound_critical', $config['sound_critical'], 'replaySound(\'critical\');', '', '', true); +$table->data[25][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_critical", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[25][1] .= '
'; -$table->data[25][0] = __('Sound for Monitor warning'); -$table->data[25][1] = html_print_select($sounds, 'sound_warning', $config['sound_warning'], 'replaySound(\'warning\');', '', '', true); -$table->data[25][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_warning", "style" => "vertical-align: middle;", "width" => "16")) . ''; -$table->data[25][1] .= '
'; +$table->data[26][0] = __('Sound for Monitor warning'); +$table->data[26][1] = html_print_select($sounds, 'sound_warning', $config['sound_warning'], 'replaySound(\'warning\');', '', '', true); +$table->data[26][1] .= ' ' . html_print_image("images/control_play.png", true, array("id" => "button_sound_warning", "style" => "vertical-align: middle;", "width" => "16")) . ''; +$table->data[26][1] .= '
'; ?>