From 70bf2dd49f81e1ce007872e2c5f0efe1918c347d Mon Sep 17 00:00:00 2001
From: fermin831 <fermin.hernandez@artica.es>
Date: Wed, 18 Apr 2018 16:01:38 +0200
Subject: [PATCH] Added percentile to custom graphs containers

---
 pandora_console/include/ajax/graph.ajax.php |  5 ++-
 pandora_console/include/functions_graph.php | 45 ++++++++++++++++-----
 2 files changed, 39 insertions(+), 11 deletions(-)

diff --git a/pandora_console/include/ajax/graph.ajax.php b/pandora_console/include/ajax/graph.ajax.php
index 75499d6e13..090a79f61e 100644
--- a/pandora_console/include/ajax/graph.ajax.php
+++ b/pandora_console/include/ajax/graph.ajax.php
@@ -234,7 +234,8 @@ if ($get_graphs){
 							$height = 300;
 						}
 						$table .= "<div style='width: 90%'><h4>".$graph[0]['name']."</h4><hr></div>";
-						$table .= graphic_combined_module($modules,
+						$table .= graphic_combined_module(
+							$modules,
 							$weights,
 							$value['time_lapse'],
 							1000,
@@ -261,7 +262,7 @@ if ($get_graphs){
 							$labels,
 							false,
 							false,
-							null,
+							true,
 							false,
 							false,
 							$value['fullscale']
diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php
index b444231b54..6c0c5a83e6 100644
--- a/pandora_console/include/functions_graph.php
+++ b/pandora_console/include/functions_graph.php
@@ -1117,15 +1117,42 @@ function graph_get_formatted_date($timestamp, $format1, $format2) {
  * 
  * @return Mixed 
  */
-function graphic_combined_module ($module_list, $weight_list, $period,
-	$width, $height, $title, $unit_name, $show_events = 0,
-	$show_alerts = 0, $pure = 0, $stacked = 0, $date = 0,
-	$only_image = false, $homeurl = '', $ttl = 1, $projection = false,
-	$prediction_period = false, $background_color = 'white',
-	$name_list = array(), $unit_list = array(), $show_last = true, $show_max = true,
-	$show_min = true, $show_avg = true, $labels = array(), $dashboard = false,
-	$vconsole = false, $percentil = null, $from_interface = false, 
-	$id_widget_dashboard=false, $fullscale = false, $summatory = 0, $average = 0, $modules_series = 0) {
+function graphic_combined_module (
+	$module_list,
+	$weight_list,
+	$period,
+	$width,
+	$height,
+	$title,
+	$unit_name,
+	$show_events = 0,
+	$show_alerts = 0,
+	$pure = 0,
+	$stacked = 0,
+	$date = 0,
+	$only_image = false,
+	$homeurl = '',
+	$ttl = 1,
+	$projection = false,
+	$prediction_period = false,
+	$background_color = 'white',
+	$name_list = array(),
+	$unit_list = array(),
+	$show_last = true,
+	$show_max = true,
+	$show_min = true,
+	$show_avg = true,
+	$labels = array(),
+	$dashboard = false,
+	$vconsole = false,
+	$percentil = null,
+	$from_interface = false,
+	$id_widget_dashboard=false,
+	$fullscale = false,
+	$summatory = 0,
+	$average = 0,
+	$modules_series = 0
+) {
 	
 	global $config;
 	global $graphic_type;