347 lines
14 KiB
HTML
347 lines
14 KiB
HTML
{# bs5ok #}
|
|
{% extends "base.html" %}
|
|
{% load origin %}
|
|
{% origin %}
|
|
{% load ietf_filters static django_bootstrap5 %}
|
|
{% block pagehead %}
|
|
<link rel="stylesheet" href="{% static "ietf/css/list.css" %}">
|
|
<link rel="stylesheet" href="{% static 'ietf/css/datepicker.css' %}">
|
|
{% endblock %}
|
|
{% block content %}
|
|
{% origin %}
|
|
<h1>
|
|
{% block title %}
|
|
{% if level == "team" %}
|
|
Statistics for review teams
|
|
{% elif level == "reviewer" %}
|
|
Statistics for reviewers in {{ reviewers_for_team.name }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
</h1>
|
|
{% if level == "reviewer" %}
|
|
<p>
|
|
<a href="{{ team_level_url }}">« Back to teams</a>
|
|
</p>
|
|
{% endif %}
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Show:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_stats_types %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug == stats_type %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Count:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_count_choices %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug == count %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<form class="date-range">
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Request time:</label>
|
|
<div class="col-sm-10">
|
|
<div class="input-group">
|
|
<input class="form-control"
|
|
type="text"
|
|
name="from"
|
|
value="{{ from_date }}"
|
|
data-provide="datepicker"
|
|
data-date-format="yyyy-mm-dd"
|
|
data-date-autoclose="1"
|
|
data-date-orientation="auto bottom"
|
|
data-date-end-date="{{ today.isoformat }}"
|
|
data-date-start-view="months">
|
|
<span class="input-group-text" id="basic-addon2">—</span>
|
|
<input class="form-control"
|
|
type="text"
|
|
name="to"
|
|
value="{{ to_date }}"
|
|
data-provide="datepicker"
|
|
data-date-format="yyyy-mm-dd"
|
|
data-date-autoclose="1"
|
|
data-date-orientation="auto bottom"
|
|
data-date-end-date="{{ today.isoformat }}"
|
|
data-date-start-view="months">
|
|
{% for name, value in request.GET.iteritems %}
|
|
{% if name != "from" and name != "to" %}<input type="hidden" name="{{ name }}" value="{{ value }}">{% endif %}
|
|
{% endfor %}
|
|
<button class="btn btn-primary" type="submit">Set</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% if stats_type == "time" %}
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Team:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_teams %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug in selected_teams %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% if selected_teams %}
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Completion:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_completion_types %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug == selected_completion_type %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">
|
|
{{ label }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">Result:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_results %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug == selected_result %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
<div class="row my-3">
|
|
<label class="fw-bold col-sm-2 col-form-label">State:</label>
|
|
<div class="btn-group col-sm-10">
|
|
{% for slug, label, url in possible_states %}
|
|
<a class="btn btn-outline-primary
|
|
{% if slug == selected_state %}
|
|
active
|
|
{% endif %}"
|
|
href="{{ url }}">{{ label }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if stats_type == "completion" %}
|
|
<h2>Completion status and completion time</h2>
|
|
<table class="review-stats table table-sm table-striped tablesorter">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="{{ level }}">
|
|
{% if level == "team" %}
|
|
Team
|
|
{% elif level == "reviewer" %}
|
|
Reviewer
|
|
{% endif %}
|
|
</th>
|
|
<th data-sort="num"
|
|
title="Requests that are currently requested or accepted by reviewer">Open in time</th>
|
|
<th data-sort="num"
|
|
title="Requests that are currently requested or accepted by reviewer and past the deadline">
|
|
Open late
|
|
</th>
|
|
<th data-sort="num"
|
|
title="Requests that have been completed partially or completely">Completed in time</th>
|
|
<th data-sort="num"
|
|
title="Requests that have been completed partially or completely past the deadline">
|
|
Completed late
|
|
</th>
|
|
<th data-sort="num"
|
|
title="Requests that are rejected by the reviewer, withdrawn, overtaken by events or with no response from reviewer">
|
|
Not completed
|
|
</th>
|
|
<th data-sort="num"
|
|
title="Average time between assignment and completion for completed reviews, in days">
|
|
Avg. compl. days
|
|
{% if count == "pages" %}/page{% endif %}
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
{% for row in data %}
|
|
<tbody>
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
<tfoot>
|
|
{% endif %}
|
|
<tr>
|
|
<td>{{ row.obj }}</td>
|
|
<td>{{ row.open_in_time }}</td>
|
|
<td>{{ row.open_late }}</td>
|
|
<td>{{ row.completed_in_time }}</td>
|
|
<td>
|
|
{{ row.completed_late }}
|
|
</td>
|
|
<td>
|
|
{{ row.not_completed }}
|
|
</td>
|
|
<td>
|
|
{% if row.average_assignment_to_closure_days != None %}
|
|
{{ row.average_assignment_to_closure_days|floatformat }}
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tfoot>
|
|
</table>
|
|
{% elif stats_type == "results" %}
|
|
<h2>
|
|
Results of completed reviews
|
|
</h2>
|
|
<table class="review-stats table table-sm table-striped tablesorter">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="{{ level }}">
|
|
{% if level == "team" %}
|
|
Team
|
|
{% elif level == "reviewer" %}
|
|
Reviewer
|
|
{% endif %}
|
|
</th>
|
|
{% for r in results %}
|
|
<th data-sort="num">
|
|
{{ r.name }}
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
{% for row in data %}
|
|
<tbody>
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
<tfoot>
|
|
{% endif %}
|
|
<tr>
|
|
<td>
|
|
{{ row.obj }}
|
|
</td>
|
|
{% for c in row.result_list %}
|
|
<td>
|
|
{{ c }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tfoot>
|
|
</table>
|
|
{% elif stats_type == "states" %}
|
|
<h2>
|
|
Specific request states
|
|
</h2>
|
|
<table class="review-stats table table-sm table-striped tablesorter">
|
|
<thead>
|
|
<tr>
|
|
<th data-sort="{{ level }}">
|
|
{% if level == "team" %}
|
|
Team
|
|
{% elif level == "reviewer" %}
|
|
Reviewer
|
|
{% endif %}
|
|
</th>
|
|
{% for s in states %}
|
|
<th data-sort="num">
|
|
{{ s.name }}
|
|
</th>
|
|
{% endfor %}
|
|
</tr>
|
|
</thead>
|
|
{% for row in data %}
|
|
<tbody>
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
<tfoot>
|
|
{% endif %}
|
|
<tr>
|
|
<td>
|
|
{{ row.obj }}
|
|
</td>
|
|
{% for c in row.state_list %}
|
|
<td>
|
|
{{ c }}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tfoot>
|
|
</table>
|
|
{% elif stats_type == "time" and selected_teams %}
|
|
<h2>
|
|
Counts per month
|
|
</h2>
|
|
<div class="stats-time-graph">
|
|
</div>
|
|
<script>
|
|
var timeSeriesData = {{ data|safe }};
|
|
console.log(timeSeriesData);
|
|
var timeSeriesOptions = {
|
|
xaxis: {
|
|
mode: "time",
|
|
timeBase: "milliseconds",
|
|
tickLength: 0
|
|
},
|
|
yaxis: {
|
|
tickDecimals: {% if selected_completion_type == "average_assignment_to_closure_days" %}null{% else %}0{% endif %}
|
|
},
|
|
series: {
|
|
stack: true,
|
|
bars: {
|
|
show: true,
|
|
align: "center",
|
|
lineWidth: 1,
|
|
fill: 0.6
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
{% endif %}
|
|
{% if stats_type != "time" %}
|
|
<p class="text-muted text-end">
|
|
Note:
|
|
{% if level == "team" %}
|
|
teams
|
|
{% elif level == "reviewer" %}
|
|
reviewers
|
|
{% endif %}
|
|
with no requests in the period are omitted.
|
|
</p>
|
|
{% endif %}
|
|
{% if level == "team" and stats_type != "time" %}
|
|
<h2>
|
|
Statistics for Individual Reviewers
|
|
</h2>
|
|
<div class="row row-cols-1 row-cols-md-4">
|
|
{% for t in teams %}
|
|
<a
|
|
|
|
|
|
href="{{ t.reviewer_stats_url }}">
|
|
{{ t.name }}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% block js %}
|
|
<script src="{% static "ietf/js/list.js" %}">
|
|
</script>
|
|
<script src="{% static 'ietf/js/datepicker.js' %}">
|
|
</script>
|
|
{% if stats_type == "time" %}
|
|
<script src="{% static 'ietf/js/flot.js' %}">
|
|
</script>
|
|
<script src="{% static 'ietf/js/review-stats.js' %}">
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %} |