From 596ad9dd2f520ebd3e074335661d3a15ee1fedc7 Mon Sep 17 00:00:00 2001 From: enriquecd <enrique.camargo@artica.com> Date: Tue, 22 Nov 2016 11:52:16 +0100 Subject: [PATCH] Fix image pandora UX modules links - #90 (cherry picked from commit a6f546c8d8b8c281fd99363bf6e85aa2d426af48) --- pandora_console/include/functions_ui.php | 21 +++++++++++----- .../operation/agentes/status_monitor.php | 24 ++++++++++--------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php index 1398879445..789b845004 100755 --- a/pandora_console/include/functions_ui.php +++ b/pandora_console/include/functions_ui.php @@ -3649,12 +3649,21 @@ function ui_print_module_string_value($value, $id_agente_module, "id=" . $id_agente_module . "&refr=" . $current_interval . "&label=" . rawurlencode(urlencode(io_safe_output($module_name))) . "','" . $win_handle . "', 700,480)"; - - $salida = '<a href="javascript:' . $link . '">' . - html_print_image("images/photo.png", true, - array("border" => '0', - "alt" => "", - "title" => __("Snapshot view"))) . '</a> '; + if (is_image_data($value)) { + $salida = '<a href="javascript:' . $link . '">' . + html_print_image("images/photo.png", true, + array("border" => '0', + "alt" => "", + "title" => __("Snapshot view"))) . '</a> '; + } + else { + $salida = '<a href="javascript:' . $link . '">' . + html_print_image("images/default_list.png", true, + array("border" => '0', + "alt" => "", + "title" => __("Snapshot view"))) . '</a> '; + + } } else { diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php index a2a12fbd52..3d5910ccce 100644 --- a/pandora_console/operation/agentes/status_monitor.php +++ b/pandora_console/operation/agentes/status_monitor.php @@ -1347,19 +1347,21 @@ if (!empty($result)) { $link = "winopeng_var('$row[datos]','',700,480)"; } - if(!is_snapshot_data($row['datos'])){ - $salida = '<a href="javascript:' . $link . '">' . - html_print_image('images/default_list.png', true, - array('border' => '0', + + if(!is_image_data($row['datos'])){ + $salida = '<a href="javascript:' . $link . '">' . + html_print_image('images/default_list.png', true, + array('border' => '0', 'alt' => '', 'title' => __('Snapshot view'))) . '</a> '; - }else{ - $salida = '<a href="javascript:' . $link . '">' . - html_print_image('images/photo.png', true, - array('border' => '0', - 'alt' => '', - 'title' => __('Snapshot view'))) . '</a> '; - } + } + else { + $salida = '<a href="javascript:' . $link . '">' . + html_print_image('images/photo.png', true, + array('border' => '0', + 'alt' => '', + 'title' => __('Snapshot view'))) . '</a> '; + } } else {