stackalytics/dashboard/templates/engineer_details.html
Ilya Shakhat 6c33901c05 Fixed issue with missing commits for unmapped users
* Introduced syntetic primary key for user instead of launchpad id
* Removed start_date from release definition
* Normalize release data in storage
* Launchpad query to prod instead of stage

Change-Id: I647b197857ddf92bbd3b8c50ada6f02eaeaba5fb
2013-07-30 19:40:34 +04:00

95 lines
3.1 KiB
HTML

{% extends "layout.html" %}
{% block title %}
{{ user.user_name }}
{% endblock %}
{% block scripts %}
<script type="text/javascript">
chartAndTableRenderer("/data/modules", "right_list", "right_chart", "/modules/", {launchpad_id: "{{ launchpad_id }}" });
timelineRenderer({launchpad_id: "{{ launchpad_id }}" })
</script>
{% endblock %}
{% block left_frame %}
<div style='float: left;'>
<img src="{{ user.emails[0]|gravatar(size=64) }}">
</div>
<div style='margin-left: 90px;'>
<h2 style='margin-bottom: 0.5em;'>{{ user.user_name }}</h2>
{% if user.companies %}
<div>Company: {{ user.companies[-1].company_name|link('/companies/' + user.companies[-1].company_name)|safe }}</div>
{% endif %}
{% if user.launchpad_id %}
<div>Launchpad: <a href="https://launchpad.net/~{{ user.launchpad_id }}">{{ user.launchpad_id }}</a></div>
{% endif %}
</div>
<h3>Commits history</h3>
{% if not commits %}
<div>There are no commits for selected release or project type.</div>
{% endif %}
{% for rec in commits %}
<div>
<h4>{{ rec.date|datetimeformat }} to <a href="https://launchpad.net/{{ rec.module }}">{{ rec.module }}</a>
{% if user.companies[-1].company_name != rec.company_name %}
(
{{ rec.company_name|link('/companies/' + rec.company_name)|safe }}
)
{% endif %}
</h4>
{% if rec.correction_comment %}
<div style='font-weight: bold; color: red; padding-left: 2em;'>Commit corrected: {{ rec.correction_comment }}</div>
{% endif %}
<div style='font-weight: bold; padding-left: 2em;'>{{ rec.subject }}</div>
<div style='white-space: pre-wrap; padding-left: 2em;'>{{ rec|commit_message|safe }}</div>
<div style="padding-left: 2em;"><span style="color: green">+ {{ rec.lines_added }}</span>
<span style="color: red">- {{ rec.lines_deleted }}</span></div>
</div>
{% endfor %}
{% endblock %}
{% block right_frame %}
{% if commits %}
<h2>Contribution by modules</h2>
<div id="right_chart" style="width: 100%; height: 350px;"></div>
<table id="right_list" class="display">
<thead>
<tr>
<th>#</th>
<th>Module</th>
<th>{{ metric_label }}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="spacer"></div>
{% include "commits_overview.html" %}
<h4>Contribution per companies:</h4>
{% for company_info in user.companies %}
<div>
{% set company_name = company_info.company_name %}
{{ company_name|link('/companies/' + company_name)|safe }}:
<b>{{ companies[company_name].commits }}</b> commits and
<b>{{ companies[company_name].loc }}</b> LOC
</div>
{% endfor %}
{% endif %}
<h4>Marks</h4>
{% for mark in [-2, -1, 0, 1, 2] %}
<div>{{ mark }}: {{ marks[mark] }}</div>
{% endfor %}
{% endblock %}