2011-04-29 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_graph.php, include/graphs/functions_pchart.php, include/graphs/fgraph.php: back to previous version of Juan Manuel, because he update old version of trunk. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4290 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bc17bbc5aa
commit
0c6012fe58
|
@ -1,3 +1,9 @@
|
|||
2011-04-29 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* include/functions_graph.php, include/graphs/functions_pchart.php,
|
||||
include/graphs/fgraph.php: back to previous version of Juan Manuel, because
|
||||
he update old version of trunk.
|
||||
|
||||
2011-04-28 Junichi Satoh <junichi@rworks.jp>
|
||||
|
||||
* godmode/admin_access_logs.php: Fixed filter parameters are not
|
||||
|
|
|
@ -770,14 +770,16 @@ function progress_bar2($progress, $width, $height, $title = '', $mode = 1) {
|
|||
"&mode=" . $mode . "&out_of_lim_str=".$out_of_lim_str."&title=".$title."&font=".$config['fontpath']."' />";
|
||||
}
|
||||
|
||||
function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $daysWeek, $time_from, $time_to, $sla_limit, $width, $height) {
|
||||
function graph_sla_slicebar ($id, $period, $sla_min, $sla_max, $daysWeek,
|
||||
$time_from, $time_to, $sla_limit, $width, $height, $home_url) {
|
||||
global $config;
|
||||
|
||||
$days = json_decode ($daysWeek, true);
|
||||
$data = get_agentmodule_sla_array ($id, $period, $sla_min, $sla_max, $sla_limit, $days, $time_from, $time_to);
|
||||
$colors = array(1 => '#38B800', 2 => '#FFFF00', 3 => '#FF0000', 4 => '#C3C3C3');
|
||||
|
||||
return slicesbar_graph($data, $width, $height, $colors, $config['fontpath'], $config['round_corner']);
|
||||
return slicesbar_graph($data, $width, $height, $colors, $config['fontpath'],
|
||||
$config['round_corner'], $home_url);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,7 +92,8 @@ function progressbar($progress, $width, $height, $title, $font, $mode = 1, $out_
|
|||
}
|
||||
|
||||
|
||||
function slicesbar_graph($chart_data, $width, $height, $colors, $font, $round_corner) {
|
||||
function slicesbar_graph($chart_data, $width, $height, $colors, $font,
|
||||
$round_corner, $home_url = '') {
|
||||
$graph = array();
|
||||
$graph['data'] = $chart_data;
|
||||
$graph['width'] = $width;
|
||||
|
@ -103,7 +104,7 @@ function slicesbar_graph($chart_data, $width, $height, $colors, $font, $round_co
|
|||
|
||||
$id_graph = serialize_in_temp($graph);
|
||||
|
||||
return "<img src='include/graphs/functions_pchart.php?graph_type=slicebar&id_graph=".$id_graph."'>";
|
||||
return "<img src='".$home_url."include/graphs/functions_pchart.php?graph_type=slicebar&id_graph=".$id_graph."'>";
|
||||
}
|
||||
|
||||
function vbar_graph($flash_chart, $chart_data, $width, $height, $color = array(),
|
||||
|
|
|
@ -42,7 +42,6 @@ $yaxisname = '';
|
|||
$legend = null;
|
||||
$colors = null;
|
||||
$font_size = 8;
|
||||
$force_steps = true;
|
||||
|
||||
$graph_type = get_parameter('graph_type', '');
|
||||
|
||||
|
@ -62,16 +61,18 @@ if (!isset($graph)) {
|
|||
$data = $graph['data'];
|
||||
$width = $graph['width'];
|
||||
$height = $graph['height'];
|
||||
|
||||
if (isset($graph['color'])) {
|
||||
$colors = null;
|
||||
$force_steps = true;
|
||||
if (isset($graph['color']))
|
||||
$colors = $graph['color'];
|
||||
}
|
||||
if (isset($graph['legend'])) {
|
||||
$legend = null;
|
||||
if (isset($graph['legend']))
|
||||
$legend = $graph['legend'];
|
||||
}
|
||||
$xaxisname = '';
|
||||
if(isset($graph['xaxisname'])) {
|
||||
$xaxisname = $graph['xaxisname'];
|
||||
}
|
||||
$yaxisname = '';
|
||||
if(isset($graph['yaxisname'])) {
|
||||
$yaxisname = $graph['yaxisname'];
|
||||
}
|
||||
|
@ -376,6 +377,7 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width,
|
|||
|
||||
$water_mark_height = 0;
|
||||
$water_mark_width = 0;
|
||||
|
||||
if (!empty($water_mark)) {
|
||||
$size_water_mark = getimagesize($water_mark);
|
||||
$water_mark_height = $size_water_mark[1];
|
||||
|
@ -410,6 +412,7 @@ function pch_pie_graph ($graph_type, $data_values, $legend_values, $width,
|
|||
$max_chars = $len;
|
||||
}
|
||||
}
|
||||
|
||||
$legend_with_aprox = 32 + (7 * $max_chars);
|
||||
|
||||
$PieChart->drawPieLegend($width - $legend_with_aprox, 5, array("R"=>255,"G"=>255,"B"=>255, "BoxSize"=>10));
|
||||
|
@ -551,7 +554,7 @@ function pch_bar_graph ($graph_type, $index, $data, $width, $height, $font,
|
|||
"Mode"=>SCALE_MODE_START0, "LabelRotation" => 60);
|
||||
$margin_left = 40;
|
||||
$margin_top = 10;
|
||||
$margin_bottom = 10 * $max_chars;
|
||||
$margin_bottom = 8 * $max_chars;
|
||||
break;
|
||||
case "hbar":
|
||||
$scaleSettings = array("GridR"=>200,"GridG"=>200,"GridB"=>200,"DrawSubTicks"=>TRUE,
|
||||
|
|
Loading…
Reference in New Issue