xaizek / uncov (License: AGPLv3+) (since 2018-12-07)
Uncov(er) is a tool that collects and processes code coverage reports.
<root> / web / builds.ecpp (6c093106e0e85759ad9dfd44d27a74ebd027d4e3) (2,943B) (mode 100644) [raw]
<!--

Copyright (C) 2017 xaizek <xaizek@posteo.net>

This file is part of uncov.

uncov is free software: you can redistribute it and/or modify
it under the terms of version 3 of the GNU Affero General Public License as
published by the Free Software Foundation.

uncov is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with uncov.  If not, see <http://www.gnu.org/licenses/>.

-->

<%pre>
    #include <string>

    #include <boost/range/adaptor/reversed.hpp>

    #include "BuildHistory.hpp"
    #include "listings.hpp"

    extern BuildHistory *globalBH;
</%pre>

<%cpp>
    const std::string branch = request.getArg("branch");
</%cpp>

<html>

<head>
    <title>All builds | uncov</title>

    <%include>web/header.ecpp</%include>
</head>

<body>
    <div class="sidenav">
        <a href="/builds">All builds</a>
%       if (!branch.empty()) {
            <a class="branch" href="/branches/<$ branch $>">Current branch</a>
%       }
    </div>

    <div class="rightbar">

    <div class="bargroup">
        <span class="barelem">
%       if (branch.empty()) {
            List of all builds
%       } else {
            List of builds on a ref
%       }
        </span>
    </div>

    <%include>web/footer.ecpp</%include>
    </div>

%// TODO: display repository description somewhere here

    <table>

    <tr>
    <th>Build</th>
    <th>Coverage</th>
    <th>C/R Lines</th>
    <th>Cov Change</th>
    <th>C/U/R Line Changes</th>
    <th>Ref</th>
    </tr>

%   std::vector<Build> builds = branch.empty()
%                             ? globalBH->getBuilds()
%                             : globalBH->getBuildsOn(branch);
%   namespace adaptors = boost::adaptors;
%   for (const Build &build : adaptors::reverse(builds)) {
        <tr>
%       const std::vector<std::string> descr = describeBuild(globalBH, build,
%                                                            DoExtraAlign{},
%                                                            DoSpacing{});
        <td><a class="nav" href="/builds/<$ std::to_string(build.getId()) $>"><$$ descr[0] $></a></td>
%       for (const std::string &cell : { descr[1], descr[2], descr[3],
%                                        descr[4] }) {
            <td><$$ cell $></td>
%       }

        <td>
            <div class="tooltip">
                <span class="tooltipobj">
                    <a class="branch" href="/branches/<$ descr[5] $>">
                        <$$ descr[5] $>
                    </a>
                </span>
                <span class="tooltiptext">
                    <$$ descr[6] $>
                </span>
            </div>
        </td>
        </tr>
%   }

    </table>
</body>

</html>
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/uncov

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/uncov

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master