diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 7512e8028a..077413031d 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-06-18 Miguel de Dios + + * operation/snmpconsole/snmp_view.php: fixed the urls and forms to + set the filters. + + MERGED FROM THE BRANCH PANDORA_4.0 + 2013-06-17 Miguel de Dios * operation/agentes/networkmap.php: fixed to create networkmaps diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index a8e3b0d401..7000ff546b 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -262,27 +262,29 @@ if ($search_string != '') { if ($free_search_string != '') { switch ($config["dbtype"]) { case "mysql": - $whereSubquery .= ' AND (source LIKE "%' . $free_search_string . '%" OR - oid LIKE "%' . $free_search_string . '%" OR - oid_custom LIKE "%' . $free_search_string . '%" OR - type_custom LIKE "%' . $free_search_string . '%" OR - value LIKE "%' . $free_search_string . '%" OR - value_custom LIKE "%' . $free_search_string . '%" OR - id_usuario LIKE "%' . $free_search_string . '%" OR - text LIKE "%' . $free_search_string . '%" OR - description LIKE "%' . $free_search_string . '%")'; + $whereSubquery .= ' + AND (source LIKE "%' . $free_search_string . '%" OR + oid LIKE "%' . $free_search_string . '%" OR + oid_custom LIKE "%' . $free_search_string . '%" OR + type_custom LIKE "%' . $free_search_string . '%" OR + value LIKE "%' . $free_search_string . '%" OR + value_custom LIKE "%' . $free_search_string . '%" OR + id_usuario LIKE "%' . $free_search_string . '%" OR + text LIKE "%' . $free_search_string . '%" OR + description LIKE "%' . $free_search_string . '%")'; break; case "postgresql": case "oracle": - $whereSubquery .= ' AND (source LIKE \'%' . $free_search_string . '%\' OR - oid LIKE \'%' . $free_search_string . '%\' OR - oid_custom LIKE \'%' . $free_search_string . '%\' OR - type_custom LIKE \'%' . $free_search_string . '%\' OR - value LIKE \'%' . $free_search_string . '%\' OR - value_custom LIKE \'%' . $free_search_string . '%\' OR - id_usuario LIKE \'%' . $free_search_string . '%\' OR - text LIKE \'%' . $free_search_string . '%\' OR - description LIKE \'%' . $free_search_string . '%\')'; + $whereSubquery .= ' + AND (source LIKE \'%' . $free_search_string . '%\' OR + oid LIKE \'%' . $free_search_string . '%\' OR + oid_custom LIKE \'%' . $free_search_string . '%\' OR + type_custom LIKE \'%' . $free_search_string . '%\' OR + value LIKE \'%' . $free_search_string . '%\' OR + value_custom LIKE \'%' . $free_search_string . '%\' OR + id_usuario LIKE \'%' . $free_search_string . '%\' OR + text LIKE \'%' . $free_search_string . '%\' OR + description LIKE \'%' . $free_search_string . '%\')'; break; } } @@ -393,8 +395,8 @@ $trapcount = db_get_sql (" FROM ttrap " . $whereSubquery); -$urlPagination = "index.php?" . - "sec=estado&" . +$url_snmp = "index.php?" . + "sec=snmpconsole&" . "sec2=operation/snmpconsole/snmp_view&" . "filter_agent=" . $filter_agent . "&" . "filter_oid=" . $filter_oid . "&" . @@ -402,14 +404,15 @@ $urlPagination = "index.php?" . "filter_fired=" . $filter_fired . "&" . "filter_status=" . $filter_status . "&" . "search_string=" . $search_string . "&" . - "pagination=" . $pagination . "&" . - "offset=" . $offset . "&" . "refr=" . ((int)get_parameter('refr', 0)) . "&" . "pure=" . $config["pure"] . "&" . "search_string=" . $search_string; + +$urlPagination = $url_snmp . "&pagination=" . $pagination . "&offset=" . $offset; + ui_pagination ($trapcount, $urlPagination, $offset, $pagination); -echo '
'; +echo ''; $table->cellpadding = 4; $table->cellspacing = 4; @@ -554,10 +557,10 @@ if ($traps !== false) { $data[8] = ""; if (empty ($trap["status"]) && check_acl ($config["id_user"], 0, "IW")) { - $data[8] .= '' . html_print_image("images/ok.png", true, array("border" => '0', "title" => __('Validate'))) . ' '; + $data[8] .= '' . html_print_image("images/ok.png", true, array("border" => '0', "title" => __('Validate'))) . ' '; } if (check_acl ($config["id_user"], 0, "IM")) { - $data[8] .= '' . html_print_image("images/cross.png", true, array("border" => "0", "title" => __('Delete'))) . ' '; + $data[8] .= '' . html_print_image("images/cross.png", true, array("border" => "0", "title" => __('Delete'))) . ' '; } $data[8] .= '' . html_print_image("images/eye.png", true, array("alt" => __('Show more'), "title" => __('Show more'))) .''; @@ -567,11 +570,20 @@ if ($traps !== false) { //Hiden file for description $string = ' - ' - . ''; + + + + + + + + '; if ($trap["description"] != "") { - $string .= ''; + $string .= ' + + + '; } if ($trap["type"] != "") { @@ -618,7 +630,7 @@ if ($traps !== false) { // No matching traps if ($idx == 0) { - echo '
'.__('No matching traps found').'
'; + echo '
' . __('No matching traps found') . '
'; } else { html_print_table ($table); @@ -667,33 +679,33 @@ echo '
 
'; ?>
' . __('Custom data:') . '' . $trap['oid_custom'] . '
' . '' . __('OID:') . ' ' . $trap['oid'] . '
' . __('Custom data:') . '' . $trap['oid_custom'] . '
' . '' . __('OID:') . ' ' . $trap['oid'] . '
' . '' . __('Description:') . '' . $trap['description'] . '
' . '' . __('Description:') . '' . $trap['description'] . '