Commit Graph

10 Commits (lh/grep)

Author SHA1 Message Date
Lars Hjemli 9acd1cf137 ui-stats.c: fix invalid html
Found by http://validator.w3.org.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
13 years ago
Lars Hjemli 1b5c336cc9 ui-stats.c: create a control panel for stat options
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
13 years ago
Johan Herland 17596459fe ui-stats: Remove unnecessary #include
<string-list.h> is already #included from cgit.h

Signed-off-by: Johan Herland <johan@herland.net>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Mark Lodato e4ddc8f72b fix errors in printf-style format strings
There were many places where the arguments to a printf-like function did
not match the format string.  Mostly, these were a missing 'l' flag, but
there were three exceptions:

- In ui-stats.c, a size_t argument must be printed.  C99 has the "%zu"
  flag for this purpose, but not all compilers support this.  Therefore,
  we mimic what git does - use a NO_C99_FORMAT Makefile variable.

- In ui-stats.c, cgit_print_error() was called with a pointer instead of
  a character.

- In ui-log.c, the "columns" argument was never used.

Signed-off-by: Mark Lodato <lodatom@gmail.com>
14 years ago
Lars Hjemli 6d7552bc07 Use GIT-1.7.2.2
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
14 years ago
Lars Hjemli b47b7bd1d0 Add and use cgit_find_stats_periodname() in print_repo()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
15 years ago
Lars Hjemli b54ef9749c ui-stats.c: reuse cgit_add_hidden_formfields()
This makes sure that the currect branch and path is preserved when
changing the stats period or author count.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli fb2f3f6c29 ui-stats: replace 'enable-stats' setting with 'max-stats'
The new 'max-stats' and 'repo.max-stats' settings makes it possible to
define the maximum statistics period, both globally and per repo. Hence,
it is now feasible to allow statistics on repositories with a high commit
frequency, like linux-2.6, by setting repo.max-stats to e.g. 'month'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli c6a6aa2186 ui-stats: enable path-filtered stats
When a path is specified on the querystring the commit statistics will
now be filtered by this path.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago
Lars Hjemli f86a23ff53 Add a 'stats' page to each repo
This new page, which is disabled by default, can be used to print some
statistics about the number of commits per period in the repository,
where period can be either weeks, months, quarters or years.

The function can be activated globally by setting 'enable-stats=1' in
cgitrc and disabled for individual repos by setting 'repo.enable-stats=0'.

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
16 years ago