add a db stats page.
[sgn.git] / lib / SGN / Controller / Static.pm
blob689b9d6f23a8cd5faba89a0c217cb97a91326f91
3 =head1 NAME
5 SGN::Controller::Static - a controller for dispatching to static pages
7 =head1 DESCRIPTION
9 SGN has some static pages that don't merit their own controller. The purpose of this one is to have one common controller for all the static pages that don't fit anywhere else.
11 Please feel free to add your own pages. The actions should essentially just link to a mason component for display.
13 =head1 AUTHOR
15 Lukas Mueller <lam87@cornell.edu>
17 =cut
20 package SGN::Controller::Static;
22 use Moose;
24 BEGIN { extends 'Catalyst::Controller'; }
28 sub ethz_cass_sync :Path('/ethz_cass/sync/') :Args(0) {
29 my $self = shift;
30 my $c = shift;
31 #This mason component is in cassbase git repo.
32 $c->stash->{template} = '/stock/ethz_cass_sync.mas';
35 sub varitome_project_page :Path('/projects/varitome/') Args(0) {
36 my $self = shift;
37 my $c = shift;
38 $c->stash->{template} = '/projects/varitome/index.mas';
41 sub test_authentication :Path('/test_authentication/') :Args(0) {
42 my $self = shift;
43 my $c = shift;
44 $c->stash->{template} = '/test/test_authenticate.mas';
47 sub solanaceae_project_afri :Path('/solanaceae-project/afri-sol/') {
48 my ($self, $c) = @_;
49 $c->stash->{template} = '/links/afri_sol.mas';
53 sub sgn_events :Path('/sgn-events/') {
54 my ($self, $c) = @_;
55 $c->stash->{template} = '/homepage/sgn_events.mas';
59 sub phenotype_select : Path('/phenome/select') {
60 my ($self, $c) = @_;
62 $c->stash->{template} = '/phenome/select.mas';
67 sub list_test : Path('/list/test') {
68 my ($self, $c) = @_;
70 $c->stash->{template}= '/list/index.mas';
71 $c->stash->{user_id} = $c->user();
74 sub usage_policy : Path('/usage_policy') {
75 my ($self, $c) = @_;
76 $c->stash->{template} = '/usage_policy.mas';
79 sub ted : Path('/ted') Args(0) {
80 my ($self, $c) = @_;
81 my $uri = $c->request->uri->as_string();
83 my ($protocol, $empty, $server, $ted, @rest) = split "/", $uri;
85 $c->stash->{page_title} = "Tomato Expression Database";
86 $c->stash->{param_string} = join "/", @rest;
87 $c->stash->{server} = 'ted.sgn.cornell.edu';
88 $c->stash->{port} = "80"; # get this from conf...
89 $c->stash->{template} = '/site/iframe.mas';