diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4a565859b9..ac20ba61b6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2013-02-13 Sergio Martin + + * include/graphs/functions_flot.php + include/graphs/flot/pandora.flot.js + operation/agentes/stat_win.php: Improve the legend of the + interactive graphs for bug 3573814 + 2013-02-13 Sergio Martin * include/styles/dialog.css diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 08af9d3665..1fa313afad 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -788,7 +788,8 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors, var label_aux = series.label + ' = '; - if (serie_types[i] != 'points') { + // The graphs of points type and unknown graphs will dont be updated + if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) { legends.eq(i).text(label_aux.replace(/=.*/, '= ' + parseFloat(y).toFixed(2) +' '+unit)); } diff --git a/pandora_console/include/graphs/functions_flot.php b/pandora_console/include/graphs/functions_flot.php index 9f7f07004c..cc75936bd5 100644 --- a/pandora_console/include/graphs/functions_flot.php +++ b/pandora_console/include/graphs/functions_flot.php @@ -295,6 +295,9 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in else { $force_integer = 'false'; } + + // Trick to get translated string from javascript + $return .= html_print_input_hidden('unknown_text', __('Unknown'), true); // Javascript code $return .= "