fixed minor errors warnings in log

This commit is contained in:
daniel 2017-02-15 08:52:57 +01:00
parent 7e7713ae04
commit cb8fea7f2e
2 changed files with 28 additions and 11 deletions

View File

@ -5264,7 +5264,12 @@ function reporting_availability_graph($report, $content, $pdf=false) {
}
$i++;
}
if (($data['time_ok']+$data['time_error']) > 0 ) {
$data['sla_value'] = ($data['time_ok']/($data['time_ok']+$data['time_error']))*100;
}
else {
$data['sla_value'] = 0;
}
$data['sla_fixed'] = sla_truncate($data['sla_value'], $config['graph_precision'] );
}
else{

View File

@ -273,17 +273,29 @@ if (empty($colors)) {
}
foreach ($colors as $i => $color) {
if (isset ($color['border'])) {
$rgb['border'] = html_html2rgb($color['border']);
if (isset($rgb['border'])) {
$rgb_color[$i]['border']['R'] = $rgb['border'][0];
$rgb_color[$i]['border']['G'] = $rgb['border'][1];
$rgb_color[$i]['border']['B'] = $rgb['border'][2];
}
}
if (isset ($color['color'])) {
$rgb['color'] = html_html2rgb($color['color']);
if (isset($rgb['color'])) {
$rgb_color[$i]['color']['R'] = $rgb['color'][0];
$rgb_color[$i]['color']['G'] = $rgb['color'][1];
$rgb_color[$i]['color']['B'] = $rgb['color'][2];
}
}
if (isset ($color['alpha'])) {
$rgb_color[$i]['alpha'] = $color['alpha'];
}
}
//add for report with max 15 modules comparation repeat
$countlegend = count($legend);