/[SVNBrowser]/trunk/share/web/templates/stats
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/share/web/templates/stats

Parent Directory Parent Directory | Revision Log Revision Log


Revision 48 - (show annotations)
Wed Feb 7 11:51:30 2007 UTC (17 years, 2 months ago) by dpavlin
File size: 693 byte(s)
primitive stats of branches
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 </&>

  ViewVC Help
Powered by ViewVC 1.1.26