Fixed graph height when send email by alert

This commit is contained in:
Daniel Maya 2020-04-02 14:58:03 +02:00
parent 1c596ea8af
commit 9b1d8a52de
2 changed files with 5 additions and 2 deletions

View File

@ -13541,6 +13541,9 @@ function api_get_module_graph($id_module, $thrash2, $other, $thrash4)
// 1 hour by default.
$graph_threshold = (!empty($other) && isset($other['data'][2]) && $other['data'][2]) ? $other['data'][2] : 0;
// Graph height when send email by alert
$height = (!empty($other) && isset($other['data'][3]) && $other['data'][3]) ? $other['data'][3] : null;
if (is_nan($graph_seconds) || $graph_seconds <= 0) {
// returnError('error_module_graph', __(''));
return;

View File

@ -1269,11 +1269,11 @@ sub pandora_execute_action ($$$$$$$$$;$) {
my $threshold = shift;
my $period = $hours * 3600; # Hours to seconds
if($threshold == 0){
$params->{"other"} = $period . '%7C0%7C0';
$params->{"other"} = $period . '%7C0%7C0%7C225';
$cid = 'module_graph_' . $hours . 'h';
}
else{
$params->{"other"} = $period . '%7C0%7C1';
$params->{"other"} = $period . '%7C0%7C1%7C225';
$cid = 'module_graphth_' . $hours . 'h';
}