From 5d33af864de5a8be0155b57238767827f5d8586a Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 18 Feb 2013 10:59:12 +0000 Subject: [PATCH] 2013-02-18 Miguel de Dios * 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 --- pandora_console/ChangeLog | 10 ++++++++ pandora_console/include/functions_graph.php | 24 +++++++++++++------ .../include/functions_reporting.php | 2 +- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index d2a0e23885..788d9830a8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,13 @@ +2013-02-18 Miguel de Dios + + * 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 * pandoradb_data.sql: Fixed the MySQL plugin data. A parameter diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index 2a84d6a6e7..48e95cb21a 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -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 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); + if ($round_corner === null) { + $round_corner = $config['round_corner']; } - $colors = array(1 => COL_NORMAL, 2 => COL_WARNING, 3 => COL_CRITICAL, 4 => COL_UNKNOWN, 5 => COL_NOTINIT); + // 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); + } - return slicesbar_graph($data, $period, $width, $height, $colors, $config['fontpath'], - $config['round_corner'], $home_url, $ttl); + $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'], + $round_corner, $home_url, $ttl); } /** diff --git a/pandora_console/include/functions_reporting.php b/pandora_console/include/functions_reporting.php index 500f1bf8ec..2e157bae3c 100644 --- a/pandora_console/include/functions_reporting.php +++ b/pandora_console/include/functions_reporting.php @@ -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); }