mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 07:44:35 +02:00
Add field to custom line widht to custom graph tiquet: #1875
(cherry picked from commit e0e531bf05b4116359097e15c33835529b868289)
This commit is contained in:
parent
3bab9b06fe
commit
e52ace6716
@ -486,6 +486,13 @@ $table->data[$row][1] .= __('No') . ' ' .
|
|||||||
$config["show_group_name"], true);
|
$config["show_group_name"], true);
|
||||||
$row++;
|
$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">';
|
echo '<form id="form_setup" method="post">';
|
||||||
html_print_input_hidden ('update_config', 1);
|
html_print_input_hidden ('update_config', 1);
|
||||||
html_print_table ($table);
|
html_print_table ($table);
|
||||||
|
@ -451,6 +451,8 @@ function config_update_config () {
|
|||||||
$error_update[] = __('Shortened module graph data');
|
$error_update[] = __('Shortened module graph data');
|
||||||
if (!config_update_value ('show_group_name', get_parameter('show_group_name')))
|
if (!config_update_value ('show_group_name', get_parameter('show_group_name')))
|
||||||
$error_update[] = __('Show the group name instead the group icon.');
|
$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.');
|
||||||
|
|
||||||
$interval_values = get_parameter ('interval_values');
|
$interval_values = get_parameter ('interval_values');
|
||||||
|
|
||||||
@ -1195,6 +1197,10 @@ function config_process_config () {
|
|||||||
config_update_value ('show_group_name', 0);
|
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'])) {
|
if (!isset($config['command_snapshot'])) {
|
||||||
config_update_value ('command_snapshot', 1);
|
config_update_value ('command_snapshot', 1);
|
||||||
}
|
}
|
||||||
|
@ -646,6 +646,14 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
//~ { color: criticalw, yaxis: { to: -1 } }
|
//~ { color: criticalw, yaxis: { to: -1 } }
|
||||||
//~ ];
|
//~ ];
|
||||||
|
|
||||||
|
lineWidht = $('#hidden-lineWidhtGraph');
|
||||||
|
if (typeof(lineWidht[0])=='undefined'){
|
||||||
|
WidhtLine = 1;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
WidhtLine = lineWidht[0].value;
|
||||||
|
}
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
data_base.push({
|
data_base.push({
|
||||||
id: 'serie_' + i,
|
id: 'serie_' + i,
|
||||||
@ -658,7 +666,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
fillColor: {
|
fillColor: {
|
||||||
colors: [ { opacity: 0.9 }, { opacity: 0.9 } ]
|
colors: [ { opacity: 0.9 }, { opacity: 0.9 } ]
|
||||||
},
|
},
|
||||||
lineWidth: 1,
|
lineWidth: WidhtLine,
|
||||||
steps: false },
|
steps: false },
|
||||||
points: { show: points_show }
|
points: { show: points_show }
|
||||||
});
|
});
|
||||||
|
@ -103,7 +103,7 @@ if ($view_graph) {
|
|||||||
include ("general/noaccess.php");
|
include ("general/noaccess.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
html_print_input_hidden ('lineWidhtGraph', $config['custom_graph_widht']);
|
||||||
$url = "index.php?" .
|
$url = "index.php?" .
|
||||||
"sec=reporting&" .
|
"sec=reporting&" .
|
||||||
"sec2=operation/reporting/graph_viewer&" .
|
"sec2=operation/reporting/graph_viewer&" .
|
||||||
|
Loading…
x
Reference in New Issue
Block a user