diff --git a/pandora_console/include/functions.php b/pandora_console/include/functions.php
index 6c4d0a8199..27dd557c24 100644
--- a/pandora_console/include/functions.php
+++ b/pandora_console/include/functions.php
@@ -2162,6 +2162,18 @@ function is_snapshot_data ($data) {
return is_image_data($data);
}
+/**
+ * Check if text is too long to put it into a black screen
+ *
+ * @param string Data value
+ * @return bool True if black window should be displayed
+ */
+function is_text_to_black_string ($data) {
+ if (is_image_data($data)) return false;
+ // Consider large text if data is greater than 200 characters
+ return ((int)strlen($data)) > 200;
+}
+
/**
* Create an invisible div with a provided ID and value to
* can retrieve it from javascript with function get_php_value(name)
diff --git a/pandora_console/include/functions_ui.php b/pandora_console/include/functions_ui.php
index caffcad739..43c075b733 100755
--- a/pandora_console/include/functions_ui.php
+++ b/pandora_console/include/functions_ui.php
@@ -3814,12 +3814,11 @@ function ui_print_module_string_value($value, $id_agente_module,
if ($is_web_content_string) {
$value = io_safe_input($value);
}
-
-
-
+
$is_snapshot = is_snapshot_data($value);
-
- if (($config['command_snapshot']) && ($is_snapshot)) {
+ $is_large_image = is_text_to_black_string ($value);
+
+ if (($config['command_snapshot']) && ($is_snapshot || $is_large_image)) {
$handle = "snapshot" . "_" . $id_agente_module;
$url = 'include/procesos.php?agente=' . $id_agente_module;
$win_handle = dechex(crc32($handle));
@@ -3828,7 +3827,7 @@ 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)";
- if (is_image_data($value)) {
+ if ($is_snapshot) {
$salida = '' .
html_print_image("images/photo.png", true,
array("border" => '0',
diff --git a/pandora_console/operation/agentes/status_monitor.php b/pandora_console/operation/agentes/status_monitor.php
index f630953dd5..344e3c4aeb 100644
--- a/pandora_console/operation/agentes/status_monitor.php
+++ b/pandora_console/operation/agentes/status_monitor.php
@@ -1370,10 +1370,11 @@ if (!empty($result)) {
else {
$module_value = io_safe_output($row['datos']);
}
-
+
$is_snapshot = is_snapshot_data ( $module_value );
-
- if (($config['command_snapshot']) && ($is_snapshot)) {
+ $is_large_image = is_text_to_black_string ( $module_value );
+
+ if (($config['command_snapshot']) && ($is_snapshot || $is_large_image)) {
$link = ui_get_snapshot_link( array(
'id_module' => $row['id_agente_modulo'],
'last_data' => $row['datos'],
@@ -1382,7 +1383,7 @@ if (!empty($result)) {
'module_name' => $row['module_name']
));
- if(!is_image_data($row['datos'])){
+ if($is_large_image){
$salida = '' .
html_print_image('images/default_list.png', true,
array('border' => '0',