2012-06-20 Sergio Martin <sergio.martin@artica.es>
* include/functions_graph.php include/functions_reporting.php: Fixed layout issues in SLA reports and add ttl param to slice graphs function to pdf side Merged from 4.0.2 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6634 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4ea345aac6
commit
d120f6acdf
|
@ -1,3 +1,12 @@
|
||||||
|
2012-06-20 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* include/functions_graph.php
|
||||||
|
include/functions_reporting.php: Fixed layout issues in
|
||||||
|
SLA reports and add ttl param to slice graphs
|
||||||
|
function to pdf side
|
||||||
|
|
||||||
|
Merged from 4.0.2
|
||||||
|
|
||||||
2012-06-20 Sancho Lerena <slerena@artiac.es>
|
2012-06-20 Sancho Lerena <slerena@artiac.es>
|
||||||
|
|
||||||
* extensions/update_manager/sql/update_manager.sql: 4.0.2 comes with a fixed
|
* extensions/update_manager/sql/update_manager.sql: 4.0.2 comes with a fixed
|
||||||
|
|
|
@ -1014,14 +1014,14 @@ function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $va
|
||||||
"&colorRGB=". $colorRGB . "' />";
|
"&colorRGB=". $colorRGB . "' />";
|
||||||
}
|
}
|
||||||
|
|
||||||
function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek = null, $time_from = null, $time_to = null, $width, $height, $home_url) {
|
function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $date, $daysWeek = null, $time_from = null, $time_to = null, $width, $height, $home_url, $ttl = 1) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
$data = reporting_get_agentmodule_sla_array ($id, $period, $sla_min, $sla_max, $date, $daysWeek, $time_from, $time_to);
|
$data = reporting_get_agentmodule_sla_array ($id, $period, $sla_min, $sla_max, $date, $daysWeek, $time_from, $time_to);
|
||||||
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
||||||
|
|
||||||
return slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'],
|
return slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'],
|
||||||
$config['round_corner'], $home_url);
|
$config['round_corner'], $home_url, $ttl);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2394,11 +2394,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
if ($total_result_SLA != 'fail')
|
if ($total_result_SLA != 'fail')
|
||||||
$total_result_SLA = 'unknown';
|
$total_result_SLA = 'unknown';
|
||||||
}
|
}
|
||||||
else if ($sla_value >= $sla['sla_limit']) {
|
else if ($sla_value < $sla['sla_limit']) {
|
||||||
if ($total_result_SLA == 'ok')
|
|
||||||
$total_result_SLA = 'ok';
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$total_result_SLA = 'fail';
|
$total_result_SLA = 'fail';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2475,21 +2471,23 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
unset($table1->data[$i][6]);
|
unset($table1->data[$i][6]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->colspan[2][0] = 3;
|
$next_row = 2;
|
||||||
if ($show_graph == 0 || $show_graph == 1) {
|
if ($show_graph == 0 || $show_graph == 1) {
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = html_print_table($table1, true);
|
$data[0] = html_print_table($table1, true);
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
$next_row++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$table->colspan[3][0] = 2;
|
$table->colspan[$next_row][0] = 2;
|
||||||
|
$next_row++;
|
||||||
$data = array();
|
$data = array();
|
||||||
$data_pie_graph = json_encode ($data_graph);
|
$data_pie_graph = json_encode ($data_graph);
|
||||||
if (($show_graph == 1 || $show_graph == 2) && !empty($slas)) {
|
if (($show_graph == 1 || $show_graph == 2) && !empty($slas)) {
|
||||||
$data[0] = pie3d_graph(false, $data_graph,
|
$data[0] = pie3d_graph(false, $data_graph,
|
||||||
500, 150, __("other"), "", $config['homedir'] . "/images/logo_vertical_water.png",
|
500, 150, __("other"), "", $config['homedir'] . "/images/logo_vertical_water.png",
|
||||||
|
$config['fontpath'], $config['font_size']);
|
||||||
$config['fontpath'], $config['font_size']);
|
|
||||||
|
|
||||||
|
|
||||||
//Print resume
|
//Print resume
|
||||||
|
@ -2508,20 +2506,13 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
$table_resume->data[0][0] = '<span style="font: bold '.$sizem.'em Arial, Sans-serif; color: #0000FF;">';
|
$table_resume->data[0][0] = '<span style="font: bold '.$sizem.'em Arial, Sans-serif; color: #0000FF;">';
|
||||||
$table_resume->data[0][1] = '<span style="font: bold '.$sizem.'em Arial, Sans-serif; color: #736F6E;">'.__('Unknown').'</span>';
|
$table_resume->data[0][1] = '<span style="font: bold '.$sizem.'em Arial, Sans-serif; color: #736F6E;">'.__('Unknown').'</span>';
|
||||||
}
|
}
|
||||||
$table_resume->data[0][0] .= (int)($total_SLA / count($slas));
|
$table_resume->data[0][0] .= format_numeric($total_SLA / count($slas), 2);
|
||||||
$table_resume->data[0][0] .= "%</span>";
|
$table_resume->data[0][0] .= "%</span>";
|
||||||
|
|
||||||
$data[1] = html_print_table($table_resume, true);
|
$data[1] = html_print_table($table_resume, true);
|
||||||
|
|
||||||
|
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
|
||||||
//Display horizontal bar graphs
|
|
||||||
$days = array ('monday' => $content['monday'], 'tuesday' => $content['tuesday'],
|
|
||||||
'wednesday' => $content['wednesday'], 'thursday' => $content['thursday'],
|
|
||||||
'friday' => $content['friday'], 'saturday' => $content['saturday'], 'sunday' => $content['sunday']);
|
|
||||||
$daysWeek = json_encode ($days);
|
|
||||||
|
|
||||||
$table2->width = '99%';
|
$table2->width = '99%';
|
||||||
$table2->style[0] = 'text-align: right';
|
$table2->style[0] = 'text-align: right';
|
||||||
$table2->data = array ();
|
$table2->data = array ();
|
||||||
|
@ -2537,7 +2528,8 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
|
||||||
|
|
||||||
array_push ($table2->data, $data);
|
array_push ($table2->data, $data);
|
||||||
}
|
}
|
||||||
$table->colspan[4][0] = 3;
|
$table->colspan[$next_row][0] = 3;
|
||||||
|
$next_row++;
|
||||||
$data = array();
|
$data = array();
|
||||||
$data[0] = html_print_table($table2, true);
|
$data[0] = html_print_table($table2, true);
|
||||||
array_push ($table->data, $data);
|
array_push ($table->data, $data);
|
||||||
|
|
Loading…
Reference in New Issue