2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
* include/graphs/flot/pandora.flot.js, include/graphs/functions_flot.php, include/graphs/fgraph.php: cleaned source code style. * operation/agentes/stat_win.php: added javascript code to resize the window when show the overview graph. Fixes: #3574134 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7658 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0ad5efd888
commit
751959a969
|
@ -1,3 +1,14 @@
|
|||
2013-02-14 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/graphs/flot/pandora.flot.js,
|
||||
include/graphs/functions_flot.php, include/graphs/fgraph.php:
|
||||
cleaned source code style.
|
||||
|
||||
* operation/agentes/stat_win.php: added javascript code to resize
|
||||
the window when show the overview graph.
|
||||
|
||||
Fixes: #3574134
|
||||
|
||||
2013-02-14 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* operation/snmpconsole/snmp_browser.php: Changed the size of some
|
||||
|
|
|
@ -235,7 +235,7 @@ function area_graph($flash_chart, $chart_data, $width, $height, $color, $legend,
|
|||
$water_mark = "", $font = '', $font_size = '', $unit = '', $ttl = 1, $series_type = array(),
|
||||
$chart_extra_data = array(), $yellow_threshold = 0, $red_threshold = 0, $adapt_key = '', $force_integer = false,
|
||||
$series_suffix_str = '') {
|
||||
|
||||
|
||||
setup_watermark($water_mark, $water_mark_file, $water_mark_url);
|
||||
|
||||
// ATTENTION: The min size is 130x150
|
||||
|
|
|
@ -939,7 +939,7 @@ function pandoraFlotArea(graph_id, values, labels, labels_long, legend, colors,
|
|||
datas.push(this);
|
||||
//}
|
||||
});
|
||||
|
||||
|
||||
plot = $.plot($('#'+graph_id), datas, options);
|
||||
|
||||
plot.setSelection(currentRanges);
|
||||
|
|
|
@ -234,7 +234,7 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend, $long_in
|
|||
$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>
|
||||
</div>";
|
||||
</div>";
|
||||
}
|
||||
$extra_height = $height - 50;
|
||||
$extra_width = (int)($width / 3);
|
||||
|
|
|
@ -459,4 +459,36 @@ $label = base64_decode(get_parameter('label', ''));
|
|||
$('#checkbox-time_compare_overlapped').click(function() {
|
||||
$('#checkbox-time_compare_separated').removeAttr('checked');
|
||||
});
|
||||
|
||||
|
||||
<?php
|
||||
//Resize window when show the overview graph.
|
||||
if ($config['flash_charts']) {
|
||||
?>
|
||||
var show_overview = false;
|
||||
var height_window;
|
||||
var width_window;
|
||||
$(document).ready(function() {
|
||||
height_window = $(window).height();
|
||||
width_window = $(window).width();
|
||||
});
|
||||
|
||||
$("*").filter(function() {
|
||||
if (typeof(this.id) == "string")
|
||||
return this.id.match(/menu_overview_graph.*/);
|
||||
else
|
||||
return false;
|
||||
}).click(function() {
|
||||
if (show_overview) {
|
||||
window.resizeTo(width_window, height_window + 15);
|
||||
}
|
||||
else {
|
||||
window.resizeTo(width_window, height_window + 100);
|
||||
}
|
||||
show_overview = !show_overview;
|
||||
|
||||
});
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue