From 6965af931f6631f412c99ec3b2ca1d80103f19d1 Mon Sep 17 00:00:00 2001 From: Ramon Novoa Date: Wed, 4 Feb 2009 18:47:59 +0000 Subject: [PATCH] 2009-02-04 Ramon Novoa * include/functions_db.php, godmode/snmpconsole/snmp_alert.php: Fixed SNMP alerts. * operation/snmpconsole/snmp_view.php: Show Custom OID as a tooltip. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1424 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 +++++++ pandora_console/godmode/snmpconsole/snmp_alert.php | 4 ++-- pandora_console/include/functions_db.php | 2 +- pandora_console/operation/snmpconsole/snmp_view.php | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 129c9ff86c..bb5a1972a8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2009-02-04 Ramon Novoa + + * include/functions_db.php, + godmode/snmpconsole/snmp_alert.php: Fixed SNMP alerts. + + * operation/snmpconsole/snmp_view.php: Show Custom OID as a tooltip. + 2009-02-04 Esteban Sanchez * general/main_menu.php: The menu has been rewritten to be more diff --git a/pandora_console/godmode/snmpconsole/snmp_alert.php b/pandora_console/godmode/snmpconsole/snmp_alert.php index c8c82b0b00..2bcd9e2cc3 100644 --- a/pandora_console/godmode/snmpconsole/snmp_alert.php +++ b/pandora_console/godmode/snmpconsole/snmp_alert.php @@ -148,13 +148,13 @@ if (isset ($_GET["update_alert"])) { echo ''.__('Alert type').''; $fields = array (); - $result = get_db_all_rows_in_table ("talerta", "nombre"); + $result = get_db_all_rows_in_table ("talert_templates", "name"); if ($result === false) { $result = array (); } foreach ($result as $row) { - $fields[$row["id_alerta"]] = $row["nombre"]; + $fields[$row["id"]] = $row["name"]; } print_select ($fields, "alert_type", $alert_type, '', '', '0', false, false, false); diff --git a/pandora_console/include/functions_db.php b/pandora_console/include/functions_db.php index 9bca4d4ae7..c5fa4de2ff 100644 --- a/pandora_console/include/functions_db.php +++ b/pandora_console/include/functions_db.php @@ -511,7 +511,7 @@ function get_agent_name ($id_agent, $case = "upper") { * @return string Type name of the alert. */ function get_alert_type ($id_type) { - return (string) get_db_value ('nombre', 'talerta', 'id_alerta', (int) $id_type); + return (string) get_db_value ('name', 'talert_templates', 'id', (int) $id_type); } /** diff --git a/pandora_console/operation/snmpconsole/snmp_view.php b/pandora_console/operation/snmpconsole/snmp_view.php index 2c9fda8c62..6c6a055145 100644 --- a/pandora_console/operation/snmpconsole/snmp_view.php +++ b/pandora_console/operation/snmpconsole/snmp_view.php @@ -309,7 +309,7 @@ foreach ($traps as $trap) { } //Custom - $data[4] = $trap["value_custom"]; + $data[4] = '' . $trap["value_custom"] . ''; if (empty ($data[4])) { $data[4] = __('N/A');