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>
|
2010-10-07 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* include/fgraph.php: Fixed crash when try to render
|
* include/fgraph.php: Fixed crash when try to render
|
||||||
|
|
|
@ -92,8 +92,12 @@ $weights = implode(',', $weight_array);
|
||||||
|
|
||||||
echo "<table class='databox'>";
|
echo "<table class='databox'>";
|
||||||
echo "<tr><td>";
|
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']) {
|
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);
|
'Combined%20Sample%20Graph', '', $events, 0, 0, $stacked);
|
||||||
} else {
|
} 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=''>";
|
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"]);
|
array_push ($weights, $content2["weight"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
$graph_width = get_db_sql ("SELECT width FROM tgraph WHERE id_graph = ".$content["id_gs"]);
|
// Increase the height to fix the leyend rise
|
||||||
$graph_height= get_db_sql ("SELECT height FROM tgraph WHERE id_graph = ".$content["id_gs"]);
|
$sizgraph_h += count($modules) * 15;
|
||||||
|
|
||||||
|
|
||||||
$table->colspan[1][0] = 3;
|
$table->colspan[1][0] = 3;
|
||||||
$data = array ();
|
$data = array ();
|
||||||
|
|
|
@ -306,7 +306,7 @@ function getImageStatusElement($layoutData) {
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
//Critical (ALERT)
|
//Critical (ALERT)
|
||||||
$img = "4".$img."_bad.png";
|
$img .= "_bad.png";
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
//Normal (OK)
|
//Normal (OK)
|
||||||
|
|
|
@ -48,27 +48,31 @@ if ($delete_graph) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($view_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";
|
$sql="SELECT * FROM tgraph WHERE id_graph = $id";
|
||||||
$res=mysql_query($sql);
|
$graph = get_db_row_sql($sql);
|
||||||
if ($graph = mysql_fetch_array($res)){
|
|
||||||
$id_user = $graph["id_user"];
|
$id_user = $graph["id_user"];
|
||||||
$private = $graph["private"];
|
$private = $graph["private"];
|
||||||
$width = $graph["width"];
|
$width = $graph["width"];
|
||||||
$height = $graph["height"];
|
$height = $graph["height"] + count($sources) * 10;
|
||||||
$zoom = (int) get_parameter ('zoom', 0);
|
$zoom = (int) get_parameter ('zoom', 0);
|
||||||
|
//Increase the height to fix the leyend rise
|
||||||
if ($zoom > 0) {
|
if ($zoom > 0) {
|
||||||
switch ($zoom) {
|
switch ($zoom) {
|
||||||
case 1:
|
case 1:
|
||||||
$width = 500;
|
$width = 500;
|
||||||
$height = 210;
|
$height = 200 + count($sources) * 15;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$width = 650;
|
$width = 650;
|
||||||
$height = 310;
|
$height = 300 + count($sources) * 10;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$width = 770;
|
$width = 770;
|
||||||
$height = 400;
|
$height = 400 + count($sources) * 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -129,7 +133,6 @@ if ($view_graph) {
|
||||||
echo "</table>";
|
echo "</table>";
|
||||||
echo "</form>";
|
echo "</form>";
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Header
|
// Header
|
||||||
|
|
Loading…
Reference in New Issue