AkurAI Build
Menu

Public repository / main

AkurAI-Build / app/pages/repository-insights.html

Latest change e8aa34a9be50d7d7ea72f66991ff82dfca7d23e1 - OLI-276: Git over SSH, forks and mirrors, code search through akurai-index, repository insights by Ólafur Búi Ólafsson

{% extends "layouts/base.html" %}
{% block title %}{{ page.repository.name }} / Insights - AkurAI Build{% endblock %}
{% block page %}repository-insights{% endblock %}
{% block body %}
<main class="{% if page.public %}ab-public{% else %}pt-app-content{% endif %}">
  {% if page.public %}{% include "partials/public-header.html" %}{% endif %}
  <p class="pt-breadcrumb"><a href="{{ page.repo_href }}">{{ page.repository.name }}</a><span aria-hidden="true">/</span><strong>Insights</strong></p>
  <section class="pt-panel">
    <div class="pt-panel-head">
      <div><h1>Insights</h1><p class="pt-summary-copy">Branch <code>{{ page.repository.default_branch }}</code>, last {{ page.days }} days.</p></div>
      <nav class="pt-insights-windows" aria-label="Window">
        {% for d in [30, 90, 365] %}<a href="{{ page.self_href }}?days={{ d }}" {% if d == page.days %}aria-current="page"{% endif %}>{{ d }} days</a>{% endfor %}
      </nav>
    </div>
    <dl class="pt-insights-totals">
      <div><dt>Commits</dt><dd>{{ page.commits }}</dd></div>
      <div><dt>Contributors</dt><dd>{{ page.contributors | length }}</dd></div>
      <div><dt>Lines added</dt><dd>{{ page.additions }}</dd></div>
      <div><dt>Lines removed</dt><dd>{{ page.deletions }}</dd></div>
    </dl>
  </section>
  <section class="pt-panel">
    <div class="pt-panel-head"><h2>Commits per week</h2></div>
    <ol class="pt-insights-weeks" aria-label="Commits per week, oldest first">
      {% for w in page.weeks %}
      <li><span class="pt-insights-week-label">week of <time data-unix="{{ w.start }}">{{ w.start }}</time></span><meter min="0" max="100" value="{{ w.percent }}" title="{{ w.commits }} commits, +{{ w.additions }} −{{ w.deletions }}">{{ w.commits }}</meter><b>{{ w.commits }}</b></li>
      {% endfor %}
    </ol>
  </section>
  <section class="pt-panel">
    <div class="pt-panel-head"><h2>Contributors</h2></div>
    <div class="pt-table-wrap" tabindex="0">
      <table class="pt-data-table">
        <thead><tr><th scope="col">Name</th><th scope="col">Commits</th><th scope="col">Share</th><th scope="col">Added</th><th scope="col">Removed</th><th scope="col">Last commit</th></tr></thead>
        <tbody>
          {% for c in page.contributors %}
          <tr><td><strong>{{ c.name }}</strong> <small class="pt-muted">{{ c.email }}</small></td><td>{{ c.commits }}</td><td><meter min="0" max="100" value="{{ c.percent }}">{{ c.percent }}%</meter></td><td>+{{ c.additions }}</td><td>−{{ c.deletions }}</td><td><time data-unix="{{ c.last_at }}">{{ c.last_at }}</time></td></tr>
          {% else %}<tr><td colspan="6">No commits in this window.</td></tr>{% endfor %}
        </tbody>
      </table>
    </div>
  </section>
  <section class="pt-panel">
    <div class="pt-panel-head"><h2>Most changed files</h2></div>
    <ol class="pt-commit-list">
      {% for f in page.files %}<li><code>{{ f.path }}</code> <small>{{ f.commits }} commits</small></li>{% else %}<li>Nothing changed in this window.</li>{% endfor %}
    </ol>
  </section>
  {% if page.public %}{% include "partials/public-footer.html" %}{% endif %}
</main>
{% endblock %}