Add field to custom line widht to custom graph tiquet: #1875

This commit is contained in:
m-lopez-f 2015-03-17 15:36:24 +01:00
parent f0dc044d37
commit e0e531bf05
5 changed files with 25 additions and 4 deletions

View File

@ -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 '<form id="form_setup" method="post">';
html_print_input_hidden ('update_config', 1);
html_print_table ($table);

View File

@ -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);
}

View File

@ -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,

View File

@ -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 }
});

View File

@ -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&" .