2013-12-12 Sergio Martin <sergio.martin@artica.es>
* include/graphs/functions_flot.php include/graphs/flot/pandora.flot.js include/javascript/pandora.js include/styles/pandora.css operation/agentes/stat_win.php: A lot of fixes on the javascript graphs to be shown correctly in IE. Tested and working fine on IE9 with compatibility mode on. Incident: #417 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9216 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0f4735399c
commit
d1789ba232
|
@ -1,3 +1,14 @@
|
|||
2013-12-12 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/graphs/functions_flot.php
|
||||
include/graphs/flot/pandora.flot.js
|
||||
include/javascript/pandora.js
|
||||
include/styles/pandora.css
|
||||
operation/agentes/stat_win.php: A lot of fixes on the
|
||||
javascript graphs to be shown correctly in IE. Tested
|
||||
and working fine on IE9 with compatibility mode on.
|
||||
Incident: #417
|
||||
|
||||
2013-12-11 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/graphs/flot/pandora.flot.js: Add one decimal
|
||||
|
|
|
@ -812,9 +812,9 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
dataset = plot.getData();
|
||||
}
|
||||
|
||||
var timenewpos = dataset[0].xaxis.p2c(pos.x)+plot.offset().left;
|
||||
var timenewpos = dataset[0].xaxis.p2c(pos.x)+$('.yAxis>div').eq(0).width();
|
||||
|
||||
var canvaslimit = plot.offset().left + plot.width();
|
||||
var canvaslimit = plot.width();
|
||||
|
||||
if (timesize+timenewpos > canvaslimit) {
|
||||
$('#timestamp_'+graph_id).css('left', timenewpos - timesize);
|
||||
|
@ -966,7 +966,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
var parent_height;
|
||||
$('#menu_overview_'+graph_id).click(function() {
|
||||
$('#overview_'+graph_id).toggle();
|
||||
adjust_menu(graph_id, plot, parent_height);
|
||||
//adjust_menu(graph_id, plot, parent_height);
|
||||
});
|
||||
|
||||
$('#menu_threshold_'+graph_id).click(function() {
|
||||
|
@ -1024,6 +1024,8 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
if (water_mark) {
|
||||
set_watermark(graph_id, plot, $('#watermark_image_'+graph_id).attr('src'));
|
||||
}
|
||||
|
||||
adjust_menu(graph_id, plot, parent_height);
|
||||
}
|
||||
|
||||
function adjust_menu(graph_id, plot, parent_height) {
|
||||
|
@ -1044,9 +1046,14 @@ function adjust_menu(graph_id, plot, parent_height) {
|
|||
overview_height = parseInt($('#overview_'+graph_id).css('height').split('px')[0]) + parseInt($('#overview_'+graph_id).css('margin-top').split('px')[0]);
|
||||
}
|
||||
|
||||
$('#menu_'+graph_id).css('top',
|
||||
(-parent_height+legend_height-overview_height-7)+'px');
|
||||
var menu_height = '25';
|
||||
|
||||
if($('#menu_'+graph_id).height() != undefined || $('#menu_'+graph_id).height() < 20) {
|
||||
menu_height = $('#menu_'+graph_id).height();
|
||||
}
|
||||
|
||||
$('#menu_'+graph_id).css('top', (($('#'+graph_id).offset().top-menu_height-15)+'px'));
|
||||
$('#legend_'+graph_id).css('width',plot.width());
|
||||
$('#menu_'+graph_id).css('left',plot.width()-$('#menu_'+graph_id).width() + 10);
|
||||
$('#menu_'+graph_id).show();
|
||||
}
|
||||
|
|
|
@ -126,12 +126,12 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||
$graph_id = uniqid('graph_');
|
||||
|
||||
// Parent layer
|
||||
$return = "<div>";
|
||||
$return = "<div class='parent_graph' style='width: ".$width."px;'>";
|
||||
// Set some containers to legend, graph, timestamp tooltip, etc.
|
||||
$return .= "<p id='legend_$graph_id' style='font-size:".$font_size."pt'></p>";
|
||||
$return .= "<div id='timestamp_$graph_id' style='font-size:".$font_size."pt;display:none; position:absolute; background:#fff; border: solid 1px #aaa; padding: 2px; z-index:1000;'></div>";
|
||||
$return .= "<p id='legend_$graph_id' class='legend_graph' style='font-size:".$font_size."pt'></p>";
|
||||
$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>";
|
||||
$return .= "<div id='overview_$graph_id' style='display:none; margin-left:0px; margin-top:20px; width: ".$width."px; height:50px;'></div>";
|
||||
$return .= "<div id='overview_$graph_id' class='overview_graph' style='display:none; margin-left:0px; margin-top:20px; width: ".$width."px; height:50px;'></div>";
|
||||
|
||||
if ($water_mark != '') {
|
||||
$return .= "<div id='watermark_$graph_id' style='display:none; position:absolute;'><img id='watermark_image_$graph_id' src='$water_mark'></div>";
|
||||
|
@ -226,8 +226,8 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||
$nbuttons++;
|
||||
}
|
||||
|
||||
$menu_width = 25 * $nbuttons + 8;
|
||||
$return .= "<div id='menu_$graph_id' style='display:none; text-align:center; width:".$menu_width."px; position:relative; border: solid 1px #666; border-bottom: 0px; padding: 4px 4px 4px 4px'>
|
||||
$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.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>";
|
||||
|
@ -720,4 +720,4 @@ function flot_slicesbar_graph ($graph_data, $period, $width, $height, $legend, $
|
|||
|
||||
return $return;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -11,7 +11,7 @@ function toggleDiv (divid){
|
|||
}
|
||||
|
||||
function winopeng (url, wid) {
|
||||
open (url, wid,"width=650,height=410,status=no,toolbar=no,menubar=no,scrollbar=no");
|
||||
open (url, wid,"width=700,height=460,status=no,toolbar=no,menubar=no,scrollbar=no");
|
||||
// WARNING !! Internet Explorer DOESNT SUPPORT "-" CARACTERS IN WINDOW HANDLE VARIABLE
|
||||
status = wid;
|
||||
}
|
||||
|
|
|
@ -2775,3 +2775,36 @@ div#agent_wizard_subtabs {
|
|||
#code_license_dialog a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
/* GRAPHS CSS */
|
||||
|
||||
.parent_graph {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.menu_graph, .timestamp_graph {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
.menu_graph {
|
||||
-moz-border-top-right-radius: 6px;
|
||||
-webkit-border-top-right-radius: 6px;
|
||||
border-top-right-radius: 6px;
|
||||
-moz-border-top-left-radius: 6px;
|
||||
-webkit-border-top-left-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
}
|
||||
|
||||
.legend_graph {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.legendColorBox * {
|
||||
font-size: 0px;
|
||||
padding: 0px 4px;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -404,10 +404,10 @@ $label = base64_decode(get_parameter('label', ''));
|
|||
return false;
|
||||
}).click(function() {
|
||||
if (show_overview) {
|
||||
window.resizeTo(width_window, height_window + 15);
|
||||
window.resizeTo(width_window + 20, height_window + 50);
|
||||
}
|
||||
else {
|
||||
window.resizeTo(width_window, height_window + 100);
|
||||
window.resizeTo(width_window + 20, height_window + 200);
|
||||
}
|
||||
show_overview = !show_overview;
|
||||
|
||||
|
|
Loading…
Reference in New Issue