Catalyst::View::RRDGrapUhs(e3r)Contributed Perl DocumentCaattiaolnyst::View::RRDGraph(3)



NNAAMMEE
      Catalyst::View::RRDGraph - RRD Graph View Class

SSYYNNOOPPSSIISS
      use the helper to create your View myapp_create.pl view RRDGraph RRD‐
      Graph

      from the controller:

        sub routine :Local {
          my ($self, $c) = @_;

          $c->stash->{’graph’} = [
                  "--lower-limit", "0",
                  "--start", "end-1d",
                  "--vertical-label", "My Label",
                  "--height", 600,
                  "--width", 300,
                  "DEF:Data=/path/to/rrd.rrd:data:AVERAGE",
                  "AREA:Data#0000FF:Data "
          ];
          $c->forward(’MyApp::View::RRDGraph’);
        }

DDEESSCCRRIIPPTTIIOONN
      This view generates RRD graph images from the graph defintion placed in
      the stash. The controller is responsable of placing an ARRAYREF in
      $$cc--stash->{’graph’}> with the same data as to generate a graph with the
      RRDs module, except for _f_i_l_e_n_a_m_e, that will be automatically generated
      by the view.

CCOONNFFIIGGUURRAATTIIOONN
      Configurations for the view are:

      IIMMGG__DDIIRR

      Directory to generate temporary image files. Defaults to //ttmmpp//

      IIMMGG__FFOORRMMAATT

      Image format for the generated files. ’PNG’ by default.

      OONN__EERRRROORR__SSEERRVVEE

      On error, if this config value is set, the file to which it points will
      be served (so you can serve an "error image" file to the user). Alter‐
      nately, it can be set to a code reference, that will called with $$sseellff,
      $$cc and $$eerrrroorr. You can then generate your own content in this handler.
      Default (leaving undefined) is to throw an expception.

      See http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html for more info.

MMEETTHHOODDSS
      nneeww

      Constructor.

      pprroocceessss

      Called internally by Catalyst when the view is used.

AAUUTTHHOORR
          Jose Luis Martinez
          CPAN ID: JLMARTIN
          CAPSiDE
          [email protected]
          http://www.pplusdomain.net

TTHHAANNKKSS
      To Ton Voon for sending in patches, tests, and ideas.

CCOOPPYYRRIIGGHHTT
      This program is free software; you can redistribute it and/or modify it
      under the same terms as Perl itself.

      The full text of the license can be found in the LICENSE file included
      with this module.

SSEEEE AALLSSOO
      RRDs: http://oss.oetiker.ch/rrdtool/prog/RRDs.en.html

      RRD graph docs: http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html,
      http://oss.oetiker.ch/rrdtool/doc/rrdgraph_data.en.html,
      http://oss.oetiker.ch/rrdtool/doc/rrdgraph_graph.en.html



perl v5.8.8                       2008-10-26       Catalyst::View::RRDGraph(3)