From 83dcafac5550465d54d129fefaed1cde7a64a084 Mon Sep 17 00:00:00 2001
From: Sunil Mohan Adapa
Date: Sat, 12 Dec 2020 10:06:43 -0800
Subject: [PATCH] ui: Make all tables responsive
Signed-off-by: Sunil Mohan Adapa
Reviewed-by: Veiko Aasa
---
.../backups/templates/backups_delete.html | 26 +--
.../backups/templates/backups_repository.html | 176 ++++++++--------
plinth/modules/bepasty/templates/bepasty.html | 56 +++---
plinth/modules/bind/templates/bind.html | 38 ++--
.../templates/diagnostics_results.html | 50 ++---
.../modules/firewall/templates/firewall.html | 106 +++++-----
.../letsencrypt/templates/letsencrypt.html | 163 +++++++--------
.../modules/minetest/templates/minetest.html | 34 ++--
.../monkeysphere/templates/monkeysphere.html | 190 +++++++++---------
.../templates/monkeysphere_details.html | 106 +++++-----
plinth/modules/names/templates/names.html | 74 +++----
plinth/modules/samba/templates/samba.html | 138 +++++++------
.../security/templates/security_report.html | 70 +++----
plinth/modules/sharing/templates/sharing.html | 88 ++++----
.../templates/snapshot_delete_selected.html | 34 ++--
.../snapshot/templates/snapshot_manage.html | 92 ++++-----
.../snapshot/templates/snapshot_rollback.html | 30 +--
plinth/modules/ssh/templates/ssh.html | 30 +--
plinth/modules/storage/templates/storage.html | 106 +++++-----
.../tahoe/templates/tahoe-post-setup.html | 70 ++++---
plinth/modules/tor/templates/tor.html | 70 +++----
.../wireguard/templates/wireguard.html | 120 +++++------
.../templates/wireguard_delete_server.html | 26 +--
.../templates/wireguard_show_client.html | 92 +++++----
.../templates/wireguard_show_server.html | 84 ++++----
plinth/templates/clients.html | 2 +-
plinth/templates/port-forwarding-info.html | 38 ++--
static/themes/default/css/main.css | 2 +-
28 files changed, 1085 insertions(+), 1026 deletions(-)
diff --git a/plinth/modules/backups/templates/backups_delete.html b/plinth/modules/backups/templates/backups_delete.html
index a3d97ab35..9f16ec78d 100644
--- a/plinth/modules/backups/templates/backups_delete.html
+++ b/plinth/modules/backups/templates/backups_delete.html
@@ -11,18 +11,20 @@
{% trans "Delete this archive permanently?" %}
-
-
- {% trans "Name" %}
- {% trans "Time" %}
-
-
-
- {{ archive.name }}
- {{ archive.time }}
-
-
-
+
+
+
+ {% trans "Name" %}
+ {% trans "Time" %}
+
+
+
+ {{ archive.name }}
+ {{ archive.time }}
+
+
+
+
{% endfor %}
@@ -143,31 +145,33 @@
is plugged back in, sharing will be automatically enabled.
{% endblocktrans %}
-
-
-
- {% trans "Share name" %}
- {% trans "Action" %}
-
-
-
- {% for share in unavailable_shares %}
-
- {{ share.name }}
-
-
- {% csrf_token %}
- {% trans "Delete" %}
-
-
-
-
- {% endfor %}
-
-
+
+
+
+
+ {% trans "Share name" %}
+ {% trans "Action" %}
+
+
+
+ {% for share in unavailable_shares %}
+
+ {{ share.name }}
+
+
+ {% csrf_token %}
+ {% trans "Delete" %}
+
+
+
+
+ {% endfor %}
+
+
+
{% endif %}
{% endif %}
{% endblock %}
diff --git a/plinth/modules/security/templates/security_report.html b/plinth/modules/security/templates/security_report.html
index dca137c39..d0e0139f3 100644
--- a/plinth/modules/security/templates/security_report.html
+++ b/plinth/modules/security/templates/security_report.html
@@ -34,40 +34,42 @@
running.
{% endblocktrans %}
-
-
-
- {% trans "App Name" %}
- {% trans "Current Vulnerabilities" %}
- {% trans "Past Vulnerabilities" %}
- {% trans "Sandboxed" %}
- {% trans "Sandbox Coverage" %}
-
-
-
- {% for app in apps_report %}
+
+
+
- {{ app.name }}
- {{ app.vulns }}
- {{ app.past_vulns|default_if_none:"❗"}}
-
- {% if app.sandboxed is None %}
- {% trans "N/A" %}
- {% elif app.sandboxed %}
- {% trans "Yes" %}
- {% else %}
- {% trans "No" %}
- {% endif %}
-
-
- {% if app.sandbox_coverage %}
- {{ app.sandbox_coverage }}%
- {% elif app.sandboxed %}
- {% trans "Not running" %}
- {% endif %}
-
+ {% trans "App Name" %}
+ {% trans "Current Vulnerabilities" %}
+ {% trans "Past Vulnerabilities" %}
+ {% trans "Sandboxed" %}
+ {% trans "Sandbox Coverage" %}
- {% endfor %}
-
-
+
+
+ {% for app in apps_report %}
+
+ {{ app.name }}
+ {{ app.vulns }}
+ {{ app.past_vulns|default_if_none:"❗"}}
+
+ {% if app.sandboxed is None %}
+ {% trans "N/A" %}
+ {% elif app.sandboxed %}
+ {% trans "Yes" %}
+ {% else %}
+ {% trans "No" %}
+ {% endif %}
+
+
+ {% if app.sandbox_coverage %}
+ {{ app.sandbox_coverage }}%
+ {% elif app.sandboxed %}
+ {% trans "Not running" %}
+ {% endif %}
+
+
+ {% endfor %}
+
+
+
{% endblock %}
diff --git a/plinth/modules/sharing/templates/sharing.html b/plinth/modules/sharing/templates/sharing.html
index 614990e04..e0818528c 100644
--- a/plinth/modules/sharing/templates/sharing.html
+++ b/plinth/modules/sharing/templates/sharing.html
@@ -31,50 +31,52 @@
{% if not shares %}
{% trans 'No shares currently configured.' %}
{% else %}
-
-
-
- {% trans "Name" %}
- {% trans "Disk Path" %}
- {% trans "Shared Over" %}
- {% trans "With Groups" %}
-
-
-
-
-
- {% for share in shares %}
-
- {{ share.name }}
- {{ share.path }}
-
-
- {{ share.url }}
-
-
-
- {% if not share.groups %}
- {% trans "public access" %}
- {% else %}
- {{ share.groups|join:", " }}
- {% endif %}
-
-
-
-
-
-
- {% csrf_token %}
-
-
-
+
+
+
+
+ {% trans "Name" %}
+ {% trans "Disk Path" %}
+ {% trans "Shared Over" %}
+ {% trans "With Groups" %}
+
- {% endfor %}
-
-
+
+
+
+ {% for share in shares %}
+
+ {{ share.name }}
+ {{ share.path }}
+
+
+ {{ share.url }}
+
+
+
+ {% if not share.groups %}
+ {% trans "public access" %}
+ {% else %}
+ {{ share.groups|join:", " }}
+ {% endif %}
+
+
+
+
+
+
+ {% csrf_token %}
+
+
+
+
+ {% endfor %}
+
+
+
{% endif %}
{% endblock %}
diff --git a/plinth/modules/snapshot/templates/snapshot_delete_selected.html b/plinth/modules/snapshot/templates/snapshot_delete_selected.html
index 2972b6885..5310a9bf3 100644
--- a/plinth/modules/snapshot/templates/snapshot_delete_selected.html
+++ b/plinth/modules/snapshot/templates/snapshot_delete_selected.html
@@ -11,22 +11,24 @@
{% trans "Delete the following snapshots permanently?" %}
-
-
- {% trans "Number" %}
- {% trans "Date" %}
- {% trans "Description" %}
-
-
- {% for snapshot in snapshots %}
-
- {{ snapshot.number }}
- {{ snapshot.date }}
- {{ snapshot.description }}
-
- {% endfor %}
-
-
+
+
+
+ {% trans "Number" %}
+ {% trans "Date" %}
+ {% trans "Description" %}
+
+
+ {% for snapshot in snapshots %}
+
+ {{ snapshot.number }}
+ {{ snapshot.date }}
+ {{ snapshot.description }}
+
+ {% endfor %}
+
+
+
diff --git a/plinth/modules/snapshot/templates/snapshot_manage.html b/plinth/modules/snapshot/templates/snapshot_manage.html
index 82064186c..20f14277f 100644
--- a/plinth/modules/snapshot/templates/snapshot_manage.html
+++ b/plinth/modules/snapshot/templates/snapshot_manage.html
@@ -21,51 +21,53 @@
{{ has_deletable_snapshots|yesno:',disabled="disabled"' }}/>
-
+
{% endblock %}
diff --git a/plinth/modules/snapshot/templates/snapshot_rollback.html b/plinth/modules/snapshot/templates/snapshot_rollback.html
index 3bff938fe..718679575 100644
--- a/plinth/modules/snapshot/templates/snapshot_rollback.html
+++ b/plinth/modules/snapshot/templates/snapshot_rollback.html
@@ -19,20 +19,22 @@
{% endblocktrans %}
-
-
- {% trans "Number" %}
- {% trans "Date" %}
- {% trans "Description" %}
-
-
-
- {{ snapshot.number }}
- {{ snapshot.date }}
- {{ snapshot.description }}
-
-
-
+
+
+
+ {% trans "Number" %}
+ {% trans "Date" %}
+ {% trans "Description" %}
+
+
+
+ {{ snapshot.number }}
+ {{ snapshot.date }}
+ {{ snapshot.description }}
+
+
+
+
diff --git a/plinth/modules/ssh/templates/ssh.html b/plinth/modules/ssh/templates/ssh.html
index 795f0d6bc..54b91f3ed 100644
--- a/plinth/modules/ssh/templates/ssh.html
+++ b/plinth/modules/ssh/templates/ssh.html
@@ -17,20 +17,22 @@
{% endblocktrans %}
-
-
-
- {% trans "Algorithm" %}
- {% trans "Fingerprint" %}
-
-
-
- {% for host_key in host_keys %}
+
+
+
- {{ host_key.algorithm }}
- {{ host_key.fingerprint }}
+ {% trans "Algorithm" %}
+ {% trans "Fingerprint" %}
- {% endfor %}
-
-
+
+
+ {% for host_key in host_keys %}
+
+ {{ host_key.algorithm }}
+ {{ host_key.fingerprint }}
+
+ {% endfor %}
+
+
+
{% endblock %}
diff --git a/plinth/modules/storage/templates/storage.html b/plinth/modules/storage/templates/storage.html
index 409e7a63d..d81c924fb 100644
--- a/plinth/modules/storage/templates/storage.html
+++ b/plinth/modules/storage/templates/storage.html
@@ -19,60 +19,62 @@
{% trans "The following storage devices are in use:" %}
-
-
-
- {% trans "Device" %}
- {% trans "Label" %}
- {% trans "Mount Point" %}
- {% trans "Type" %}
- {% trans "Used" %}
- {% trans "Actions" %}
-
-
-
- {% for disk in disks %}
+
+
+
- {{ disk.device }}
- {{ disk.label|default_if_none:"" }}
- {{ disk.mount_points|join:" " }}
- {{ disk.filesystem_type }}
-
- {% if 'percent_used' in disk %}
-
-
- {{ disk.percent_used }}%
-
-
- {{ disk.used_str }} / {{ disk.size_str }}
- {% endif %}
-
-
- {% if disk.is_removable %}
-
- {% csrf_token %}
-
-
-
-
- {% endif %}
-
+ {% trans "Device" %}
+ {% trans "Label" %}
+ {% trans "Mount Point" %}
+ {% trans "Type" %}
+ {% trans "Used" %}
+ {% trans "Actions" %}
- {% endfor %}
-
-
+
+
+ {% for disk in disks %}
+
+ {{ disk.device }}
+ {{ disk.label|default_if_none:"" }}
+ {{ disk.mount_points|join:" " }}
+ {{ disk.filesystem_type }}
+
+ {% if 'percent_used' in disk %}
+
+
+ {{ disk.percent_used }}%
+
+
+ {{ disk.used_str }} / {{ disk.size_str }}
+ {% endif %}
+
+
+ {% if disk.is_removable %}
+
+ {% csrf_token %}
+
+
+
+
+ {% endif %}
+
+
+ {% endfor %}
+
+
+
{% if expandable_root_size %}
{% trans "Partition Expansion" %}
diff --git a/plinth/modules/tahoe/templates/tahoe-post-setup.html b/plinth/modules/tahoe/templates/tahoe-post-setup.html
index bdd8e8bf3..e59011e5d 100644
--- a/plinth/modules/tahoe/templates/tahoe-post-setup.html
+++ b/plinth/modules/tahoe/templates/tahoe-post-setup.html
@@ -27,18 +27,20 @@
{{ block.super }}
{% trans "Local introducer" %}
-
-
+
+
+
+
+ {% trans "Pet Name" %}
+ furl
+
+
- {% trans "Pet Name" %}
- furl
+ {{ local_introducer.0 }}
+ {{ local_introducer.1 }}
-
-
- {{ local_introducer.0 }}
- {{ local_introducer.1 }}
-
-
+
+
@@ -60,28 +62,30 @@
{% trans "Connected introducers" %}
-
-
-
- {% trans "Pet Name" %}
- furl
-
-
- {% for introducer, furl in introducers %}
-
- {{ introducer }}
- {{ furl }}
-
-
- {% csrf_token %}
-
- {% trans "Remove" %}
-
-
-
-
- {% endfor %}
-
+
+
+
+
+ {% trans "Pet Name" %}
+ furl
+
+
+ {% for introducer, furl in introducers %}
+
+ {{ introducer }}
+ {{ furl }}
+
+
+ {% csrf_token %}
+
+ {% trans "Remove" %}
+
+
+
+
+ {% endfor %}
+
+
{% endblock %}
diff --git a/plinth/modules/tor/templates/tor.html b/plinth/modules/tor/templates/tor.html
index 48a117520..e48adf12a 100644
--- a/plinth/modules/tor/templates/tor.html
+++ b/plinth/modules/tor/templates/tor.html
@@ -19,24 +19,26 @@
{{ block.super }}
{% if status.hs_enabled %}
-
-
-
- {% trans "Onion Service" %}
- {% trans "Status" %}
- {% trans "Ports" %}
-
-
-
-
- {{ status.hs_hostname }}
- {{ status.hs_status }}
-
- {{ status.hs_services|join:', ' }}
-
-
-
-
+
+
+
+
+ {% trans "Onion Service" %}
+ {% trans "Status" %}
+ {% trans "Ports" %}
+
+
+
+
+ {{ status.hs_hostname }}
+ {{ status.hs_status }}
+
+ {{ status.hs_services|join:', ' }}
+
+
+
+
+
{% endif %}
{% endif %}
{% endblock %}
@@ -62,25 +64,23 @@
necessary:
{% endblocktrans %}
-
-
-
-
+
+
+
+
+ {% trans "Service" %}
+ {% trans "Port" %}
+
+
+
+ {% for name, port in status.ports.items %}
- {% trans "Service" %}
- {% trans "Port" %}
+ {{ name }}
+ {{ port }}
-
-
- {% for name, port in status.ports.items %}
-
- {{ name }}
- {{ port }}
-
- {% endfor %}
-
-
-
+ {% endfor %}
+
+
{% endif %}
diff --git a/plinth/modules/wireguard/templates/wireguard.html b/plinth/modules/wireguard/templates/wireguard.html
index fc03f9a13..b0ce88025 100644
--- a/plinth/modules/wireguard/templates/wireguard.html
+++ b/plinth/modules/wireguard/templates/wireguard.html
@@ -11,36 +11,38 @@
{% trans "Peers allowed to connect to this server:" %}
-
-
- {% trans "Public Key" %}
- {% trans "Allowed IPs" %}
- {% trans "Last Connected Time" %}
-
- {% if server.peers %}
- {% for peer in server.peers.values %}
- {% if peer.public_key %}
-
-
-
- {{ peer.public_key }}
-
-
- {{ peer.allowed_ips|join:", " }}
- {{ peer.status.latest_handshake|default:'' }}
-
- {% endif %}
- {% endfor %}
- {% else %}
+
+
-
- {% blocktrans trimmed %}
- No peers configured to connect to this {{ box_name }} yet.
- {% endblocktrans %}
-
+ {% trans "Public Key" %}
+ {% trans "Allowed IPs" %}
+ {% trans "Last Connected Time" %}
- {% endif %}
-
+ {% if server.peers %}
+ {% for peer in server.peers.values %}
+ {% if peer.public_key %}
+
+
+
+ {{ peer.public_key }}
+
+
+ {{ peer.allowed_ips|join:", " }}
+ {{ peer.status.latest_handshake|default:'' }}
+
+ {% endif %}
+ {% endfor %}
+ {% else %}
+
+
+ {% blocktrans trimmed %}
+ No peers configured to connect to this {{ box_name }} yet.
+ {% endblocktrans %}
+
+
+ {% endif %}
+
+
{% blocktrans trimmed %}
@@ -66,38 +68,40 @@
Servers that {{ box_name }} will connect to:
{% endblocktrans %}
-
-
- {% trans "Endpoint" %}
- {% trans "Public Key" %}
- {% trans "Last Connected Time" %}
-
- {% if client_peers %}
- {% for interface, server in client_peers.items %}
- {% for peer in server.peers.values %}
- {% if forloop.first %}
-
- {{ peer.endpoint }}
-
-
- {{ peer.public_key }}
-
-
- {{ peer.status.latest_handshake|default:'' }}
-
- {% endif %}
- {% endfor %}
- {% endfor %}
- {% else %}
+
+
-
- {% blocktrans trimmed %}
- No connections to remote servers are configured yet.
- {% endblocktrans %}
-
+ {% trans "Endpoint" %}
+ {% trans "Public Key" %}
+ {% trans "Last Connected Time" %}
- {% endif %}
-
+ {% if client_peers %}
+ {% for interface, server in client_peers.items %}
+ {% for peer in server.peers.values %}
+ {% if forloop.first %}
+
+ {{ peer.endpoint }}
+
+
+ {{ peer.public_key }}
+
+
+ {{ peer.status.latest_handshake|default:'' }}
+
+ {% endif %}
+ {% endfor %}
+ {% endfor %}
+ {% else %}
+
+
+ {% blocktrans trimmed %}
+ No connections to remote servers are configured yet.
+ {% endblocktrans %}
+
+
+ {% endif %}
+
+
{% trans "Are you sure that you want to delete this server?" %}
-
-
-
- {% trans "Endpoint" %}
- {{ peer_endpoint }}
-
-
- {% trans "Public Key" %}
- {{ peer_public_key }}
-
-
-
+
+
+
+
+ {% trans "Endpoint" %}
+ {{ peer_endpoint }}
+
+
+ {% trans "Public Key" %}
+ {{ peer_public_key }}
+
+
+
+
{% csrf_token %}
diff --git a/plinth/modules/wireguard/templates/wireguard_show_client.html b/plinth/modules/wireguard/templates/wireguard_show_client.html
index 647f1225d..b3e164e87 100644
--- a/plinth/modules/wireguard/templates/wireguard_show_client.html
+++ b/plinth/modules/wireguard/templates/wireguard_show_client.html
@@ -14,52 +14,56 @@
client is configured with the following information.
{% endblocktrans %}
-
-
-
- {% trans "Client public key:" %}
- {{ client.public_key }}
-
-
- {% trans "IP address to use for client:" %}
- {{ client.allowed_ips|join:", " }}
-
-
- {% trans "Pre-shared key:" %}
- {{ client.preshared_key }}
-
-
- {% trans "Server endpoints:" %}
-
- {% for endpoint in endpoints %}
- {{ endpoint }}
- {% endfor %}
-
-
-
- {% trans "Server public key:" %}
- {{ server.public_key }}
-
-
-
+
+
+
+
+ {% trans "Client public key:" %}
+ {{ client.public_key }}
+
+
+ {% trans "IP address to use for client:" %}
+ {{ client.allowed_ips|join:", " }}
+
+
+ {% trans "Pre-shared key:" %}
+ {{ client.preshared_key }}
+
+
+ {% trans "Server endpoints:" %}
+
+ {% for endpoint in endpoints %}
+ {{ endpoint }}
+ {% endfor %}
+
+
+
+ {% trans "Server public key:" %}
+ {{ server.public_key }}
+
+
+
+
{% trans "Status" %}
-
-
-
- {% trans "Data transmitted:" %}
- {{ client.status.transfer_tx|filesizeformat }}
-
-
- {% trans "Data received:" %}
- {{ client.status.transfer_rx|filesizeformat }}
-
-
- {% trans "Latest handshake:" %}
- {{ client.status.latest_handshake|default:'' }}
-
-
-
+
+
+
+
+ {% trans "Data transmitted:" %}
+ {{ client.status.transfer_tx|filesizeformat }}
+
+
+ {% trans "Data received:" %}
+ {{ client.status.transfer_rx|filesizeformat }}
+
+
+ {% trans "Latest handshake:" %}
+ {{ client.status.latest_handshake|default:'' }}
+
+
+
+
-
-
-
- {% trans "Server endpoint:" %}
- {{ peer.endpoint }}
-
-
- {% trans "Server public key:" %}
- {{ peer.public_key }}
-
-
- {% trans "Pre-shared key:" %}
- {{ peer.preshared_key }}
-
-
- {% trans "Public key of this machine:" %}
- {{ server.public_key }}
-
-
- {% trans "IP address of this machine:" %}
- {{ server.ip_address }}
-
-
-
+
+
+
+
+ {% trans "Server endpoint:" %}
+ {{ peer.endpoint }}
+
+
+ {% trans "Server public key:" %}
+ {{ peer.public_key }}
+
+
+ {% trans "Pre-shared key:" %}
+ {{ peer.preshared_key }}
+
+
+ {% trans "Public key of this machine:" %}
+ {{ server.public_key }}
+
+
+ {% trans "IP address of this machine:" %}
+ {{ server.ip_address }}
+
+
+
+
{% trans "Status" %}
-
-
-
- {% trans "Data transmitted:" %}
- {{ peer.status.transfer_tx|filesizeformat }}
-
-
- {% trans "Data received:" %}
- {{ peer.status.transfer_rx|filesizeformat }}
-
-
- {% trans "Latest handshake:" %}
- {{ peer.status.latest_handshake|default:'' }}
-
-
-
+
+
+
+
+ {% trans "Data transmitted:" %}
+ {{ peer.status.transfer_tx|filesizeformat }}
+
+
+ {% trans "Data received:" %}
+ {{ peer.status.transfer_rx|filesizeformat }}
+
+
+ {% trans "Latest handshake:" %}
+ {{ peer.status.latest_handshake|default:'' }}
+
+
+
+
{% endif %}
{% endfor %}
diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html
index 261c663e8..ccd280880 100644
--- a/plinth/templates/clients.html
+++ b/plinth/templates/clients.html
@@ -7,7 +7,7 @@
{% load static %}
{% if clients %}
-
+
{% with clients|clients_of_type:'web' as web_clients %}
diff --git a/plinth/templates/port-forwarding-info.html b/plinth/templates/port-forwarding-info.html
index 7b987da76..a051e716e 100644
--- a/plinth/templates/port-forwarding-info.html
+++ b/plinth/templates/port-forwarding-info.html
@@ -30,24 +30,26 @@
{{ service_name }}:
{% endblocktrans %}
-
-
-
- {% trans "Protocol" %}
- {% trans "From Router/WAN Ports" %}
- {% blocktrans %}To {{box_name}} Ports{% endblocktrans %}
-
-
-
- {% for port in port_forwarding_info.ports %}
-
- {{ port.protocol }}
- {{ port.ports }}
- {{ port.ports }}
-
- {% endfor %}
-
-
+
+
+
+
+ {% trans "Protocol" %}
+ {% trans "From Router/WAN Ports" %}
+ {% blocktrans %}To {{box_name}} Ports{% endblocktrans %}
+
+
+
+ {% for port in port_forwarding_info.ports %}
+
+ {{ port.protocol }}
+ {{ port.ports }}
+ {{ port.ports }}
+
+ {% endfor %}
+
+
+
{% endif %}
diff --git a/static/themes/default/css/main.css b/static/themes/default/css/main.css
index a0428a187..6d896c488 100644
--- a/static/themes/default/css/main.css
+++ b/static/themes/default/css/main.css
@@ -530,7 +530,7 @@ a.menu_link_active {
}
/* Button table - Tables with a list of actions as buttons on top */
-.button-table > .button-row + .table {
+.button-table > .button-row + .table-responsive {
margin-top: 10px;
}