Debian Codegraph @

plinth/modules/storage/templates/storage.html

raw symbols SCIP
1 {% extends "app.html" %}
2 {% comment %}
3 # SPDX-License-Identifier: AGPL-3.0-or-later
4 {% endcomment %}
5
6 {% load bootstrap %}
7 {% load i18n %}
8 {% load static %}
9 {% load extras %}
10
11 {% block page_head %}
12 <link type="text/css" rel="stylesheet"
13 href="{% static 'storage/storage.css' %}">
14 {% endblock %}
15
16 {% block configuration %}
17
18 <p>{% trans "The following storage devices are in use:" %}</p>
19
20 <div class="table-responsive">
21 <table class="table">
22 <thead>
23 <tr>
24 <th>{% trans "Device" %}</th>
25 <th>{% trans "Label" %}</th>
26 <th>{% trans "Mount Point" %}</th>
27 <th>{% trans "Type" %}</th>
28 <th>{% trans "Used" %}</th>
29 <th>{% trans "Actions" %}</th>
30 </tr>
31 </thead>
32 <tbody>
33 {% for disk in disks %}
34 <tr>
35 <td>{{ disk.device }}</td>
36 <td>{{ disk.label|default_if_none:"" }}</td>
37 <td>{{ disk.mount_points|join:"<br>" }}</td>
38 <td>{{ disk.filesystem_type }}</td>
39 <td>
40 {% if 'percent_used' in disk %}
41 <div class="progress">
42 <div class="progress-bar progress-bar-striped
43 {% if disk.percent_used < 75 %}
44 bg-success
45 {% elif disk.percent_used < 90 %}
46 bg-warning
47 {% else %}
48 bg-danger
49 {% endif %}
50 w-{{ disk.percent_used }}"
51 role="progressbar" aria-valuenow="disk.percent_used"
52 aria-valuemin="0" aria-valuemax="100">
53 {{ disk.percent_used }}%
54 </div>
55 </div>
56 <div>{{ disk.used_str }} / {{ disk.size_str }}</div>
57 {% endif %}
58 </td>
59 <td>
60 {% if disk.is_removable %}
61 <form class="form" method="post"
62 action="{% url 'storage:eject' disk.device|urlencode:'' %}">
63 {% csrf_token %}
64
65 <button type="submit" class="btn btn-sm btn-default">
66 {% icon 'eject' %}
67 </button>
68 </form>
69 {% endif %}
70 </td>
71 </tr>
72 {% endfor %}
73 </tbody>
74 </table>
75 </div>
76
77 {% if expandable_root_size %}
78 <h3>{% trans "Partition Expansion" %}</h3>
79 <p>
80 {% blocktrans trimmed %}
81 There is {{ expandable_root_size }} of unallocated space
82 available after your root partition. Root partition can be
83 expanded to use this space. This will provide you additional
84 free space to store your files.
85 {% endblocktrans %}
86 </p>
87 <p>
88 <a class="btn btn-primary btn-md" href="{% url 'storage:expand' %}"
89 role="button">
90 {% trans "Expand Root Partition" %}</a>
91 </p>
92 {% endif %}
93
94 <h3>{%trans "Advanced" %} </h3>
95 <p>
96 {% blocktrans trimmed %}
97 Advanced storage operations such as disk partitioning and RAID management
98 are provided by the <a href="/_cockpit/storage">Cockpit</a> app.
99 {% endblocktrans %}
100 </p>
101
102 {% endblock %}