mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-04-15 09:51:21 +00:00
- This improves page rendering time. If JS files are not loaded in deferred or async mode, they will halt the page rendering until JS files are loaded from network. - 'defer' mode guarantees that the load order is same as the order in which JS files appeared in the HTML page. Tests: - Run at least one function of each affected JS file and ensure that is works. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
79 lines
2.8 KiB
HTML
79 lines
2.8 KiB
HTML
{% extends "app.html" %}
|
|
{% comment %}
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
{% endcomment %}
|
|
|
|
{% load bootstrap %}
|
|
{% load i18n %}
|
|
{% load static %}
|
|
|
|
{% block page_js %}
|
|
<script type="text/javascript" src="{% static 'snapshot/snapshot.js' %}"
|
|
defer></script>
|
|
{% endblock %}
|
|
|
|
{% block configuration %}
|
|
<form class="form" method="post">
|
|
<div class="button-table">
|
|
|
|
<div class="btn-toolbar">
|
|
{% csrf_token %}
|
|
<input type="submit" class="btn btn-primary" name="create"
|
|
value="{% trans 'Create Snapshot' %}"/>
|
|
<input type="submit" class="btn btn-danger button-secondary"
|
|
name="delete_selected"
|
|
value="{% trans 'Delete Snapshots' %}"
|
|
{{ has_deletable_snapshots|yesno:',disabled="disabled"' }}/>
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
<table class="table">
|
|
<thead>
|
|
<th>{% trans "Number" %}</th>
|
|
<th>{% trans "Date" %}</th>
|
|
<th>{% trans "Description" %}</th>
|
|
<th class="centered-column">{% trans "Rollback" %}</th>
|
|
<th class="centered-column"><input type="checkbox" id="select-all"></th>
|
|
</thead>
|
|
<tbody>
|
|
{% for snapshot in snapshots %}
|
|
<tr>
|
|
<td>
|
|
{{ snapshot.number }}
|
|
{% if snapshot.is_default %}
|
|
<span class="badge text-bg-secondary">
|
|
{% trans "will be used at next boot" %}
|
|
</span>
|
|
{% endif %}
|
|
{% if snapshot.is_active %}
|
|
<span class="badge text-bg-success">
|
|
{% trans "in use" %}
|
|
</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ snapshot.date }}</td>
|
|
<td>{% trans snapshot.description %}</td>
|
|
<td class="centered-column">
|
|
<a href="{% url 'snapshot:rollback' snapshot.number %}"
|
|
class="btn btn-default btn-sm" role="button"
|
|
title="{% blocktrans trimmed with number=snapshot.number %}
|
|
Rollback to snapshot #{{ number }}
|
|
{% endblocktrans %}">
|
|
<span class="fa fa-repeat"
|
|
aria-hidden="true"></span>
|
|
</a>
|
|
</td>
|
|
<td class="centered-column">
|
|
{% if not snapshot.is_default and not snapshot.is_active %}
|
|
<input type="checkbox" name="snapshot_list" value={{ snapshot.number }} />
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
{% endblock %}
|