Merge branch 'ent-5267-Fechas-erroneas-en-availability-graph' into 'develop'

Fixed date in availability graph

See merge request artica/pandorafms!3027
This commit is contained in:
Daniel Rodriguez 2020-02-10 10:46:55 +01:00
commit 6faac04672
3 changed files with 12 additions and 5 deletions

View File

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

@ -739,7 +739,8 @@ function flot_slicesbar_graph(
$not_interactive=0,
$ttl=1,
$widgets=false,
$show=true
$show=true,
$date_to=false
) {
global $config;
@ -764,6 +765,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,';
@ -860,8 +862,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 = [];