From: Dobrica Pavlinusic Date: Thu, 7 Apr 2011 19:54:40 +0000 (+0000) Subject: checkbox to include gnuplot dump, off by default X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=3b1ccd97905bb26c05f435fc6a7a0ceb86c83a73;p=APKPM.git checkbox to include gnuplot dump, off by default --- 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); };