checkbox to include gnuplot dump, off by default
authorDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 7 Apr 2011 19:54:40 +0000 (19:54 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Thu, 7 Apr 2011 19:54:48 +0000 (19:54 +0000)
templates/gnuplot.html.ep
web_ui.pl

index 6cb9816..6ec7b4b 100644 (file)
@@ -3,6 +3,7 @@
  <%= text_area 'sql', cols => 80, rows => 5 %>
  <br>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 ) {
 <img src="<%= $img %>">
index 742252f..930fa47 100755 (executable)
--- 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);
 };