2022-11-06 18:58:35 +01:00
|
|
|
{% extends "packages/package_base.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
2022-11-06 19:51:33 +01:00
|
|
|
{{ _("Statistics") }} - {{ package.title }}
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block scriptextra %}
|
|
|
|
<script src="/static/libs/chart.min.js"></script>
|
|
|
|
<script src="/static/libs/chartjs-adapter-date-fns.bundle.min.js"></script>
|
2022-11-08 19:47:03 +01:00
|
|
|
<script src="/static/package_charts.js?v=4"></script>
|
2022-11-06 18:58:35 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
2022-11-08 19:47:28 +01:00
|
|
|
<a class="btn btn-secondary float-right" href="{{ package.getURL('packages.stats_csv') }}">
|
|
|
|
<i class="fas fa-download mr-1"></i>
|
|
|
|
{{ _("Download (.csv)") }}
|
|
|
|
</a>
|
2022-11-06 19:51:33 +01:00
|
|
|
<h2 class="mt-0">{{ _("Statistics") }}</h2>
|
2022-11-06 18:58:35 +01:00
|
|
|
<noscript>
|
|
|
|
<p class="alert alert-danger">
|
2022-11-08 19:47:03 +01:00
|
|
|
{{ _("JavaScript is required to display charts and statistics") }}
|
2022-11-06 18:58:35 +01:00
|
|
|
</p>
|
|
|
|
</noscript>
|
|
|
|
<div class="row mb-5">
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="card h-100">
|
2022-11-08 19:47:03 +01:00
|
|
|
<div class="card-body align-items-center text-center">
|
|
|
|
<div class="mt-0 mb-3">
|
|
|
|
<i class="fas fa-download mr-1"></i>
|
|
|
|
{{ _("Lifetime unique downloads") }}
|
|
|
|
</div>
|
|
|
|
<div class="my-0 h4">
|
|
|
|
{{ package.downloads }}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4">
|
|
|
|
<div class="card h-100">
|
|
|
|
<div class="card-body align-items-center text-center">
|
|
|
|
<div class="mt-0 mb-3">
|
|
|
|
<i class="fas fa-download mr-1"></i>
|
|
|
|
{{ _("Downloads, past 7 days") }}
|
|
|
|
</div>
|
|
|
|
<div class="my-0 h4">
|
|
|
|
<span id='downloads_total7d'></span>
|
|
|
|
<small class="text-muted ml-2">
|
|
|
|
({{ _("%(downloads)s per day", downloads=("<span id='downloads_avg7d'></span>" | safe)) }})
|
|
|
|
</small>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="col-md-4" id="downloads30">
|
|
|
|
<div class="card h-100">
|
|
|
|
<div class="card-body align-items-center text-center">
|
|
|
|
<div class="mt-0 mb-3">
|
|
|
|
<i class="fas fa-download mr-1"></i>
|
|
|
|
{{ _("Downloads, past 30 days") }}
|
|
|
|
</div>
|
|
|
|
<div class="my-0 h4">
|
|
|
|
<span id='downloads_total30d'></span>
|
|
|
|
<small class="text-muted ml-2">
|
|
|
|
({{ _("%(downloads)s per day", downloads=("<span id='downloads_avg30d'></span>" | safe)) }})
|
|
|
|
</small>
|
2022-11-06 18:58:35 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-11-08 19:47:03 +01:00
|
|
|
|
2022-11-06 18:58:35 +01:00
|
|
|
<div id="loading">{{ _("Loading...") }}</div>
|
2022-11-08 19:47:03 +01:00
|
|
|
|
2022-11-06 20:47:39 +01:00
|
|
|
<div id="empty-view" style="display: none;">
|
|
|
|
{{ _("No data") }}
|
|
|
|
</div>
|
2022-11-08 19:47:03 +01:00
|
|
|
|
2022-11-06 19:51:33 +01:00
|
|
|
<div id="stats-root" data-source="{{ package.getURL('api.package_stats') }}" style="display: none;">
|
2022-11-08 19:47:03 +01:00
|
|
|
|
2022-11-07 01:53:30 +01:00
|
|
|
<h3>{{ _("Downloads by Client") }}</h3>
|
2022-11-06 18:58:35 +01:00
|
|
|
<p class="text-muted">
|
|
|
|
{{ _("This is a stacked area graph. For total downloads, look at the combined height.") }}
|
|
|
|
</p>
|
|
|
|
<canvas id="chart-platform" class="chart"></canvas>
|
|
|
|
|
2022-11-07 01:53:30 +01:00
|
|
|
<h3 class="mt-5">{{ _("Downloads by Reason") }}</h3>
|
2022-11-06 19:51:33 +01:00
|
|
|
<ul>
|
|
|
|
<li>{{ _("<b>New Install</b>: the user clicked [Install] inside of Minetest.") }}</li>
|
|
|
|
<li>{{ _("<b>Dependency</b>: was installed automatically to fulfill a dependency.") }}</li>
|
|
|
|
<li>{{ _("<b>Update</b>: download was to update the package.") }}</li>
|
|
|
|
<li>{{ _("<b>Other / Unknown</b>: downloaded by a web browser or an outdated Minetest version (before 5.5).") }}</li>
|
|
|
|
</ul>
|
2022-11-06 18:58:35 +01:00
|
|
|
<p class="text-muted">
|
|
|
|
{{ _("This is a stacked area graph. For total downloads, look at the combined height.") }}
|
|
|
|
</p>
|
|
|
|
<canvas id="chart-reason" class="chart"></canvas>
|
2022-11-07 01:53:30 +01:00
|
|
|
<div class="row mt-4 mb-5">
|
2022-11-06 19:51:33 +01:00
|
|
|
<div class="col-md-6">
|
2022-11-07 01:53:30 +01:00
|
|
|
<canvas id="chart-reason-pie" class="chart"></canvas>
|
2022-11-06 19:51:33 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2022-11-07 01:53:30 +01:00
|
|
|
<h3 style="margin-top: 6em;">{{ _("Need more stats?") }}</h3>
|
2022-11-06 19:51:33 +01:00
|
|
|
<p>
|
|
|
|
{{ _("Check out the ContentDB Grafana dashboard for CDB-wide stats") }}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<a href="https://monitor.rubenwardy.com/d/3ELzFy3Wz/contentdb" class="btn btn-primary">
|
|
|
|
{{ _("ContentDB Grafana") }}
|
|
|
|
</a>
|
|
|
|
</p>
|
2022-11-06 18:58:35 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|