Fixed date in availability graph

This commit is contained in:
Daniel Maya 2020-01-27 11:52:13 +01:00
parent 28392b71ef
commit 1998db3317
3 changed files with 12 additions and 5 deletions

View File

@ -291,7 +291,8 @@ if (file_exists('languages/'.$user_language.'.mo') === true) {
$params['not_interactive'],
$params['ttl'],
$params['widgets'],
$params['show']
$params['show'],
$params['date_to']
);
break;

View File

@ -2840,7 +2840,8 @@ function graph_sla_slicebar(
true,
$ttl,
false,
false
false,
$date
);
}

View File

@ -754,7 +754,8 @@ function flot_slicesbar_graph(
$not_interactive=0,
$ttl=1,
$widgets=false,
$show=true
$show=true,
$date_to=false
) {
global $config;
@ -779,6 +780,7 @@ function flot_slicesbar_graph(
'widgets' => $widgets,
'show' => $show,
'return_img_base_64' => true,
'date_to' => $date_to,
];
$graph = '<img src="data:image/jpg;base64,';
@ -873,8 +875,11 @@ function flot_slicesbar_graph(
$full_legend_date = false;
}
$date = get_system_time();
$datelimit = (($date - $period));
if (!$date_to) {
$date_to = get_system_time();
}
$datelimit = (($date_to - $period));
$i = 0;
$values2 = [];