From 82012959afcbb0790d61f6b53161477c6b1a9b05 Mon Sep 17 00:00:00 2001 From: Alejandro Gallardo Escobar Date: Mon, 27 Nov 2017 12:41:10 +0100 Subject: [PATCH] [Console > Module area graph] Now the value shown into the legend uses the config value to show shortened of full data --- pandora_console/include/graphs/flot/pandora.flot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/graphs/flot/pandora.flot.js b/pandora_console/include/graphs/flot/pandora.flot.js index 5d3a2e4222..77e81a1b0c 100644 --- a/pandora_console/include/graphs/flot/pandora.flot.js +++ b/pandora_console/include/graphs/flot/pandora.flot.js @@ -1747,7 +1747,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, $('#timestamp_'+graph_id).show(); // If no legend, the timestamp labels are short and with value if (legend.length == 0) { - $('#timestamp_'+graph_id).text(labels[j] + ' (' + parseFloat(y).toFixed(2) + ')'); + $('#timestamp_'+graph_id).text(labels[j] + ' (' + (short_data ? parseFloat(y).toFixed(2) : parseFloat(y)) + ')'); } else { $('#timestamp_'+graph_id).text(labels_long[j]); @@ -1781,7 +1781,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, // The graphs of points type and unknown graphs will dont be updated if (serie_types[i] != 'points' && series.label != $('#hidden-unknown_text').val()) { $('#legend_' + graph_id + ' .legendLabel') - .eq(i).html(label_aux + '= ' + parseFloat(y).toFixed(2) + how_bigger + ' ' + unit); + .eq(i).html(label_aux + '= ' + (short_data ? parseFloat(y).toFixed(2) : parseFloat(y)) + how_bigger + ' ' + unit); } $('#legend_' + graph_id + ' .legendLabel')