2009-07-01 Ramon Novoa <rnovoa@artica.es>
* include/functions_custom_graphs.php, include/fgraph.php, include/functions_fsgraph.php: Small fixes, mostly path related. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1785 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
cb61fa8044
commit
f51c3ac849
|
@ -1,3 +1,8 @@
|
|||
2009-07-01 Ramon Novoa <rnovoa@artica.es>
|
||||
|
||||
* include/functions_custom_graphs.php, include/fgraph.php,
|
||||
include/functions_fsgraph.php: Small fixes, mostly path related.
|
||||
|
||||
2009-06-01 Jorge Gonzalez <jorgegonz@artica.es>
|
||||
|
||||
* include/languages/es.po, include/languages/es.mo: Updated Spanish
|
||||
|
|
|
@ -327,7 +327,7 @@ function grafico_modulo_sparse ($id_agente_modulo, $period, $show_event,
|
|||
|
||||
if ($all_data === false) {
|
||||
if (! $graphic_type) {
|
||||
return fs_error_image ('../images');
|
||||
return fs_error_image ();
|
||||
}
|
||||
graphic_error ();
|
||||
}
|
||||
|
@ -800,6 +800,9 @@ function graph_event_module ($width = 300, $height = 200, $id_agent) {
|
|||
GROUP BY id_agentmodule LIMIT %d', $id_agent, $max_items);
|
||||
$events = get_db_all_rows_sql ($sql);
|
||||
if ($events === false) {
|
||||
if (! $graphic_type) {
|
||||
return fs_error_image ();
|
||||
}
|
||||
graphic_error ();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
global $config;
|
||||
if ($config['flash_charts']) {
|
||||
require_once ('include/fgraph.php');
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ function get_chart_code ($chart, $width, $height, $swf) {
|
|||
$output .= '<script type="text/javascript">
|
||||
<!--
|
||||
$(document).ready(function pie_' . $chart_id . ' () {
|
||||
var myChart = new FusionCharts("' . $swf . '", "' . $chart_id . '", "' . $width. '", "' . $height. '", "0", "1");
|
||||
var myChart = new FusionCharts("' . $config['homeurl'] . $swf . '", "' . $chart_id . '", "' . $width. '", "' . $height. '", "0", "1");
|
||||
myChart.setDataXML("' . addslashes($chart->getXML ()) . '");
|
||||
myChart.addParam("WMode", "Transparent");
|
||||
myChart.render("' . $div_id . '");
|
||||
|
@ -174,11 +174,11 @@ function fs_module_chart ($data, $width, $height, $avg_only = 1, $step = 10, $ti
|
|||
$div_id = 'chart_div_' . $random_number;
|
||||
$chart_id = 'chart_' . $random_number;
|
||||
$output = '<div id="' . $div_id. '" style="z-index:1;"></div>';
|
||||
$output .= '<script language="JavaScript" src="../../include/FusionCharts/FusionCharts.js"></script>';
|
||||
$output .= '<script language="JavaScript" src="' . $config['homeurl'] . '/include/FusionCharts/FusionCharts.js"></script>';
|
||||
$output .= '<script type="text/javascript">
|
||||
<!--
|
||||
function pie_' . $chart_id . ' () {
|
||||
var myChart = new FusionCharts("../../include/FusionCharts/FCF_MSArea2D.swf", "' . $chart_id . '", "' . $width. '", "' . $height. '", "0", "1");
|
||||
var myChart = new FusionCharts("' . $config['homeurl'] . '/include/FusionCharts/FCF_MSArea2D.swf", "' . $chart_id . '", "' . $width. '", "' . $height. '", "0", "1");
|
||||
myChart.setDataXML("' . addslashes($chart->getXML ()) . '");
|
||||
myChart.addParam("WMode", "Transparent");
|
||||
myChart.render("' . $div_id . '");
|
||||
|
@ -281,8 +281,10 @@ function clean_flash_string ($string) {
|
|||
}
|
||||
|
||||
// Prints an error image
|
||||
function fs_error_image ($image_dir = 'images') {
|
||||
return '<img border="0" src="' . $image_dir . '/image_problem.png" />';
|
||||
function fs_error_image () {
|
||||
global $config;
|
||||
|
||||
return '<img border="0" src="' . $config['homeurl'] . '/images/image_problem.png" />';
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue