stackalytics/stackalytics/dashboard/templates/cncf.html

227 lines
7.1 KiB
HTML

{% extends "cncf_layout.html" %}
{% import '_macros/activity_log.html' as activity_log %}
{% import '_macros/contribution_summary.html' as contribution_summary %}
{% import '_macros/user_profile.html' as user_profile %}
{% import '_macros/module_details.html' as module_details %}
{% set show_company_breakdown = (not company) and (not user_id) %}
{% set show_engineer_breakdown = (not user_id) %}
{% set show_bp_breakdown = (metric in ['bpd', 'bpc']) %}
{% set show_module_breakdown = (not module) %}
{% set show_languages_breakdown = (metric in ['translations']) %}
{% set show_user_activity = (user_id) %}
{% set show_module_activity = (module) and (not user_id) %}
{% set show_activity = (show_user_activity) or (show_module_activity) %}
{% set show_contribution_on_left = (not user_id) and (module) %}
{% set show_contribution_on_right = (user_id) or (company and not module) %}
{% set show_user_profile = (user_id) %}
{% set show_module_details = (module) %}
{% set show_review_ratio = (metric in ['marks']) %}
{% block scripts %}
<script type="text/javascript">
{% if show_module_details %}
//renderTimeline();
{% endif %}
{% if show_company_breakdown %}
renderTableAndChart("/api/1.0/stats/companies", "company_container", "company_table", "company_chart", "company");
{% endif %}
{% if show_engineer_breakdown %}
renderTableAndChart("/api/1.0/stats/engineers", "engineer_container", "engineer_table", "engineer_chart", "user_id");
{% endif %}
{% if show_bp_breakdown %}
renderTableAndChart("/api/1.0/stats/bp", "bp_container", "bp_table", "bp_chart", "name",
["index", "link", "status", "date", "metric"]);
{% endif %}
{% if show_module_breakdown %}
renderTableAndChart("/api/1.0/stats/modules", "module_container", "module_table", "module_chart", "module");
{% endif %}
{% if show_languages_breakdown %}
renderTableAndChart("/api/1.0/stats/languages", "language_container", "language_table", "language_chart", "language");
{% endif %}
</script>
{% endblock %}
{% block left_frame %}
{% if show_module_details %}
{{ module_details.show_module_details(module=module) }}
{% endif %}
{% if show_user_profile %}
{{ user_profile.show_user_profile(user_id=user_id) }}
{% endif %}
{% if show_company_breakdown %}
<div id="company_container">
<div class="row">
<div class="col-xl-12">
<h2>Commits by Company {% if user_id %} <span style="color: #15c3de;">|</span> {{ user_inst.user_name }}{% endif %}</h2>
</div>
</div>
<div class="row">
<div class="col-xl-6 order-xl-last">
<div id="company_chart"></div>
</div>
<div class="col-xl-6 order-xl-first">
<table id="company_table" class="display">
<thead>
<tr>
<th>#</th>
<th>Company</th>
<th>Commits</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
{% endif %}
{% if show_module_breakdown %}
<div id="module_container">
<div class="row">
<div class="col-xl-12">
<h2>Commits by Project {% if company %} <span style="color: #15c3de;">|</span> {{ company_original }}{% endif %} {% if user_id %} <span style="color: #15c3de;">|</span> {{ user_inst.user_name }}{% endif %}</h2>
</div>
</div>
<div class="row">
<div class="col-xl-6 order-xl-last">
<div id="module_chart"></div>
</div>
<div class="col-xl-6 order-xl-first">
<table id="module_table" class="display">
<thead>
<tr>
<th>#</th>
<th>Project</th>
<th>Commits</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
{% endif %}
{% if show_engineer_breakdown %}
<div id="engineer_container">
<h2>Commits by Contributor {% if company %} <span style="color: #15c3de;">|</span> {{ company_original }}{% endif %} {% if user_id %} <span style="color: #15c3de;">|</span> {{ user_inst.user_name }}{% endif %}</h2>
<table id="engineer_table" class="display">
<thead>
<tr>
<th>#</th>
<th>Contributor</th>
<th>Commits</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
{% endif %}
{% if show_contribution_on_left %}
{{ contribution_summary.show_contribution_summary(show_all=False) }}
{% endif %}
{% if show_contribution_on_right %}
{{ contribution_summary.show_contribution_summary(show_all=False) }}
{% endif %}
{% if show_user_activity %}
{{ activity_log.show_activity_log(gravatar_size=32, show_all=False) }}
{% endif %}
{% if show_module_activity %}
{{ activity_log.show_activity_log(gravatar_size=32, show_all=False) }}
{% endif %}
{% if show_contribution_on_left %}
{% endif %}
{% if show_contribution_on_right %}
{% endif %}
{% if show_bp_breakdown %}
<div id="bp_container">
<h2>Blueprint popularity</h2>
<div style="font-style: italic;">
This metric shows how many times a blueprint was mentioned in emails and commit messages.
</div>
<div id="bp_chart" style="width: 300px;height:285px;" width="300" height="285"></div>
<table id="bp_table" class="display">
<thead>
<tr>
<th>#</th>
<th>Blueprint</th>
<th>Status</th>
<th>Date</th>
<th>Mentions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="spacer"></div>
</div>
{% endif %}
{% if show_languages_breakdown %}
<div id="language_container">
<h2>Languages</h2>
<div id="language_chart" style="width: 300px;height:285px;" width="300" height="285"></div>
<table id="language_table" class="display">
<thead>
<tr>
<th>#</th>
<th>Language</th>
<th>Translations</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="spacer"></div>
</div>
{% endif %}
{% endblock %}
{% block center_frame %}
{% endblock %}
{% block right_frame %}
{% endblock %}