diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index cd4c5d898d..8dd48a88a9 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-07-14 Juan Manuel Ramon + + * godmode/alerts/alert_list.list.php + include/functions_ui.php: Changed length on module name and template + column in function ui_format_alert_row(). + + Fixes: #3302292 + 2011-07-14 Sergio Martin * godmode/agentes/module_manager_editor_prediction.php diff --git a/pandora_console/godmode/alerts/alert_list.list.php b/pandora_console/godmode/alerts/alert_list.list.php index 04a4994a3c..c47f945b4d 100644 --- a/pandora_console/godmode/alerts/alert_list.list.php +++ b/pandora_console/godmode/alerts/alert_list.list.php @@ -384,30 +384,6 @@ foreach ($simple_alerts as $alert) { $data = array (); -/* $data[0] = '
'; - if ($alert['disabled']) { - $data[0] .= html_print_input_image ('enable', 'images/lightbulb_off.png', 1, '', true); - $data[0] .= html_print_input_hidden ('enable_alert', 1, true); - } - else { - $data[0] .= html_print_input_image ('disable', 'images/lightbulb.png', 1, '', true); - $data[0] .= html_print_input_hidden ('disable_alert', 1, true); - } - $data[0] .= html_print_input_hidden ('id_alert', $alert['id'], true); - $data[0] .= '
'; - - $data[1] = '
'; - if (!$alert['standby']) { - $data[1] .= html_print_input_image ('standby_off', 'images/bell.png', 1, '', true); - $data[1] .= html_print_input_hidden ('standbyon_alert', 1, true); - } - else { - $data[1] .= html_print_input_image ('standby_on', 'images/bell_pause.png', 1, '', true); - $data[1] .= html_print_input_hidden ('standbyoff_alert', 1, true); - } - $data[1] .= html_print_input_hidden ('id_alert', $alert['id'], true); - $data[1] .= '
'; */ - if (! $id_agente) { $id_agent = modules_get_agentmodule_agent ($alert['id_agent_module']); $data[0] = ''; @@ -426,20 +402,7 @@ foreach ($simple_alerts as $alert) { $data[2] .= ""; $data[2] .= ui_print_truncate_text(alerts_get_alert_template_name ($alert['id_alert_template']), 55, false, true, true, '[…]', 'font-size: 7.1pt'); $data[2] .= ""; - -/* if ($isFunctionPolicies !== ENTERPRISE_NOT_HOOK) { - $policyInfo = policies_is_alert_in_policy2($alert['id'], false); - if ($policyInfo === false) - $data[5] = ''; - else { - $img = 'images/policies.png'; - - $data[5] = '' . - html_print_image($img,true, array('title' => $policyInfo['name'])) . - ''; - } - } */ - + $actions = alerts_get_alert_agent_module_actions ($alert['id']); $data[3] = ''; diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 1366238583..97cd91490e 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -553,7 +553,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = ' } } elseif ($agent == 0) { - $data[$index['module_name']] .= mb_substr (modules_get_agentmodule_name ($alert["id_agent_module"]), 0, 20); + $data[$index['module_name']] .= ui_print_truncate_text(modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt'); } else { if ($agent_style !== false) { @@ -562,7 +562,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = ' else { $data[$index['agent_name']] .= ui_print_agent_name (modules_get_agentmodule_agent ($alert["id_agent_module"]), true, 20, $styleDisabled); } - $data[$index['module_name']] = mb_substr (modules_get_agentmodule_name ($alert["id_agent_module"]), 0, 20); + $data[$index['module_name']] = ui_print_truncate_text (modules_get_agentmodule_name ($alert["id_agent_module"]), 30, false, true, true, '[…]', 'font-size: 7.2pt'); } $data[$index['agent_name']] .= $disabledHtmlEnd; @@ -577,7 +577,7 @@ function ui_format_alert_row ($alert, $compound = false, $agent = true, $url = ' else { $actionDefault = db_get_value_sql("SELECT id_alert_action FROM talert_compound_actions WHERE id_alert_compound = " . $alert['id']); } - $data[$index['description']] .= $disabledHtmlStart . mb_substr (io_safe_input ($description), 0, 35) . $disabledHtmlEnd; + $data[$index['description']] .= $disabledHtmlStart . ui_print_truncate_text (io_safe_input ($description), 35, false, true, true, '[…]', 'font-size: 7.1pt') . $disabledHtmlEnd; $actions = alerts_get_alert_agent_module_actions ($alert['id'], false, $compound);