mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 09:33:44 +01:00
78 lines
2.4 KiB
HTML
78 lines
2.4 KiB
HTML
{% extends "packages/package_base.html" %}
|
|
|
|
{% block title %}
|
|
{{ _("Statistics") }} - {{ package.title }}
|
|
{% endblock %}
|
|
|
|
{% block scriptextra %}
|
|
<script src="/static/libs/chart.min.js"></script>
|
|
<script src="/static/libs/chartjs-adapter-date-fns.bundle.min.js"></script>
|
|
<script src="/static/package_charts.js?v=2"></script>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2 class="mt-0">{{ _("Statistics") }}</h2>
|
|
<noscript>
|
|
<p class="alert alert-danger">
|
|
{{ _("JavaScript is needed for graphs") }}
|
|
</p>
|
|
</noscript>
|
|
<div class="row mb-5">
|
|
<div class="col-md-4">
|
|
<div class="card h-100">
|
|
<div class="card-body media align-items-center">
|
|
<i class="fas fa-download ml-2 mr-4 text-size" style="font-size: 45px; color: #999;"></i>
|
|
<div class="media-body">
|
|
<div class="mt-0 h4">
|
|
{{ package.downloads }}
|
|
</div>
|
|
<div class="my-0">
|
|
{{ _("Lifetime downloads") }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="loading">{{ _("Loading...") }}</div>
|
|
<div id="empty-view" style="display: none;">
|
|
{{ _("No data") }}
|
|
</div>
|
|
<div id="stats-root" data-source="{{ package.getURL('api.package_stats') }}" style="display: none;">
|
|
<h3>{{ _("Downloads") }}</h3>
|
|
|
|
<h4>{{ _("Client") }}</h4>
|
|
<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>
|
|
|
|
<h4 class="mt-5">{{ _("Reason") }}</h4>
|
|
<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>
|
|
<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>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<canvas id="chart-reason-pie" class="chart mt-4"></canvas>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>{{ _("Need more stats?") }}</h3>
|
|
<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>
|
|
</div>
|
|
{% endblock %}
|