diff --git a/pandora_console/godmode/reporting/visual_console_builder.editor.js b/pandora_console/godmode/reporting/visual_console_builder.editor.js index b3abbc7578..ebd2427ce3 100755 --- a/pandora_console/godmode/reporting/visual_console_builder.editor.js +++ b/pandora_console/godmode/reporting/visual_console_builder.editor.js @@ -835,6 +835,7 @@ function readFields() { values['height_box'] = parseInt( $("input[name='height_box']").val()); values['border_color'] = $("input[name='border_color']").val(); + values['resume_color'] = $("input[name='resume_color']").val(); values['grid_color'] = $("input[name='grid_color']").val(); values['border_width'] = parseInt( $("input[name='border_width']").val()); @@ -1545,6 +1546,11 @@ function loadFieldsFromDB(item) { $("#grid_color_row .ColorPickerDivSample") .css('background-color', val); } + if (key == 'resume_color') { + $("input[name='resume_color']").val(val); + $("#resume_color_row .ColorPickerDivSample") + .css('background-color', val); + } if (key == 'border_width') $("input[name='border_width']").val(val); if (key == 'fill_color') { @@ -1792,6 +1798,9 @@ function hiddenFields(item) { $("#grid_color_row").css('display', 'none'); $("#grid_color_row." + item).css('display', ''); + $("#resume_color_row").css('display', 'none'); + $("#resume_color_row." + item).css('display', ''); + $("#border_width_row").css('display', 'none'); $("#border_width_row." + item).css('display', ''); @@ -1845,6 +1854,7 @@ function cleanFields(item) { $("input[name='height_box']").val(180); $("input[name='border_color']").val('#000000'); $("input[name='grid_color']").val('#000000'); + $("input[name='resume_color']").val('#000000'); $("input[name='border_width']").val(3); $("input[name='fill_color']").val('#ffffff'); $("input[name='line_width']").val(3); diff --git a/pandora_console/include/ajax/visual_console_builder.ajax.php b/pandora_console/include/ajax/visual_console_builder.ajax.php index 3acedebe4d..c7e4484a27 100755 --- a/pandora_console/include/ajax/visual_console_builder.ajax.php +++ b/pandora_console/include/ajax/visual_console_builder.ajax.php @@ -119,6 +119,7 @@ $id_custom_graph = get_parameter('id_custom_graph', null); $border_width = (int)get_parameter('border_width', 0); $border_color = get_parameter('border_color', ''); $grid_color = get_parameter('grid_color', ''); +$resume_color = get_parameter('resume_color', ''); $fill_color = get_parameter('fill_color', ''); $percentile_color = get_parameter('percentile_color', ''); $percentile_label = io_safe_output(get_parameter('percentile_label', '')); @@ -608,6 +609,7 @@ switch ($action) { $values['width'] = $width_percentile; $values['height'] = $width_percentile; } + $values['border_color'] = $resume_color; $values['type'] = DONUT_GRAPH; break; @@ -744,6 +746,10 @@ switch ($action) { unset($values['type_graph']); unset($values['border_color']); break; + case 'donut_graph': + unset($values['border_color']); + unset($values['width']); + break; case 'box_item': unset($values['border_width']); unset($values['border_color']); @@ -886,6 +892,7 @@ switch ($action) { break; case 'donut_graph': $elementFields['width_percentile'] = $elementFields['width']; + $elementFields['resume_color'] = $elementFields['border_color']; break; case 'module_graph': @@ -1005,6 +1012,7 @@ switch ($action) { $values['type'] = DONUT_GRAPH; $values['width'] = $width; $values['height'] = $height; + $values['border_color'] = $resume_color; break; case 'module_graph': $values['type'] = MODULE_GRAPH; diff --git a/pandora_console/include/functions_visual_map.php b/pandora_console/include/functions_visual_map.php index b1bc35cba4..f6293d8743 100755 --- a/pandora_console/include/functions_visual_map.php +++ b/pandora_console/include/functions_visual_map.php @@ -1436,10 +1436,10 @@ function visual_map_print_item($mode = "read", $layoutData, } else { if ($width == 0) { - $img = d3_donut_graph ($layoutData['id'], 400, 400, $donut_data); + $img = d3_donut_graph ($layoutData['id'], 400, 400, $donut_data, $layoutData['border_color']); } else{ - $img = d3_donut_graph ($layoutData['id'], $width, $width, $donut_data); + $img = d3_donut_graph ($layoutData['id'], $width, $width, $donut_data, $layoutData['border_color']); } } } diff --git a/pandora_console/include/functions_visual_map_editor.php b/pandora_console/include/functions_visual_map_editor.php index 16bacff325..513c6ccc32 100755 --- a/pandora_console/include/functions_visual_map_editor.php +++ b/pandora_console/include/functions_visual_map_editor.php @@ -331,6 +331,18 @@ function visual_map_editor_print_item_palette($visualConsole_id, $background) { html_print_select(array(), 'module', '', '', __('Any'), 0, true) . '
'; + $form_items['resume_color_row'] = array(); + $form_items['resume_color_row']['items'] = array('donut_graph'); + $form_items['resume_color_row']['html'] = + '