diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 0c154906e5..04780c84fe 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1243,11 +1243,18 @@ function visual_map_process_wizard_add ($id_agents, $image, $id_layout, $range, break; } + $label = agents_get_name($id_agent); + + $value_label = '(_VALUE_)'; + if ($type === SIMPLE_VALUE) { + $label .= ' ' . $value_label; + } + $values = array ('type' => $value_type, 'id_layout' => $id_layout, 'pos_x' => $pos_x, 'pos_y' => $pos_y, - 'label' => agents_get_name ($id_agent), + 'label' => $label, 'image' => $value_image, 'id_agent' => $id_agent, 'width' => $width, @@ -1314,24 +1321,25 @@ function visual_map_process_wizard_add_modules ($id_modules, $image, } $id_agent = modules_get_agentmodule_agent ($id_module); + $value_label = '(_VALUE_)'; switch ($label_type) { case 'agent_module': default: $agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false); $module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false); - $label = $agent_label . " - " . $module_label; + $label = $agent_label . " - " . $module_label . " " . $value_label; break; case 'module': $module_label = ui_print_truncate_text(modules_get_agentmodule_name($id_module), 'module_small', false, true, false, '…', false); - $label = $module_label; + $label = $module_label . " " . $value_label; break; case 'agent': $agent_label = ui_print_truncate_text(agents_get_name ($id_agent), 'agent_small', false, true, false, '…', false); - $label = $agent_label; + $label = $agent_label . " " . $value_label; break; case 'none': - $label = ''; + $label = $value_label; break; } $label = io_safe_input($label); @@ -1516,6 +1524,7 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, } } + $value_label = '(_VALUE_)'; switch ($label_type) { case 'agent': @@ -1523,9 +1532,10 @@ function visual_map_process_wizard_add_agents ($id_agents, $image, agents_get_name($id_agent), 'agent_small', false, true, false, '…', false); $label = $agent_label; + if ($type === SIMPLE_VALUE) $label .= ' ' . $value_label; break; case 'none': - $label = ''; + $label = ($type === SIMPLE_VALUE) ? $value_label : ''; break; } $label = io_safe_input($label);