Hi!
I don't know if there was this problem mentioned previously, there is too much pages to read it all, but I think I found bug in this plugin.
It's related to maxRRDValue. In file 'funct_runtime.php' on lines 87-92 is SQL query wich seem to be wrong.
There is:
Code: Select all
$sql = "SELECT b.id, a.rrd_maximum as maxRRDValue from data_template_rrd AS a
RIGHT JOIN reportit_data_items AS b ON (a.local_data_id = b.id)
WHERE a.data_template_id = 41
AND b.report_id = 14
AND a.data_source_name = '$data_source_name'
ORDER BY b.id";
And I think it should be something like this:
Code: Select all
$sql = "SELECT b.id, a.rrd_maximum as maxRRDValue from data_template_rrd AS a
RIGHT JOIN reportit_data_items AS b ON (a.local_data_id = b.id)
WHERE b.report_id = $report_id
AND a.data_source_name = '$data_source_name'
ORDER BY b.id";
In original there are fixed values for data_template_id and report_id. I think there shouldn't be clause for data_template_id and should be variable instead of fixed value for report_id.
With those changes it seem to work properly but I have only 2 reports for now.
I downloaded plugin from sourceforge. Point me if I'm right or wrong.
Regards.