diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 691e68bd97..a44a821ef6 100644 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -489,6 +489,13 @@ $table->data[$row][1] .= __('No') . ' ' . $config["show_group_name"], true); $row++; +$table->data[$row][0] = __('Default line thickness for the Custom Graph.'); +$table->data[$row][1] = html_print_input_text ('custom_graph_widht', + $config["custom_graph_widht"], '', 5, 5, true); + +$row++; + + echo '
'; html_print_input_hidden ('update_config', 1); html_print_table ($table); diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index 2c290e4759..0163ff98b3 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -455,6 +455,8 @@ function config_update_config () { $error_update[] = __('Shortened module graph data'); if (!config_update_value ('show_group_name', get_parameter('show_group_name'))) $error_update[] = __('Show the group name instead the group icon.'); + if (!config_update_value ('custom_graph_widht', get_parameter('custom_graph_widht'))) + $error_update[] = __('Default line thickness for the Custom Graph.'); @@ -1241,6 +1243,10 @@ function config_process_config () { config_update_value ('show_group_name', 0); } + if (!isset($config['custom_graph_widht'])) { + config_update_value ('custom_graph_widht', 1); + } + if (!isset($config['command_snapshot'])) { config_update_value ('command_snapshot', 1); } diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index c6b005a2ab..be035507c5 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -1360,7 +1360,7 @@ function graphic_combined_module ($module_list, $weight_list, $period, 'color' => COL_GRAPH12, 'alpha' => 50); $color[15] = array('border' => '#000000', 'color' => COL_GRAPH13, 'alpha' => 50); - + switch ($stacked) { case CUSTOM_GRAPH_AREA: return area_graph($flash_charts, $graph_values, $width, diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index fd96a42a34..5719af4646 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -645,7 +645,15 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, //~ { color: criticalw, yaxis: { from: vcritical_min } }, //~ { color: criticalw, yaxis: { to: -1 } } //~ ]; - + + lineWidht = $('#hidden-lineWidhtGraph'); + if (typeof(lineWidht[0])=='undefined'){ + WidhtLine = 1; + } + else{ + WidhtLine = lineWidht[0].value; + } + // Data data_base.push({ id: 'serie_' + i, @@ -658,7 +666,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, fillColor: { colors: [ { opacity: 0.9 }, { opacity: 0.9 } ] }, - lineWidth: 1, + lineWidth: WidhtLine, steps: false }, points: { show: points_show } }); diff --git a/pandora_console/operation/reporting/graph_viewer.php b/pandora_console/operation/reporting/graph_viewer.php index 3b506b6bf5..5b6048d6c2 100644 --- a/pandora_console/operation/reporting/graph_viewer.php +++ b/pandora_console/operation/reporting/graph_viewer.php @@ -103,7 +103,7 @@ if ($view_graph) { include ("general/noaccess.php"); exit; } - + html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_widht']); $url = "index.php?" . "sec=reporting&" . "sec2=operation/reporting/graph_viewer&" .