-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add admin page to see package storage usage
- Loading branch information
1 parent
acaf674
commit 406eb5d
Showing
4 changed files
with
100 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{% extends "base.html" %} | ||
|
||
{% block title %} | ||
Storage | ||
{% endblock %} | ||
|
||
{% block content %} | ||
<h1>Storage</h1> | ||
<p class="text-muted"> | ||
Shows storage use by package. Supports <a href="/help/api/#package-queries">Package Queries</a>, but always | ||
sorts by total storage usage. | ||
</p> | ||
|
||
<div class="list-group"> | ||
<div class="list-group-item"> | ||
<div class="row text-muted"> | ||
<div class="col"> | ||
{{ _("Package") }} | ||
</div> | ||
<div class="col-2 text-center"> | ||
Latest release / MB | ||
</div> | ||
<div class="col-2 text-center"> | ||
Releases / MB | ||
</div> | ||
<div class="col-2 text-center"> | ||
Screenshots / MB | ||
</div> | ||
<div class="col-2 text-center"> | ||
Total / MB | ||
</div> | ||
</div> | ||
</div> | ||
{% for row in data %} | ||
{% set package = row[0] %} | ||
<a class="list-group-item list-group-item-action" href="{{ package.get_url('packages.list_releases') }}"> | ||
<div class="row"> | ||
<div class="col"> | ||
{{ _("%(title)s by %(author)s", title=package.title, author=package.author.display_name) }} | ||
{% if package.state.name != "APPROVED" %} | ||
<span class="badge bg-warning"> | ||
{{ package.state.value }} | ||
</span> | ||
{% endif %} | ||
</div> | ||
<div class="col-2 text-center"> | ||
{{ (row[4] / 1048576) | round | int }} | ||
</div> | ||
<div class="col-2 text-center"> | ||
{{ (row[2] / 1048576) | round | int }} | ||
</div> | ||
<div class="col-2 text-center"> | ||
{{ (row[3] / 1048576) | round | int }} | ||
</div> | ||
<div class="col-2 text-center"> | ||
{{ (row[1] / 1048576) | round | int }} | ||
</div> | ||
</div> | ||
</a> | ||
{% else %} | ||
<div class="list-group-item text-muted"> | ||
<i>{{ _("No results") }}</i> | ||
</div> | ||
{% endfor %} | ||
</div> | ||
{% endblock %} |