Changeset 265


Ignore:
Timestamp:
01/02/11 02:12:38 (13 years ago)
Author:
nanardon
Message:
  • add statistics page (with graph)
Location:
server/trunk/web
Files:
10 added
4 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/Makefile.PL

    r173 r265  
    3030requires 'Catalyst::View::TT' => '0'; 
    3131requires 'Catalyst::View::JSON' => '0'; 
     32requires 'Catalyst::View::GD' => '0'; 
    3233requires 'Catalyst::Model::DBIC::Schema'; 
    3334requires 'Catalyst::Authentication::Store::DBIx::Class'; 
  • server/trunk/web/Sophie.spec.in

    r173 r265  
    2727BuildRequires: perl(Catalyst::View::TT) 
    2828BuildRequires: perl(Catalyst::View::JSON) 
     29BuildRequires: perl(Catalyst::View::GD) 
    2930BuildRequires: perl(DBIx::Class) 
    3031BuildRequires: perl(Catalyst::Plugin::Compress::Zlib) 
     
    3738BuildRequires: perl(XML::Simple) 
    3839BuildRequires: perl(XML::RSS) 
     40BuildRequires: perl(GD::Graph) 
    3941 
    4042Requires: perl(Catalyst) 
     
    4951Requires: perl(Catalyst::Plugin::Prototype) 
    5052Requires: perl(Catalyst::View::TT) 
     53Requires: perl(Catalyst::View::JSON) 
     54Requires: perl(Catalyst::View::GD) 
    5155Requires: perl(Catalyst::Plugin::Compress::Zlib) 
    5256Requires: perl-Catalyst-Plugin-Server 
     
    5458Requires: perl(Catalyst::Authentication::Store::DBIx::Class) 
    5559Requires: perl(XML::RSS) 
     60Requires: perl(GD::Graph) 
    5661# Requires: apache-mod_fastcgi 
    5762# Requires: perl(FCGI) 
  • server/trunk/web/lib/Sophie.pm

    r209 r265  
    5252        xml_encoding => 'UTF-8', 
    5353        show_errors => 1, 
     54    }, 
     55    'View::GD' => { 
     56        gd_image_type         => 'png',        # defaults to 'gif' 
     57        gd_image_content_type => 'images/png', # defaults to 'image/$gd_image_type' 
     58        gd_image_render_args  => [ 5 ],        # defaults to [] 
    5459    }, 
    5560 
  • server/trunk/web/lib/Sophie/Controller/Root.pm

    r247 r265  
    110110sub  end : Private { 
    111111    my ( $self, $c ) = @_; 
     112    if (!$c->stash->{current_view}) { 
     113        if (ref($c->stash->{xmlrpc}) eq 'HASH' && 
     114            $c->stash->{xmlrpc}{graph}) { 
     115            $c->stash->{current_view} = 'GD'; 
     116        } 
     117    } 
    112118    if (!$c->req->xmlrpc->method) { 
    113119        $c->forward('_end'); 
    114     } elsif (!$c->stash->{current_view}) { 
    115120    } 
    116121    $c->stash->{data} = $c->stash->{xmlrpc}; 
Note: See TracChangeset for help on using the changeset viewer.