Change order divs, because dont show right in view reports. Tiquet: #2317
This commit is contained in:
parent
d7bd4773db
commit
b1567da12e
|
@ -188,6 +188,39 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||
$return = "<div class='parent_graph' style='width: " . $width . "px; " . $background_style . "'>";
|
||||
// Set some containers to legend, graph, timestamp tooltip, etc.
|
||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:".$font_size."pt'></p>";
|
||||
if ($menu) {
|
||||
$threshold = false;
|
||||
if ($yellow_threshold != 0 || $red_threshold != 0) {
|
||||
$threshold = true;
|
||||
}
|
||||
|
||||
$nbuttons = 3;
|
||||
|
||||
if ($threshold) {
|
||||
$nbuttons++;
|
||||
}
|
||||
|
||||
$menu_width = 25 * $nbuttons + 15;
|
||||
$return .= "<div id='menu_$graph_id' class='menu_graph' " .
|
||||
"style='display: none; " .
|
||||
"text-align: center; " .
|
||||
"width: " . $menu_width . "px; ".
|
||||
"border: solid 1px #666; ".
|
||||
"border-bottom: 0px; " .
|
||||
"padding: 4px 4px 4px 4px;margin-bottom:5px;'>
|
||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||
if ($threshold) {
|
||||
$return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$homeurl."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
|
||||
}
|
||||
$return .= " <a href='javascript:'><img id='menu_overview_$graph_id' src='".$homeurl."images/chart_curve_overview.png' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>";
|
||||
|
||||
// Export buttons
|
||||
$return .= " <a href='javascript:'><img id='menu_export_csv_$graph_id' src='".$homeurl."images/csv_grey.png' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>";
|
||||
// Button disabled. This feature works, but seems that is not useful enough to the final users.
|
||||
//$return .= " <a href='javascript:'><img id='menu_export_json_$graph_id' src='".$homeurl."images/json.png' alt='".__('Export to JSON')."' title='".__('Export to JSON')."'></a>";
|
||||
|
||||
$return .= "</div>";
|
||||
}
|
||||
$return .= "<div id='timestamp_$graph_id' class='timestamp_graph' style='font-size:".$font_size."pt;display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px; z-index:1000;'></div>";
|
||||
$return .= "<div id='$graph_id' class='graph $adapt_key' style='width: ".$width."px; height: ".$height."px;'></div>";
|
||||
if ($menu) {
|
||||
|
@ -279,39 +312,6 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
|
|||
// Max is "n-1" because start with 0
|
||||
$max_x--;
|
||||
|
||||
if ($menu) {
|
||||
$threshold = false;
|
||||
if ($yellow_threshold != 0 || $red_threshold != 0) {
|
||||
$threshold = true;
|
||||
}
|
||||
|
||||
$nbuttons = 3;
|
||||
|
||||
if ($threshold) {
|
||||
$nbuttons++;
|
||||
}
|
||||
|
||||
$menu_width = 25 * $nbuttons + 15;
|
||||
$return .= "<div id='menu_$graph_id' class='menu_graph' " .
|
||||
"style='display: none; " .
|
||||
"text-align: center; " .
|
||||
"width: " . $menu_width . "px; ".
|
||||
"border: solid 1px #666; ".
|
||||
"border-bottom: 0px; " .
|
||||
"padding: 4px 4px 4px 4px'>
|
||||
<a href='javascript:'><img id='menu_cancelzoom_$graph_id' src='".$homeurl."images/zoom_cross_grey.disabled.png' alt='".__('Cancel zoom')."' title='".__('Cancel zoom')."'></a>";
|
||||
if ($threshold) {
|
||||
$return .= " <a href='javascript:'><img id='menu_threshold_$graph_id' src='".$homeurl."images/chart_curve_threshold.png' alt='".__('Warning and Critical thresholds')."' title='".__('Warning and Critical thresholds')."'></a>";
|
||||
}
|
||||
$return .= " <a href='javascript:'><img id='menu_overview_$graph_id' src='".$homeurl."images/chart_curve_overview.png' alt='".__('Overview graph')."' title='".__('Overview graph')."'></a>";
|
||||
|
||||
// Export buttons
|
||||
$return .= " <a href='javascript:'><img id='menu_export_csv_$graph_id' src='".$homeurl."images/csv_grey.png' alt='".__('Export to CSV')."' title='".__('Export to CSV')."'></a>";
|
||||
// Button disabled. This feature works, but seems that is not useful enough to the final users.
|
||||
//$return .= " <a href='javascript:'><img id='menu_export_json_$graph_id' src='".$homeurl."images/json.png' alt='".__('Export to JSON')."' title='".__('Export to JSON')."'></a>";
|
||||
|
||||
$return .= "</div>";
|
||||
}
|
||||
$extra_width = (int)($width / 3);
|
||||
|
||||
$return .= "<div id='extra_$graph_id' style='font-size: ".$font_size."pt; display:none; position:absolute; overflow: auto; max-height: ".($height+50)."px; width: ".$extra_width."px; background:#fff; padding: 2px 2px 2px 2px; border: solid #000 1px;'></div>";
|
||||
|
|
Loading…
Reference in New Issue