2010-10-07 Sergio Martin <sergio.martin@artica.es>
* include/functions_reporting.php include/functions_visual_map.php operation/reporting/graph_viewer.php godmode/reporting/graph_builder.preview.php: Fixed the setting of width and height on custom graphs setup. Increased the height of the graph in few sections to fix the rise of the leyend git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3361 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
13ba36c3e6
commit
7c640c5032
|
@ -1,3 +1,12 @@
|
|||
2010-10-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_reporting.php
|
||||
include/functions_visual_map.php
|
||||
operation/reporting/graph_viewer.php
|
||||
godmode/reporting/graph_builder.preview.php: Fixed the setting
|
||||
of width and height on custom graphs setup. Increased the height
|
||||
of the graph in few sections to fix the rise of the leyend
|
||||
|
||||
2010-10-07 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/fgraph.php: Fixed crash when try to render
|
||||
|
|
|
@ -92,8 +92,12 @@ $weights = implode(',', $weight_array);
|
|||
|
||||
echo "<table class='databox'>";
|
||||
echo "<tr><td>";
|
||||
|
||||
$graph_width = get_db_sql ("SELECT width FROM tgraph WHERE id_graph = ".$id);
|
||||
$graph_height= get_db_sql ("SELECT height FROM tgraph WHERE id_graph = ".$id);
|
||||
|
||||
if ($config['flash_charts']) {
|
||||
echo graphic_combined_module (explode (',', $modules), explode (',', $weights), $period, $width, $height,
|
||||
echo graphic_combined_module (explode (',', $modules), explode (',', $weights), $period, $graph_width, $graph_height,
|
||||
'Combined%20Sample%20Graph', '', $events, 0, 0, $stacked);
|
||||
} else {
|
||||
echo "<img src='include/fgraph.php?tipo=combined&id=$modules&weight_l=$weights&label=Combined%20Sample%20Graph&height=$height&width=$width&stacked=$stacked&period=$period' border=1 alt=''>";
|
||||
|
|
|
@ -1680,9 +1680,8 @@ function render_report_html_item ($content, $table, $report, $mini = false) {
|
|||
array_push ($weights, $content2["weight"]);
|
||||
}
|
||||
|
||||
$graph_width = get_db_sql ("SELECT width FROM tgraph WHERE id_graph = ".$content["id_gs"]);
|
||||
$graph_height= get_db_sql ("SELECT height FROM tgraph WHERE id_graph = ".$content["id_gs"]);
|
||||
|
||||
// Increase the height to fix the leyend rise
|
||||
$sizgraph_h += count($modules) * 15;
|
||||
|
||||
$table->colspan[1][0] = 3;
|
||||
$data = array ();
|
||||
|
|
|
@ -306,7 +306,7 @@ function getImageStatusElement($layoutData) {
|
|||
break;
|
||||
case 4:
|
||||
//Critical (ALERT)
|
||||
$img = "4".$img."_bad.png";
|
||||
$img .= "_bad.png";
|
||||
break;
|
||||
case 0:
|
||||
//Normal (OK)
|
||||
|
|
|
@ -48,27 +48,31 @@ if ($delete_graph) {
|
|||
}
|
||||
|
||||
if ($view_graph) {
|
||||
$sql="SELECT * FROM tgraph_source WHERE id_graph = $id";
|
||||
$sources = get_db_all_rows_sql($sql);
|
||||
|
||||
$sql="SELECT * FROM tgraph WHERE id_graph = $id";
|
||||
$res=mysql_query($sql);
|
||||
if ($graph = mysql_fetch_array($res)){
|
||||
$graph = get_db_row_sql($sql);
|
||||
|
||||
$id_user = $graph["id_user"];
|
||||
$private = $graph["private"];
|
||||
$width = $graph["width"];
|
||||
$height = $graph["height"];
|
||||
$height = $graph["height"] + count($sources) * 10;
|
||||
$zoom = (int) get_parameter ('zoom', 0);
|
||||
//Increase the height to fix the leyend rise
|
||||
if ($zoom > 0) {
|
||||
switch ($zoom) {
|
||||
case 1:
|
||||
$width = 500;
|
||||
$height = 210;
|
||||
$height = 200 + count($sources) * 15;
|
||||
break;
|
||||
case 2:
|
||||
$width = 650;
|
||||
$height = 310;
|
||||
$height = 300 + count($sources) * 10;
|
||||
break;
|
||||
case 3:
|
||||
$width = 770;
|
||||
$height = 400;
|
||||
$height = 400 + count($sources) * 5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -130,7 +134,6 @@ if ($view_graph) {
|
|||
echo "</form>";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Header
|
||||
print_page_header (__('Reporting'). " » ".__('Custom graph viewer'), "images/reporting.png", false, "", false, "" );
|
||||
|
|
Loading…
Reference in New Issue