Fossil

Check-in [fd74734bf8]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed a C++-ism. Added a note for a potential improvement.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fd74734bf87ada4dc1ae21298720a589b7adf0f5
User & Date: stephan 2013-05-04 20:45:39.488
Context
2013-05-04
21:36
Added a missing db_finalize(). Replaced a TODO text with the corresponding code. Changed timeline page header when the ym=YYYY-MM param is set. ... (check-in: d16c09f8c1 user: stephan tags: trunk)
20:45
Fixed a C++-ism. Added a note for a potential improvement. ... (check-in: fd74734bf8 user: stephan tags: trunk)
20:39
Added initial version of /activity page, intended to show "activity reports." Currently shows commit count by month. ... (check-in: 495bf1ea8d user: stephan tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/timeline.c.
1854
1855
1856
1857
1858
1859
1860
1861
1862






1863
1864
1865
1866
1867
1868
1869
  @ <th>Commits</th>
  @ <th><!-- relative commits graph --></th>
  @ </thead><tbody>
  while( SQLITE_ROW == db_step(&query) ){
    char const * zMonth = db_column_text(&query, 0);
    int const nCount = db_column_int(&query, 1);
    int const nSize = nPixelsPerCommit * nCount;
    nCommitCount += nCount;
    char rowClass = ++nRowNumber % 2;






    @<tr class='row%d(rowClass)'>
    @ <td>
    @ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a>
    @ </td><td>%d(nCount)</td>
    @ <td>
    @ <div class='activity-graph-line' style='height:16px; width:%d(nSize)px;'>
    @ </div></td>







<

>
>
>
>
>
>







1854
1855
1856
1857
1858
1859
1860

1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
  @ <th>Commits</th>
  @ <th><!-- relative commits graph --></th>
  @ </thead><tbody>
  while( SQLITE_ROW == db_step(&query) ){
    char const * zMonth = db_column_text(&query, 0);
    int const nCount = db_column_int(&query, 1);
    int const nSize = nPixelsPerCommit * nCount;

    char rowClass = ++nRowNumber % 2;
    nCommitCount += nCount;
    /**
     * Potential improvement: set nCount to exactly the number of
     * events for the month. Keep in mind that this query only counts
     * 'ci' events but we link to the timeline for all event types.
     */
    @<tr class='row%d(rowClass)'>
    @ <td>
    @ <a href="%s(g.zTop)/timeline?ym=%s(zMonth)&n=%d(nTimelineCount)" target="_new">%s(zMonth)</a>
    @ </td><td>%d(nCount)</td>
    @ <td>
    @ <div class='activity-graph-line' style='height:16px; width:%d(nSize)px;'>
    @ </div></td>