From e81f59e1e77d60105fd1b84a88e91f7f8a5ff1ea Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 19 Nov 2013 14:36:22 +0000 Subject: [PATCH] 2013-11-19 Miguel de Dios * include/config_process.php: added lost line about the autorefresh. * include/functions_html.php: re-fixed the images from metaconsole. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9099 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 6 ++++++ pandora_console/include/config_process.php | 1 + pandora_console/include/functions_html.php | 11 ++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index fa152c651f..e42e18d28e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,9 @@ +2013-11-19 Miguel de Dios + + * include/config_process.php: added lost line about the autorefresh. + + * include/functions_html.php: re-fixed the images from metaconsole. + 2013-11-19 Sergio Martin * operation/events/events.build_query.php: Fixed a diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 07e980d820..be93bdcaff 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -219,6 +219,7 @@ $config['autorefresh_white_list'] = array( 'operation/snmpconsole/snmp_view', 'operation/agentes/networkmap', 'enterprise/operation/services/services', + 'operation/visual_console/render_view', 'operation/events/events'); // Specific metaconsole autorefresh white list sections diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 001f8fcac9..21bf60c949 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -1641,7 +1641,6 @@ function html_print_image ($src, $return = false, $options = false, $return_src // If metaconsole is activated and image doesn't exists try to search on normal console - if (defined('METACONSOLE')) { if (!$relative) { if (strstr(getcwd(), 'enterprise/meta') === false) { @@ -1657,7 +1656,14 @@ function html_print_image ($src, $return = false, $options = false, $return_src } } else { - if (!is_readable($src)) { + if ($src[0] !== '/') { + $src = '/' . $src; + } + + if (is_readable(getcwd() . $src)) { + $src = ui_get_full_url($src); + } + else if (!is_readable($src)) { $src = ui_get_full_url('../../' . $src); } } @@ -1673,7 +1679,6 @@ function html_print_image ($src, $return = false, $options = false, $return_src } } - // Only return src field of image if ($return_src) { if (!$return) {