From 3b1ccd97905bb26c05f435fc6a7a0ceb86c83a73 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 7 Apr 2011 19:54:40 +0000 Subject: [PATCH] checkbox to include gnuplot dump, off by default --- templates/gnuplot.html.ep | 1 + web_ui.pl | 2 ++ 2 files changed, 3 insertions(+) diff --git a/templates/gnuplot.html.ep b/templates/gnuplot.html.ep index 6cb9816..6ec7b4b 100644 --- a/templates/gnuplot.html.ep +++ b/templates/gnuplot.html.ep @@ -3,6 +3,7 @@ <%= text_area 'sql', cols => 80, rows => 5 %>
with <%= select_field with => [qw(dots points steps lines)], 'dots' %> <%= submit_button 'execute' %> + <%= check_box 'include_gnuplot' => 1, title => 'include gnuplot dump' %> <% end %> % if ( $img ) { diff --git a/web_ui.pl b/web_ui.pl index 742252f..930fa47 100755 --- a/web_ui.pl +++ b/web_ui.pl @@ -136,6 +136,8 @@ set format x "%H:%M\\n%d" print $fd $gnuplot; close($fd); + $gnuplot = '' unless $self->param('include_gnuplot'); + $self->render('gnuplot', sql => $sql, img => "/gnuplot/$name", gnuplot => $gnuplot); }; -- 2.20.1