diff --git a/pandora_console/godmode/reporting/visual_console_builder.php b/pandora_console/godmode/reporting/visual_console_builder.php index fa997be6e5..7288784acf 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.php +++ b/pandora_console/godmode/reporting/visual_console_builder.php @@ -205,11 +205,7 @@ switch ($activeTab) { // If the background is changed the size is reseted $background_now = $visualConsole['background']; - /*if ($background_now != $background && $background) { - $sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background); - $values['width'] = $sizeBackground[0]; - $values['height'] = $sizeBackground[1]; - }*/ + $values['width'] = $width; $values['height'] = $height; switch ($action) { @@ -237,33 +233,31 @@ switch ($activeTab) { break; case 'save': - if (!defined('METACONSOLE')) { - if ($values['name'] != "" && $values['background']) - $idVisualConsole = db_process_sql_insert('tlayout', $values); - else - $idVisualConsole = false; + if ($values['name'] != "" && $values['background']) + $idVisualConsole = db_process_sql_insert('tlayout', $values); + else + $idVisualConsole = false; + + if ($idVisualConsole !== false) { + db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole"); + $action = 'edit'; + $statusProcessInDB = array('flag' => true, + 'message' => ui_print_success_message(__('Successfully created.'), '', true)); - if ($idVisualConsole !== false) { - db_pandora_audit( "Visual console builder", "Create visual console #$idVisualConsole"); - $action = 'edit'; - $statusProcessInDB = array('flag' => true, - 'message' => ui_print_success_message(__('Successfully created.'), '', true)); - - // Return the updated visual console - $visualConsole = db_get_row_filter('tlayout', - array('id' => $idVisualConsole)); - // Update the ACL - //$vconsole_read = $vconsole_read_new; - $vconsole_write = $vconsole_write_new; - $vconsole_manage = $vconsole_manage_new; - } - else { - db_pandora_audit( "Visual console builder", "Fail try to create visual console"); - $statusProcessInDB = array('flag' => false, - 'message' => ui_print_error_message(__('Could not be created.'), '', true)); - } + // Return the updated visual console + $visualConsole = db_get_row_filter('tlayout', + array('id' => $idVisualConsole)); + // Update the ACL + //$vconsole_read = $vconsole_read_new; + $vconsole_write = $vconsole_write_new; + $vconsole_manage = $vconsole_manage_new; } - break; + else { + db_pandora_audit( "Visual console builder", "Fail try to create visual console"); + $statusProcessInDB = array('flag' => false, + 'message' => ui_print_error_message(__('Could not be created.'), '', true)); + } + break; } break; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index 8a6b1f3b76..febad658cb 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1650,6 +1650,13 @@ function visual_map_print_item($mode = "read", $layoutData, } break; case LABEL: + if (get_parameter('action') == 'edit' || get_parameter('operation') == 'edit_visualmap') { + $aux_text1 = explode("", $aux_text1[1]); + $aux_text3 = explode("", $aux_text2[1]); + + $text = $aux_text1[0].$aux_text3[0].$aux_text3[1]; + } echo io_safe_output($text); break; case ICON: @@ -2682,9 +2689,10 @@ function visual_map_print_visual_map ($id_layout, $show_links = true, $mapWidth = $layout["width"]; $mapHeight = $layout["height"]; $backgroundImage = ''; - if ($layout["background"] != 'None.png' ) + if ($layout["background"] != 'None.png' ){ $backgroundImage = $metaconsole_hack . 'images/console/background/' . $layout["background"]; + } } if (defined('METACONSOLE')) {