diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 2c13076113..b206f45dc3 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2012-04-02 Dario Rodriguez + + * operation/menu.php, + operation/snmpconsole/snmp_view.php, + godmode/menu.php, + godmode/snmpconsole/snmp_trap_generator.php, + godmode/snmpconsole/snmp_alert.php, + godmode/snmpconsole/snmp_filters.php: Merged changes in menus from 4.0.2 + SNMP menu now is inside Monitoring menu. + 2012-04-02 Miguel de Dios * include/functions_html.php: added into function "html_debug_print" the diff --git a/pandora_console/godmode/menu.php b/pandora_console/godmode/menu.php index 97ebfc0b82..f6cfd7fab2 100644 --- a/pandora_console/godmode/menu.php +++ b/pandora_console/godmode/menu.php @@ -114,22 +114,6 @@ if (check_acl ($config['id_user'], 0, "UM")) { $menu["gusuarios"]["sub"] = $sub; } -// SNMP console -if (check_acl($config['id_user'], 0, "LW")) { - $menu["gsnmpconsole"]["text"] = __('Manage SNMP console'); - $menu["gsnmpconsole"]["sec2"] = "godmode/snmpconsole/snmp_alert"; - $menu["gsnmpconsole"]["id"] = "god-snmpc"; - - $sub = array (); - - $sub['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator'); - //$sub["godmode/snmpconsole/snmp_alert"]["text"] = __('Component groups'); - $sub['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters'); - enterprise_hook ('snmpconsole_submenu'); - - $menu["gsnmpconsole"]["sub"] = $sub; -} - // GIS if (check_acl ($config['id_user'], 0, "IW")) { diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index 8842af50b8..d024b8b23e 100644 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -190,7 +190,7 @@ if (isset ($_GET["delete_alert"])) { // Delete alert // Alert form if (isset ($_GET["update_alert"])) { //the update_alert means the form should be displayed. If update_alert > 1 then an existing alert is updated - echo '
'; + echo ''; /* SNMP alert filters */ @@ -428,7 +428,7 @@ if (isset ($_GET["update_alert"])) { foreach ($result as $row) { $data = array (); - $data[0] = '' . alerts_get_alert_action_name ($row["id_alert"]) . ''; + $data[0] = '' . alerts_get_alert_action_name ($row["id_alert"]) . ''; $data[1] = __('SNMP Agent'); $data[1] = $row["agent"]; @@ -446,9 +446,9 @@ if (isset ($_GET["update_alert"])) { $data[6] = __('Never'); } - $data[7] = '' . + $data[7] = '' . html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '' . - '  ' . + '  ' . html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . ''; $idx = count ($table->data); //The current index of the table is 1 less than the count of table data so we count before adding to table->data array_push ($table->data, $data); @@ -463,7 +463,7 @@ if (isset ($_GET["update_alert"])) { unset ($table); echo '
'; - echo ''; + echo ''; html_print_submit_button (__('Create'), "add_alert", false, 'class="sub next"'); echo "
"; diff --git a/pandora_console/godmode/snmpconsole/snmp_filters.php b/pandora_console/godmode/snmpconsole/snmp_filters.php index 084ea960a3..4d111a76bf 100644 --- a/pandora_console/godmode/snmpconsole/snmp_filters.php +++ b/pandora_console/godmode/snmpconsole/snmp_filters.php @@ -95,7 +95,7 @@ if ($edit_filter > -2) { $table->data[1][0] = __('Filter'); $table->data[1][1] = html_print_input_text ('filter', $filter, '', 60, 100, true); - echo '
'; + echo ''; html_print_input_hidden ('update_filter', $edit_filter); html_print_table ($table); echo '
'; @@ -131,11 +131,11 @@ if ($edit_filter > -2) { foreach ($result as $row) { $data = array (); - $data[0] = '' . $row['description'] . ''; + $data[0] = '' . $row['description'] . ''; $data[1] = $row['filter']; - $data[2] = '' . + $data[2] = '' . html_print_image("images/config.png", true, array("border" => '0', "alt" => __('Update'))) . '' . - '  ' . + '  ' . html_print_image("images/cross.png", true, array("border" => '0', "alt" => __('Delete'))) . ''; array_push ($table->data, $data); } @@ -147,7 +147,7 @@ if ($edit_filter > -2) { unset ($table); echo '
'; - echo ''; + echo ''; html_print_submit_button (__('Create'), 'submit_button', false, 'class="sub next"'); echo '
'; } diff --git a/pandora_console/godmode/snmpconsole/snmp_trap_generator.php b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php index 9234869f6a..d7afa32e7a 100644 --- a/pandora_console/godmode/snmpconsole/snmp_trap_generator.php +++ b/pandora_console/godmode/snmpconsole/snmp_trap_generator.php @@ -50,7 +50,7 @@ if($generate_trap) { __('Could not be generated')); } -$traps_generator = '
'; +$traps_generator = ''; $table->width = '90%'; $table->size = array (); $table->data = array (); diff --git a/pandora_console/operation/menu.php b/pandora_console/operation/menu.php index c2522437b3..88b8fa1706 100644 --- a/pandora_console/operation/menu.php +++ b/pandora_console/operation/menu.php @@ -56,9 +56,29 @@ if (check_acl ($config['id_user'], 0, "AR")) { enterprise_hook ('inventory_menu'); - $sub["operation/servers/recon_view"]["text"] = __('Recon View'); + $sub["operation/servers/recon_view"]["text"] = __('Recon view'); $sub["operation/servers/recon_view"]["refr"] = 0; + + //SNMP Console + $sub["operation/snmpconsole/snmp_view"]["text"] = __('SNMP console'); + $sub["operation/snmpconsole/snmp_view"]["refr"] = 0; + $sub["operation/snmpconsole/snmp_view"]["subsecs"] = array("enterprise/godmode/snmpconsole", + "godmode/snmpconsole/snmp_trap_editor", + "godmode/snmpconsole/snmp_alert", + "godmode/snmpconsole/snmp_filters"); + + $sub2 = array(); + + $sub2["godmode/snmpconsole/snmp_alert"]["text"] = __("SNMP alerts"); + $sub2['godmode/snmpconsole/snmp_filters']['text'] = __('SNMP filters'); + enterprise_hook ('snmpconsole_submenu'); + + $sub["operation/snmpconsole/snmp_view"]["sub2"] = $sub2; + + $sub['godmode/snmpconsole/snmp_trap_generator']['text'] = __('SNMP trap generator'); + $sub["godmode/snmpconsole/snmp_trap_generator"]["refr"] = 0; + $menu["estado"]["sub"] = $sub; //End of view agents diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index e94d122cde..bd775bf2a3 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -42,7 +42,7 @@ $pagination = (int) get_parameter ("pagination", $config["block_size"]); $offset = (int) get_parameter ('offset',0); $trap_type = (int) get_parameter ('trap_type', -1); -$url = "index.php?sec=snmpconsole&sec2=operation/snmpconsole/snmp_view&filter_agent=".$filter_agent."&filter_oid=".$filter_oid."&filter_severity=".$filter_severity."&filter_fired=".$filter_fired."&search_string=".$search_string."&free_search_string=".$free_search_string."&pagination=".$pagination."&offset=".$offset . "&trap_type=" . $trap_type; +$url = "index.php?sec=estado&sec2=operation/snmpconsole/snmp_view&filter_agent=".$filter_agent."&filter_oid=".$filter_oid."&filter_severity=".$filter_severity."&filter_fired=".$filter_fired."&search_string=".$search_string."&free_search_string=".$free_search_string."&pagination=".$pagination."&offset=".$offset . "&trap_type=" . $trap_type; if ($config["pure"]) {