show number of items in each loaded file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 May 2010 22:23:41 +0000 (00:23 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 May 2010 22:23:41 +0000 (00:23 +0200)
templates/data/index.html.ep

index dd48103..8e132c2 100644 (file)
@@ -4,7 +4,7 @@
 <form method=post action=/data/load >
 
 <table>
-<tr><th>name</th><th title="on disk">bytes</th><th title="loaded in memory">m</th><th>columns</th></tr>
+<tr><th>name</th><th title="on disk">bytes</th><th>items</th><th title="loaded in memory">m</th><th>columns</th></tr>
 % foreach my $n ( @$files ) {
 <tr><td>
 <label>
@@ -12,6 +12,7 @@
 <%= $n %>
 </label>
 </td><td align=right><%= $size->{$n} %>
+</td><td align=right><%= defined $loaded->{$n}->{data} ? $#{ $loaded->{$n}->{data}->{items} } + 1 : '' %>
 </td><td><input name=paths type=checkbox value="<%= $n %>" <%= defined $loaded->{$n}->{stats} ? 'checked' : '' %>>
 </td><td>
 %  if ( defined $loaded->{$n}->{header} ) {