mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 08:14:38 +02:00
Apply the fix of the area graph height only to the dashboard and the visual consoles
This commit is contained in:
parent
2aa420e623
commit
a2ba4acb6c
@ -805,7 +805,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
alert_ids, legend_alerts, yellow_threshold, red_threshold,
|
alert_ids, legend_alerts, yellow_threshold, red_threshold,
|
||||||
force_integer, separator, separator2,
|
force_integer, separator, separator2,
|
||||||
yellow_up, red_up, yellow_inverse, red_inverse,
|
yellow_up, red_up, yellow_inverse, red_inverse,
|
||||||
series_suffix_str, vconsole) {
|
series_suffix_str, dashboard, vconsole) {
|
||||||
|
|
||||||
var threshold = true;
|
var threshold = true;
|
||||||
var thresholded = false;
|
var thresholded = false;
|
||||||
@ -1525,8 +1525,10 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend,
|
|||||||
var plot = $.plot($('#' + graph_id), datas, options);
|
var plot = $.plot($('#' + graph_id), datas, options);
|
||||||
|
|
||||||
// Re-calculate the graph height with the legend height
|
// Re-calculate the graph height with the legend height
|
||||||
$('#'+graph_id).css('height',
|
if (dashboard || vconsole) {
|
||||||
$('#'+graph_id).height() - $('#legend_'+graph_id).height());
|
var hDiff = $('#'+graph_id).height() - $('#legend_'+graph_id).height();
|
||||||
|
$('#'+graph_id).css('height', hDiff);
|
||||||
|
}
|
||||||
|
|
||||||
if (vconsole) {
|
if (vconsole) {
|
||||||
var myCanvas = plot.getCanvas();
|
var myCanvas = plot.getCanvas();
|
||||||
|
@ -447,7 +447,8 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||||||
"'$yellow_inverse', \n" .
|
"'$yellow_inverse', \n" .
|
||||||
"'$red_inverse', \n" .
|
"'$red_inverse', \n" .
|
||||||
"'$series_suffix_str',
|
"'$series_suffix_str',
|
||||||
'$vconsole');";
|
" . json_encode($dashboard) . ",\n
|
||||||
|
" . json_encode($vconsole) . ");";
|
||||||
$return .= "\n//]]>";
|
$return .= "\n//]]>";
|
||||||
$return .= "</script>";
|
$return .= "</script>";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user