1 |
<%args> |
2 |
</%args> |
3 |
|
4 |
<%init> |
5 |
my $actions = SVNBrowser::Model::ActionCollection->new(); |
6 |
|
7 |
my $count = $actions->column( function => 'COUNT(branch)', column => 'commits' ); |
8 |
$actions->columns( qw/id branch/ ); |
9 |
$actions->group_by( column => 'branch' ); |
10 |
$actions->order_by( function => $count, order => 'DESC' ); |
11 |
$actions->unlimit; |
12 |
|
13 |
warn "action commits: ", $actions->build_select_query; |
14 |
|
15 |
use Data::Dump qw/dump/; |
16 |
|
17 |
</%init> |
18 |
|
19 |
<&| /_elements/wrapper, title => "SVN Reporitory statistics" &> |
20 |
|
21 |
<table> |
22 |
<tr><th>branch</th><th>commits</th></tr> |
23 |
|
24 |
% while (my $a = $actions->next) { |
25 |
% warn dump($a); |
26 |
<tr><td> |
27 |
<tt><% $a->branch %></tt> |
28 |
</td><td> |
29 |
<% $a->{values}->{commits} %> |
30 |
</td><tr> |
31 |
% } |
32 |
|
33 |
</table> |
34 |
|
35 |
</&> |