diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8a149bf066..f3513dc5d8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2012-06-12 Juan Manuel Ramon + + * include/functions_graph.php: Added options for progress_bar graph. + * include/functions_modules.php: Fixed typo. + + Merged from branches. + 2012-06-12 Juan Manuel Ramon * include/functions_modules.php diff --git a/pandora_console/include/functions_graph.php b/pandora_console/include/functions_graph.php index abf0aee0bc..ed435c6291 100755 --- a/pandora_console/include/functions_graph.php +++ b/pandora_console/include/functions_graph.php @@ -949,7 +949,7 @@ function graph_event_module ($width = 300, $height = 200, $id_agent) { $config['fontpath'], $config['font_size']); } -function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false) { +function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value_text = false, $color = false, $options = false) { global $config; $out_of_lim_str = __("Out of limits"); @@ -965,10 +965,21 @@ function progress_bar($progress, $width, $height, $title = '', $mode = 1, $value $colorRGB = implode('|', $colorRGB); } + $class_tag = ''; + $id_tag = ''; + if ($options !== false) { + foreach ($options as $option_type => $option_value) { + if ($option_type == 'class') + $class_tag = ' class="' . $option_value . '" '; + else if ($option_type == 'id') + $id_tag = ' id="' . $option_value . '" '; + } + } + require_once("include_graph_dependencies.php"); include_graphs_dependencies($config['homedir'].'/'); - return "