mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-02 08:56:07 +00:00
fix(ui): lists say they are empty plainly, filter by themselves and fit a phone
- An empty list says so in gray text, as the VM list does, not in a yellow warning or a blue notice (host pools, networks, filters, secrets, interfaces, tags, removed VMs, backups, schedules, targets). - The Jobs and Backups filters show only while there is something to filter. - The Jobs, Backups and Logs filters apply once a choice changes or Enter is pressed (filter_form.js): no Filter or Search button, and Clear the filters only while one is set. - On a phone the Logs table shows the date, user, VM and message, with the result under it, and the Computes table the host and its memory.
This commit is contained in:
parent
383cbe89a6
commit
70b0b42f8d
22 changed files with 79 additions and 71 deletions
2
admin/templates/admin/log_result.html
Normal file
2
admin/templates/admin/log_result.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
{% load i18n %}{# how a log row's action ended (logs.html) #}
|
||||
{% if log.success is None %}<span class="small text-body-secondary">{% trans "Unknown" %}</span>{% elif log.success %}<span class="badge text-bg-light border">{% trans "Done" %}</span>{% else %}<span class="badge text-bg-danger">{% trans "Failed" %}</span>{% endif %}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load bootstrap_icons %}
|
||||
|
||||
|
|
@ -15,7 +16,7 @@
|
|||
{% block content %}
|
||||
<div class="card mb-3">
|
||||
{# the search runs on the server over every row; the download takes the same rows #}
|
||||
<form method="get" class="card-header d-flex flex-wrap align-items-center gap-2" role="search">
|
||||
<form method="get" class="card-header d-flex flex-wrap align-items-center gap-2" role="search" data-filter-form>
|
||||
<span class="me-auto">{% trans "Logs" %} <span class="badge text-bg-light border">{{ logs.paginator.count }}</span></span>
|
||||
<input name="q" value="{{ q }}" class="form-control form-control-sm w-auto" type="search" placeholder="{% trans 'Search' %}"
|
||||
aria-label="{% trans 'Search the logs' %}">
|
||||
|
|
@ -23,7 +24,7 @@
|
|||
<input id="logs-failed" class="form-check-input" type="checkbox" name="failed" value="1"{% if failed %} checked{% endif %}>
|
||||
<label class="form-check-label small" for="logs-failed">{% trans "Failed only" %}</label>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-sm btn-primary">{% trans "Search" %}</button>
|
||||
{% if q or failed %}<a class="btn btn-sm btn-link" href="{% url 'admin:logs' %}">{% trans "Clear the filters" %}</a>{% endif %}
|
||||
</form>
|
||||
{% if not logs %}
|
||||
<div class="card-body text-center text-body-secondary">
|
||||
|
|
@ -32,29 +33,30 @@
|
|||
{% else %}
|
||||
<div class="table-responsive position-relative">
|
||||
<table class="table table-hover align-middle mb-0">
|
||||
{# on a phone: the date, who, which VM, and what, with how it ended under it #}
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col" class="d-none d-md-table-cell">#</th>
|
||||
<th scope="col">{% blocktrans %}Date ({{ time_zone }}){% endblocktrans %}</th>
|
||||
<th scope="col">{% trans "User" %}</th>
|
||||
<th scope="col">{% trans "Host" %}</th>
|
||||
<th scope="col" class="d-none d-md-table-cell">{% trans "Host" %}</th>
|
||||
<th scope="col">{% trans "Instance" %}</th>
|
||||
<th scope="col">{% trans "Message" %}</th>
|
||||
<th scope="col">{% trans "Result" %}</th>
|
||||
<th scope="col">{% trans "IP" %}</th>
|
||||
<th scope="col" class="d-none d-md-table-cell">{% trans "Result" %}</th>
|
||||
<th scope="col" class="d-none d-md-table-cell">{% trans "IP" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for log in logs %}
|
||||
<tr>
|
||||
<td class="small text-body-secondary">{{ log.id }}</td>
|
||||
<td class="small text-nowrap">{{ log.date|date:"Y-m-d H:i:s" }}</td>
|
||||
<td class="small text-body-secondary d-none d-md-table-cell">{{ log.id }}</td>
|
||||
<td class="small"><span class="text-nowrap">{{ log.date|date:"Y-m-d" }}</span> <span class="text-nowrap">{{ log.date|date:"H:i:s" }}</span></td>
|
||||
<td>{{ log.user }}</td>
|
||||
<td>{{ log.host }}</td>
|
||||
<td class="d-none d-md-table-cell">{{ log.host }}</td>
|
||||
<td>{% if log.vm_pk %}<a href="{% url 'instances:instance' log.vm_pk %}">{{ log.instance }}</a>{% else %}{{ log.instance }}{% endif %}</td>
|
||||
<td class="log-message">{{ log.message }}</td>
|
||||
<td>{% if log.success is None %}<span class="small text-body-secondary">{% trans "Unknown" %}</span>{% elif log.success %}<span class="badge text-bg-light border">{% trans "Done" %}</span>{% else %}<span class="badge text-bg-danger">{% trans "Failed" %}</span>{% endif %}</td>
|
||||
<td class="small font-monospace">{{ log.ip|default:"" }}</td>
|
||||
<td class="log-message">{{ log.message }}<div class="d-md-none">{% include "admin/log_result.html" %}</div></td>
|
||||
<td class="d-none d-md-table-cell">{% include "admin/log_result.html" %}</td>
|
||||
<td class="small font-monospace d-none d-md-table-cell">{{ log.ip|default:"" }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
|
|
@ -64,3 +66,4 @@
|
|||
</div>
|
||||
{% if logs %}{% bootstrap_pagination logs extra=query pages_to_show=5 extra_classes="flex-wrap" %}{% endif %}
|
||||
{% endblock %}
|
||||
{% block script %}<script src="{% static 'js/filter_form.js' %}"></script>{% endblock %}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
{% block content %}
|
||||
<p class="text-body-secondary">{% trans "The tags of VMs and hosts. A tag is made when it is first given, on a VM's Options tab or a host's form." %}</p>
|
||||
{% if not tags %}
|
||||
<div class="alert alert-info shadow-sm">{% bs_icon 'info-circle' %} {% trans "No tags yet" %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No tags yet" %}</p>
|
||||
{% else %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex flex-wrap align-items-center gap-2">
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
{% block content %}
|
||||
<p class="text-body-secondary">{% trans "VMs that vanished from their compute. Their owners, tags, protection and schedules come back if the same UUID shows up again before the record expires; their backups come back with them." %}</p>
|
||||
{% if not tombstones %}
|
||||
<div class="alert alert-info shadow-sm">
|
||||
{% bs_icon 'info-circle' %} {% trans "No removed VMs" %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No removed VMs" %}</p>
|
||||
{% else %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex flex-wrap align-items-center gap-2">
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
{% if not parallel %}
|
||||
<div class="alert alert-warning shadow-sm">{% trans "The worker runs one job at a time: set Worker Concurrency to 2 or more on the Settings page." %}</div>
|
||||
{% elif not instances %}
|
||||
<div class="alert alert-info shadow-sm">{% trans "The host has no VMs." %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "The host has no VMs." %}</p>
|
||||
{% else %}
|
||||
<form method="post" class="card shadow-sm">{% csrf_token %}{% submission_key %}
|
||||
{% if entering %}<input type="hidden" name="maintenance" value="on">{% endif %}
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@
|
|||
<div id="job-panel" aria-live="polite"></div>
|
||||
{% include "computes/attention.html" %}
|
||||
{% if not computes %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle'%} <strong>{% trans "Warning" %}:</strong> {% trans "You don't have any computes" %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "You don't have any computes" %}</p>
|
||||
{% else %}
|
||||
{# the totals of the hosts the panel reaches #}
|
||||
<div class="row row-cols-2 row-cols-lg-4 g-3 mb-4">
|
||||
|
|
@ -57,8 +55,8 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th scope="col">{% trans "Host" %}</th>
|
||||
<th scope="col" data-sort-method="number">{% trans "VMs" %}</th>
|
||||
<th scope="col" data-sort-method="number">{% trans "vCPUs" %}</th>
|
||||
<th scope="col" class="d-none d-md-table-cell" data-sort-method="number">{% trans "VMs" %}</th>
|
||||
<th scope="col" class="d-none d-md-table-cell" data-sort-method="number">{% trans "vCPUs" %}</th>
|
||||
<th scope="col" data-sort-method="number">{% trans "Memory" %}</th>
|
||||
<th scope="col" data-sort-method="none"><span class="visually-hidden">{% trans "Actions" %}</span></th>
|
||||
</tr>
|
||||
|
|
@ -87,18 +85,20 @@
|
|||
{% endif %}
|
||||
</td>
|
||||
{% if given %}
|
||||
<td class="py-3" data-sort="{{ given.vm_count }}">
|
||||
<td class="py-3 d-none d-md-table-cell" data-sort="{{ given.vm_count }}">
|
||||
<a class="fs-4 lh-sm text-decoration-none" href="{% url 'instances' compute.id %}">{{ given.vm_count }}</a>
|
||||
<div class="small text-body-secondary">{% blocktrans with running=given.vms.running %}{{ running }} running{% endblocktrans %}</div>
|
||||
</td>
|
||||
<td class="py-3" data-sort="{{ given.ratio|stringformat:".2f" }}">
|
||||
<td class="py-3 d-none d-md-table-cell" data-sort="{{ given.ratio|stringformat:".2f" }}">
|
||||
{% include "computes/capacity_vcpus.html" %}
|
||||
</td>
|
||||
<td class="py-3" data-sort="{{ given.memory_percent }}">
|
||||
{% include "computes/capacity_memory.html" %}
|
||||
</td>
|
||||
{% else %}
|
||||
<td colspan="3" class="py-3 small text-body-secondary">{% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %}</td>
|
||||
{# on a phone the VM and vCPU columns are hidden: the totals above have them #}
|
||||
<td class="d-none d-md-table-cell"></td><td class="d-none d-md-table-cell"></td>
|
||||
<td class="py-3 small text-body-secondary">{% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %}</td>
|
||||
{% endif %}
|
||||
<td class="py-3 text-end">
|
||||
{# fixed: the menu would be cut off by the table's scrolling box #}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
{% if changeable is False %}{% include 'interfaces_unchangeable.html' %}{% endif %}
|
||||
{% if ifaces_all is None %}{# not read: the error above says why #}{% elif not ifaces_all %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "libvirt lists no interfaces of this host." %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "libvirt lists no interfaces of this host." %}</p>
|
||||
{% else %}
|
||||
<input id="filter" class="form-control w-auto mb-3" type="search" placeholder="{% trans "Search interfaces" %}" aria-label="{% trans "Search interfaces" %}">
|
||||
{# a card per interface, as the networks', under its type; a type's heading shows while any of its cards does #}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2893,11 +2893,6 @@ msgstr "Aygıtlar"
|
|||
msgid "Problem occurred with host %(name)s: %(error)s"
|
||||
msgstr "%(name)s sunucusuyla ilgili bir sorun oluştu: %(error)s"
|
||||
|
||||
#: computes/templates/computes/instances.html:44
|
||||
#: computes/templates/computes/list.html:20
|
||||
msgid "Warning"
|
||||
msgstr "Uyarı"
|
||||
|
||||
#: computes/templates/computes/list.html:20
|
||||
msgid "You don't have any computes"
|
||||
msgstr "Hiç sunucunuz yok"
|
||||
|
|
@ -9292,10 +9287,6 @@ msgstr "Tüm türler"
|
|||
msgid "All states"
|
||||
msgstr "Tüm durumlar"
|
||||
|
||||
#: operations/templates/operations/jobs.html:47
|
||||
msgid "Reset"
|
||||
msgstr "Sıfırla"
|
||||
|
||||
#: operations/templates/operations/jobs.html:53
|
||||
msgid "No jobs"
|
||||
msgstr "İş yok"
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2751,11 +2751,6 @@ msgstr "设备"
|
|||
msgid "Problem occurred with host %(name)s: %(error)s"
|
||||
msgstr "主机 %(name)s 出现问题:%(error)s"
|
||||
|
||||
#: computes/templates/computes/instances.html:44
|
||||
#: computes/templates/computes/list.html:20
|
||||
msgid "Warning"
|
||||
msgstr "警告"
|
||||
|
||||
#: computes/templates/computes/list.html:20
|
||||
msgid "You don't have any computes"
|
||||
msgstr "您还没有任何计算节点"
|
||||
|
|
@ -8737,10 +8732,6 @@ msgstr "所有类型"
|
|||
msgid "All states"
|
||||
msgstr "所有状态"
|
||||
|
||||
#: operations/templates/operations/jobs.html:47
|
||||
msgid "Reset"
|
||||
msgstr "重置"
|
||||
|
||||
#: operations/templates/operations/jobs.html:53
|
||||
msgid "No jobs"
|
||||
msgstr "没有任务"
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@
|
|||
{% include "computes/host_nav.html" with section="networks" %}
|
||||
|
||||
{% if networks is None %}{# not read: the error above says why #}{% elif not networks %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "This host has no networks." %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "This host has no networks." %}</p>
|
||||
{% else %}
|
||||
{# a card per network, as the host Overview's Hardware and Software cards #}
|
||||
<div class="row row-cols-1 row-cols-md-2 g-3 mb-4">
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@
|
|||
{% include "computes/host_nav.html" with section="nwfilters" %}
|
||||
|
||||
{% if nwfilters is None %}{# not read: the error above says why #}{% elif not nwfilters %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "This host has no network filters." %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "This host has no network filters." %}</p>
|
||||
{% else %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex flex-wrap align-items-center gap-2">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{% extends "base.html" %}
|
||||
{% load i18n %}
|
||||
{% load django_bootstrap5 %}
|
||||
{% load static %}
|
||||
{% load bootstrap_icons %}
|
||||
{% load operations %}
|
||||
|
||||
|
|
@ -18,8 +19,8 @@
|
|||
<div class="card mb-3">
|
||||
<div class="card-header d-flex flex-wrap align-items-center gap-2">
|
||||
<span class="me-auto">{% trans "Jobs" %} <span class="badge text-bg-light border">{{ page.paginator.count }}</span></span>
|
||||
{% if request.user.is_superuser %}
|
||||
<form method="get" class="row g-2 col-12 col-xl-10" role="search" aria-label="{% trans 'Filter jobs' %}">
|
||||
{% if request.user.is_superuser %}{% if rows or filtered %}{# while there is a job to filter #}
|
||||
<form method="get" class="row g-2 col-12 col-xl-10" role="search" aria-label="{% trans 'Filter jobs' %}" data-filter-form>
|
||||
<div class="col-6 col-lg">
|
||||
<input class="form-control form-control-sm" name="compute" placeholder="{% trans 'Host' %}" aria-label="{% trans 'Host' %}" value="{{ filters.compute }}">
|
||||
</div>
|
||||
|
|
@ -43,11 +44,10 @@
|
|||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-lg-auto d-flex gap-2 justify-content-end">
|
||||
<button class="btn btn-sm btn-primary" type="submit">{% trans "Filter" %}</button>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'operations:jobs' %}">{% trans "Reset" %}</a>
|
||||
{% if filtered %}<a class="btn btn-sm btn-link" href="{% url 'operations:jobs' %}">{% trans "Clear the filters" %}</a>{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}{% endif %}
|
||||
</div>
|
||||
{% if not rows %}
|
||||
<div class="card-body text-center text-body-secondary">{% trans "No jobs" %}</div>
|
||||
|
|
@ -105,5 +105,6 @@
|
|||
{% endif %}
|
||||
{% endblock %}
|
||||
{% block script %}
|
||||
<script src="{% static 'js/filter_form.js' %}"></script>
|
||||
{% if follow %}{% include "operations/follow_active.html" %}{% endif %}
|
||||
{% endblock script %}
|
||||
|
|
|
|||
|
|
@ -81,6 +81,18 @@ class JobsPageTestCase(TransactionTestCase):
|
|||
self.assertContains(self.client.get(reverse("operations:jobs"), {"compute": "c"}), link)
|
||||
self.assertNotContains(self.client.get(reverse("operations:jobs"), {"state": "failed"}), link)
|
||||
|
||||
def test_the_filters_show_while_there_is_a_job_to_filter(self):
|
||||
from lxml import html as lxml_html
|
||||
|
||||
self.client.force_login(self.admin)
|
||||
page = lambda **query: lxml_html.fromstring(self.client.get(reverse("operations:jobs"), query).content)
|
||||
self.assertTrue(page().xpath("//form[@data-filter-form]"))
|
||||
self.assertFalse(page().xpath("//form[@data-filter-form]//a")) # nothing to clear
|
||||
# none matches: the filters stay, with the way back
|
||||
self.assertTrue(page(state="failed").xpath("//form[@data-filter-form]//a[@href=$u]", u=reverse("operations:jobs")))
|
||||
Operation.objects.all().delete()
|
||||
self.assertFalse(page().xpath("//form[@data-filter-form]"))
|
||||
|
||||
def test_a_finished_job_opens_what_it_made(self):
|
||||
from lxml import html as lxml_html
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ def jobs(request):
|
|||
return render(request, "operations/jobs.html",
|
||||
{"page": page, "rows": rows, "worker_last_seen": seen, "worker_unavailable": unavailable,
|
||||
"filters": request.GET, "active_states": Operation.ACTIVE,
|
||||
"filtered": any(request.GET.get(field) for field in ("compute", "username", "state", "kind")),
|
||||
"follow": any(op.state in Operation.ACTIVE for op in page.object_list),
|
||||
"states": Operation.ACTIVE + Operation.TERMINAL,
|
||||
"kinds": sorted((name, _(kind.label)) for name, kind in jobs_module.KINDS.items()),
|
||||
|
|
|
|||
15
static/js/filter_form.js
Normal file
15
static/js/filter_form.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// A list's filter form (data-filter-form) asks the server again once a choice
|
||||
// changes or Enter is pressed in a text box: it has no button of its own.
|
||||
document.querySelectorAll("form[data-filter-form]").forEach(function (form) {
|
||||
form.addEventListener("change", function (event) {
|
||||
if (event.target.matches("select, input[type='checkbox']")) {
|
||||
form.requestSubmit();
|
||||
}
|
||||
});
|
||||
form.addEventListener("keydown", function (event) {
|
||||
if (event.key === "Enter" && !event.isComposing && event.target.matches("input:not([type]), input[type='text'], input[type='search']")) {
|
||||
event.preventDefault();
|
||||
form.requestSubmit();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -16,9 +16,7 @@
|
|||
</div>
|
||||
|
||||
{% if storages is None %}{# not read: the error above says why #}{% elif not storages %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "This host has no storage pools." %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "This host has no storage pools." %}</p>
|
||||
{% else %}
|
||||
{# a card per pool, as the host Overview's Hardware and Software cards #}
|
||||
<div class="row row-cols-1 row-cols-md-2 g-3 mb-4">
|
||||
|
|
|
|||
|
|
@ -13,9 +13,7 @@
|
|||
{% include "computes/host_nav.html" with section="virtsecrets" %}
|
||||
|
||||
{% if secrets_all is None %}{# not read: the error above says why #}{% elif not secrets_all %}
|
||||
<div class="alert alert-warning shadow-sm">
|
||||
{% bs_icon 'exclamation-triangle' %} {% trans "This host has no secrets." %}
|
||||
</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "This host has no secrets." %}</p>
|
||||
{% else %}
|
||||
<div class="card mb-3">
|
||||
<div class="card-header d-flex flex-wrap align-items-center gap-2">
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@
|
|||
<a class="btn btn-outline-primary btn-sm" href="{% url 'vmbackups:targets' %}">{% bs_icon 'hdd-network' %} {% trans "Backup targets" %}</a>{% endblock page_heading_extra %}
|
||||
|
||||
{% block content %}
|
||||
<form method="get" class="row g-2 mb-3" aria-label="{% trans "Filter" %}">
|
||||
{% if rows or vm or target or state %}{# while there is a backup to filter #}
|
||||
<form method="get" class="row g-2 mb-3" aria-label="{% trans "Filter" %}" data-filter-form>
|
||||
<div class="col-12 col-md">
|
||||
<label class="visually-hidden" for="filter-vm">{% trans "VM" %}</label>
|
||||
<input type="search" class="form-control" id="filter-vm" name="vm" value="{{ vm }}" placeholder="{% trans "VM name" %}">
|
||||
|
|
@ -37,10 +38,13 @@
|
|||
<option value="damaged"{% if state == "damaged" %} selected{% endif %}>{% trans "Damaged" %}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto d-grid">
|
||||
<button type="submit" class="btn btn-outline-secondary">{% bs_icon 'filter' %} {% trans "Filter" %}</button>
|
||||
{% if vm or target or state %}
|
||||
<div class="col-12 col-md-auto">
|
||||
<a class="btn btn-link" href="{% url 'vmbackups:index' %}">{% trans "Clear the filters" %}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if rows %}
|
||||
<div class="table-responsive">
|
||||
|
|
@ -75,10 +79,10 @@
|
|||
{% bootstrap_pagination page extra=page_query pages_to_show=5 extra_classes="flex-wrap" %}
|
||||
{% endif %}
|
||||
{% elif vm or target or state %}
|
||||
<div class="alert alert-info">{% trans "No backup matches the filter." %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No backup matches the filter." %}</p>
|
||||
{% else %}
|
||||
<div class="alert alert-info">{% trans "No backup yet. Back a VM up from its Backups tab." %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No backup yet. Back a VM up from its Backups tab." %}</p>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}<script src="{% static 'vmbackups/pending.js' %}"></script>{% endblock %}
|
||||
{% block script %}<script src="{% static 'vmbackups/pending.js' %}"></script><script src="{% static 'js/filter_form.js' %}"></script>{% endblock %}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info">{% trans "No backup schedule yet." %} {% trans "A schedule backs chosen VMs, or every VM of a compute, up every day and keeps the newest." %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No backup schedule yet." %} {% trans "A schedule backs chosen VMs, or every VM of a compute, up every day and keeps the newest." %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="alert alert-info">{% trans "No backup target yet." %}</div>
|
||||
<p class="text-center text-body-secondary py-4">{% trans "No backup target yet." %}</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue