3 <style type="text/css">
5 border-collapse: collapse;
17 <b><%= $rows %></b> items
19 % my @filters_active = keys %$filters;
20 % if ( @filters_active ) {
22 % foreach my $n ( @filters_active ) {
23 % my $title = $#{ $filters->{$n} } + 1;
24 % $title .= $title > 25 ? ' values' : ': ' . join(', ', @{ $filters->{$n} });
25 <a href="<%= url_for( action => 'facet' )->query( remove => $n ) %>" title="<%= $title %>">
28 <span class=count><%= $#filters_active + 1 %> active click to remove</span>
34 % foreach my $on_page ( 10,20,50,100,1000 ) {
35 <option <%= $limit == $on_page ? 'selected' : '' %>><%= $on_page %></option>
41 % if ( $offset + $limit > $rows ) {
42 <span class=count>all</span>
44 <span class=count><%= $offset + 1 %>-<%= $offset + $limit %></span>
47 <input type=submit value="refresh">
49 % my $export = param('export');
50 % session('export', $export );
51 <input type=checkbox name=export value=1 title="export" <%= $export ? 'checked' : '' %> >
52 % my $timefmt = param('timefmt') || session("timefmt");
53 % session('timefmt', $timefmt );
54 timefmt: <input name=timefmt value="<%= $timefmt %>" placeholder="%d.%m.%Y %H:%M:%S">
59 %= select_field with => [qw( points dots lines steps )]
61 <div style="float: right">
64 % my @hide_columns = @$columns; shift @hide_columns;
65 % foreach my $column ( @hide_columns ) {
66 <li><label><%= check_box gnuplot_hide => $column %><%= $column %></label></li>
71 % my @hide = map { ( gnuplot_hide => $_ ) } param('gnuplot_hide');
72 <img id=gnuplot src="<%= url_for( '/gnuplot' )->query( timefmt => $timefmt, @hide, with => param('with') ) %>">
77 <%= include 'data/items/' . session('show') %>
80 % my $url = url_for( action => 'items' )->query( offset => 0 );
81 % $url =~ s{=0}{=}; # FIXME url_for is very very slow
82 % foreach my $p ( 0 .. int( $rows / $limit ) ) {
83 % my $o = $p * $limit;
84 % if ( $o == $offset ) {
87 <a href="<%= $url . ( $p * $limit ) %>"><%= $p + 1 %></a>
93 <li>rows: <%= $rows %> offset: <%= $offset %> limit: <%= $limit %>
94 <li>columns: <%= join(',',@$columns) %>
95 <li>numeric: <%= dumper $numeric %>
96 <li>order: <%= session('order') %> sort: <%= session('sort') %>
97 %#<li>filters: <%= dumper $filters %>
100 <script type="text/javascript">
101 $(document).ready( function(){
102 $('select[name=limit]').change( function(){
103 console.debug( 'limit', this );
104 $(this).closest('form').submit();
106 $('input[name=export]').change( function(){
107 console.debug( 'export', this );
109 $(this).closest('form').submit();
111 $('select[name=with]').change( function(){
112 console.debug( 'with', this );
113 $('img#gnuplot').attr( 'src', '/gnuplot?' + $('form.info').serialize() );
115 $('ul input[name=gnuplot_hide]').change( function(){
116 console.debug( 'gnuplot_hide', this );
117 $('img#gnuplot').attr( 'src', '/gnuplot?' + $('form.info').serialize() );