[racktables-users] Re: Report function
- From: Denis Ovsienko <pilot@xxxxxxxxxx>
- To: racktables-users@xxxxxxxxxxxxx
- Date: Wed, 25 Feb 2009 12:10:08 +0300
Hello, Roy.
> Is it possible to create custom reports?
> And if it is, is there a way to make it printable?
Yes, there are special means to embed own code. The simplest is to
create a standard PHP file "inc/local.php" with the following contents:
<?php
$localreports[] = array
(
'title' => 'My data',
'type' => 'custom',
'func' => 'myReportFunc'
);
function myReportFunc ()
{
echo 'Hello, world!';
}
?>
If you want to generate data in certain format, you could consider
having a completely independent script, which would be called directly
from command line to generate that output. In versions 0.16 or less
that's a little tricky, but possible. 0.17 should make having such
scripts simpler.
--
Denis Ovsienko
Other related posts: