Ignore:
Timestamp:
Nov 1, 2010, 12:20:34 AM (11 years ago)
Author:
Peter Johansson
Message:

closes #228. Added count number of files and directories on first page. No count for individual authors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/first_page.cc

    r1253 r1254  
    3131#include "HtmlStream.h"
    3232#include "html_utility.h"
     33#include "NodeCounter.h"
    3334#include "Stats.h"
    3435#include "StatsCollection.h"
     
    5253
    5354  void print_main_page(const std::string& dir, const SVNlog& log,
    54                        const StatsCollection& stats, std::string url)
     55                       const StatsCollection& stats, std::string url,
     56                       const NodeCounter& node_counter)
    5557  {
    5658    std::string filename="index.html";
     
    7375
    7476    print_summary_plot(os, stats["classic"]);
    75     print_general_information(os, log, authors.size(), url);
     77    print_general_information(os, log, authors.size(), url, node_counter);
    7678    sort(latest_commit.begin(), latest_commit.end(), GreaterRevision());
    7779    print_authors(os, latest_commit, stats["classic"]);
     
    8385
    8486  void print_general_information(std::ostream& os, const SVNlog& log,
    85                                  size_t nof_authors, std::string url)
     87                                 size_t nof_authors, std::string url,
     88                                 const NodeCounter& node_counter)
    8689  {
    8790    assert(log.commits().size());
     
    116119       << "</td></tr>\n"
    117120       << "<tr><td>Number of Authors:</td><td>" << nof_authors
     121       << "</td></tr>\n"
     122       << "<tr><td>Number of Directories:</td><td>"
     123       << node_counter.directories()
     124       << "</td></tr>\n"
     125       << "<tr><td>Number of Files:</td><td>"
     126       << node_counter.files()
    118127       << "</td></tr>\n"
    119128       << "</tbody>\n"
Note: See TracChangeset for help on using the changeset viewer.