From 09225cc69415692b6c70df1eafa4697de8fab505 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 24 Feb 2015 18:46:50 +0100 Subject: add /bar --- index.pl | 6 ++++++ templates/bargraph.html.ep | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 templates/bargraph.html.ep diff --git a/index.pl b/index.pl index 8912c69..f11cf2b 100644 --- a/index.pl +++ b/index.pl @@ -212,6 +212,12 @@ get '/all' => sub { return; }; +get '/bar' => sub { + my $self = shift; + $self->render('bargraph'); + return; +}; + app->config( hypnotoad => { accepts => 10, diff --git a/templates/bargraph.html.ep b/templates/bargraph.html.ep new file mode 100644 index 0000000..310220f --- /dev/null +++ b/templates/bargraph.html.ep @@ -0,0 +1,7 @@ +%= javascript begin + +show_bargraph('/2ddata.tsv?aggregate=<%= param('xsource') %>&metric=<%= param('ysource') %>', + '<%= param('title') %>', + '<%= param('xlabel') %>', '<%= param('ylabel') %>', '<%= param('yformat') %>', + '<%= param('width') %>', '<%= param('height') %>'); +% end -- cgit v1.2.3