2013-02-18 Miguel de Dios <miguel.dedios@artica.es>

* include/functions_graph.php: added a parameter for to set the
	round corner in the function "graph_sla_slicebar".
	
	* include/functions_reporting.php: added in SLA the graph set
	without round corners.
	
	Fixes: #3584066




git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7667 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2013-02-18 10:59:12 +00:00
parent c73bc7e18d
commit 5d33af864d
3 changed files with 28 additions and 8 deletions

View File

@ -1,3 +1,13 @@
2013-02-18 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php: added a parameter for to set the
round corner in the function "graph_sla_slicebar".
* include/functions_reporting.php: added in SLA the graph set
without round corners.
Fixes: #3584066
2013-02-18 Sergio Martin <sergio.martin@artica.es>
* pandoradb_data.sql: Fixed the MySQL plugin data. A parameter

View File

@ -1469,18 +1469,28 @@ function progress_bubble($progress, $width, $height, $title = '', $mode = 1, $va
"&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, $ttl = 1, $data = false) {
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, $data = false, $round_corner = null) {
global $config;
if ($round_corner === null) {
$round_corner = $config['round_corner'];
}
// If the data is not provided, we got it
if ($data === false) {
$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 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN, 5 => COL_NOTINIT);
$colors = array(1 => COL_NORMAL,
2 => COL_WARNING,
3 => COL_CRITICAL,
4 => COL_UNKNOWN,
5 => COL_NOTINIT);
return slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'],
$config['round_corner'], $home_url, $ttl);
return slicesbar_graph($data, $period, $width, $height, $colors,
$config['fontpath'],
$round_corner, $home_url, $ttl);
}
/**

View File

@ -2953,7 +2953,7 @@ function reporting_render_report_html_item ($content, $table, $report, $mini = f
$dataslice[1] = graph_sla_slicebar ($sla['id_agent_module'], $content['period'],
$sla['sla_min'], $sla['sla_max'], $report['datetime'], $content, $content['time_from'],
$content['time_to'], 650, 25, ui_get_full_url(false) . '/', 1, $sla_data_arrays[$k]);
$content['time_to'], 650, 25, ui_get_full_url(false) . '/', 1, $sla_data_arrays[$k], false);
array_push ($tableslice->data, $dataslice);
}