From 22d12afb44b91845cedb2516c886233794f05af7 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Tue, 11 Jun 2013 15:51:28 +0000 Subject: [PATCH] 2013-06-11 Sergio Martin * include/functions_ui.php: Added node access control to alerts view in metaconsole * operation/tree.php operation/events/events.build_table.php: Visual fixes git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8291 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/include/functions_ui.php | 11 ++++++++--- .../operation/events/events.build_table.php | 7 ++++--- pandora_console/operation/tree.php | 4 ++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b1f1ed0340..b7341e4083 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2013-06-11 Sergio Martin + + * include/functions_ui.php: Added node access control to + alerts view in metaconsole + + * operation/tree.php + operation/events/events.build_table.php: Visual fixes + 2013-06-11 Miguel de Dios * operation/events/events_list.php, operation/events/events.php: diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 89bc06bbd9..424cdd8d86 100644 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -787,11 +787,16 @@ function ui_format_alert_row ($alert, $agent = true, $url = '', $agent_style = f $id_agent = modules_get_agentmodule_agent ($alert["id_agent_module"]); } - if ($agent_style !== false) { - $data[$index['agent_name']] .= ui_print_agent_name ($id_agent, true, 'agent_medium', $styleDisabled . " $agent_style", false, $console_url, $url_hash, $agent_name); + if (defined('METACONSOLE') && !can_user_access_node ()) { + $data[$index['agent_name']] = ui_print_truncate_text($agent_name, 'agent_small', false, true, false, '[…]', 'font-size:7.5pt;'); } else { - $data[$index['agent_name']] .= ui_print_agent_name ($id_agent, true, 'agent_medium', $styleDisabled, false, $console_url, $url_hash); + if ($agent_style !== false) { + $data[$index['agent_name']] .= ui_print_agent_name ($id_agent, true, 'agent_medium', $styleDisabled . " $agent_style", false, $console_url, $url_hash, $agent_name); + } + else { + $data[$index['agent_name']] .= ui_print_agent_name ($id_agent, true, 'agent_medium', $styleDisabled, false, $console_url, $url_hash); + } } $data[$index['module_name']] = diff --git a/pandora_console/operation/events/events.build_table.php b/pandora_console/operation/events/events.build_table.php index 0f0d20e5cf..8d7608fc5f 100644 --- a/pandora_console/operation/events/events.build_table.php +++ b/pandora_console/operation/events/events.build_table.php @@ -13,8 +13,9 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. - -$table->width = '100%'; +if(!isset($table->width)) { + $table->width = '100%'; +} $table->id = "eventtable"; $table->cellpadding = 4; $table->cellspacing = 4; @@ -566,7 +567,7 @@ if (!empty ($table->data)) { echo ""; } - echo '
'; + echo '
'; html_print_table ($table); echo '
'; diff --git a/pandora_console/operation/tree.php b/pandora_console/operation/tree.php index ba1582baf1..d98065586b 100644 --- a/pandora_console/operation/tree.php +++ b/pandora_console/operation/tree.php @@ -605,6 +605,8 @@ else { ui_meta_print_header(__("Tree view"), $subsection, $subsections); } +enterprise_hook('open_meta_frame'); + if(tags_has_user_acl_tags()) { ui_print_tags_warning(); } @@ -617,8 +619,6 @@ else { echo '