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');
53 % session('timefmt', $timefmt );
54 timefmt: <input name=timefmt value="<%= $timefmt %>">
59 <img id=gnuplot src="/gnuplot?timefmt=<%= $timefmt %>">
62 <%= include 'data/items/' . session('show') %>
65 % my $url = url_for( action => 'items' )->query( offset => 0 );
66 % $url =~ s{=0}{=}; # FIXME url_for is very very slow
67 % foreach my $p ( 0 .. int( $rows / $limit ) ) {
68 % my $o = $p * $limit;
69 % if ( $o == $offset ) {
72 <a href="<%= $url . ( $p * $limit ) %>"><%= $p + 1 %></a>
78 <li>rows: <%= $rows %> offset: <%= $offset %> limit: <%= $limit %>
79 <li>columns: <%= join(',',@$columns) %>
80 <li>numeric: <%= dumper $numeric %>
81 <li>order: <%= session('order') %> sort: <%= session('sort') %>
82 <li>filters: <%= dumper $filters %>
85 <script type="text/javascript">
86 $(document).ready( function(){
87 $('select[name=limit]').change( function(){
88 console.debug( 'limit', this );
89 $(this).closest('form').submit();
91 $('input[name=export]').change( function(){
92 console.debug( 'export', this );
94 $(this).closest('form').submit();