ui: Make all tables responsive

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
Sunil Mohan Adapa 2020-12-12 10:06:43 -08:00 committed by Veiko Aasa
parent fef8da230f
commit 83dcafac55
No known key found for this signature in database
GPG Key ID: 478539CAE680674E
28 changed files with 1085 additions and 1026 deletions

View File

@ -11,18 +11,20 @@
<p>{% trans "Delete this archive permanently?" %}</p>
<table class="table">
<thead>
<th>{% trans "Name" %}</th>
<th>{% trans "Time" %}</th>
</thead>
<tbody>
<tr>
<td>{{ archive.name }}</td>
<td>{{ archive.time }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<th>{% trans "Name" %}</th>
<th>{% trans "Time" %}</th>
</thead>
<tbody>
<tr>
<td>{{ archive.name }}</td>
<td>{{ archive.time }}</td>
</tr>
</tbody>
</table>
</div>
<p>
<form class="form" method="post">

View File

@ -4,106 +4,108 @@
{% load i18n %}
<table class="table" id="archives-list">
<thead class="collapsible-button" data-toggle="collapse" data-target="#{{ uuid }}">
<tr>
<th colspan="2">
<span class="fa fa-chevron-right fa-fw" aria-hidden="true"></span>
{% if repository.error %}
<span class="fa fa-exclamation-triangle mount-error"
aria-hidden="true" title="{{ repository.error }}">
</span>
{% elif repository.is_encrypted %}
<span class="fa fa-lock encrypted"
aria-hidden="true" title="{% trans "This repository is encrypted" %}">
</span>
{% endif %}
<div class="table-responsive">
<table class="table" id="archives-list">
<thead class="collapsible-button" data-toggle="collapse" data-target="#{{ uuid }}">
<tr>
<th colspan="2">
<span class="fa fa-chevron-right fa-fw" aria-hidden="true"></span>
{% if repository.error %}
<span class="fa fa-exclamation-triangle mount-error"
aria-hidden="true" title="{{ repository.error }}">
</span>
{% elif repository.is_encrypted %}
<span class="fa fa-lock encrypted"
aria-hidden="true" title="{% trans "This repository is encrypted" %}">
</span>
{% endif %}
{{ repository.name }}
{{ repository.name }}
<span class="pull-right">
{% if repository.flags.mountable %}
<span class="pull-right">
{% if repository.flags.mountable %}
{% if repository.mounted %}
{% if repository.mounted %}
<form action="{% url 'backups:repository-umount' uuid %}" method="POST"
class="inline-block" >
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-default"
title="{% trans 'Unmount Location' %}">
<span class="fa fa-eject" aria-hidden="true"></span>
</button>
</form>
<form action="{% url 'backups:repository-umount' uuid %}" method="POST"
class="inline-block" >
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-default"
title="{% trans 'Unmount Location' %}">
<span class="fa fa-eject" aria-hidden="true"></span>
</button>
</form>
{% else %}
{% else %}
<form action="{% url 'backups:repository-mount' uuid %}" method="POST"
class="inline-block" >
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-default"
title="{% trans 'Mount Location' %}">
<span class="fa fa-eye" aria-hidden="true"></span>
</button>
</form>
<form action="{% url 'backups:repository-mount' uuid %}" method="POST"
class="inline-block" >
{% csrf_token %}
<button type="submit" class="btn btn-sm btn-default"
title="{% trans 'Mount Location' %}">
<span class="fa fa-eye" aria-hidden="true"></span>
</button>
</form>
{% endif %}
{% endif %}
{% endif %}
{% if repository.flags.removable %}
{% if repository.flags.removable %}
<a title="{% trans 'Remove Backup Location. This will not delete the remote backup.' %}"
role="button" class="repository-remove btn btn-sm btn-default"
href="{% url 'backups:repository-remove' uuid %}">
<span class="fa fa-trash-o" aria-hidden="true"></span>
</a>
<a title="{% trans 'Remove Backup Location. This will not delete the remote backup.' %}"
role="button" class="repository-remove btn btn-sm btn-default"
href="{% url 'backups:repository-remove' uuid %}">
<span class="fa fa-trash-o" aria-hidden="true"></span>
</a>
{% endif %}
</span>
</th>
</tr>
</thead>
{% endif %}
</span>
</th>
</tr>
</thead>
<tbody class="collapse show" id="{{ uuid }}">
{% if repository.mounted %}
<tbody class="collapse show" id="{{ uuid }}">
{% if repository.mounted %}
{% for archive in repository.archives %}
<tr id="archive-{{ archive.name }}" class="archive">
<td class="archive-name">{{ archive.name }}</td>
<td class="archive-operations">
<a class="archive-export btn btn-sm btn-default" target="_blank"
href="{% url 'backups:download' uuid archive.name %}">
{% trans "Download" %}
</a>
<a class="archive-export btn btn-sm btn-default"
href="{% url 'backups:restore-archive' uuid archive.name %}">
{% trans "Restore" %}
</a>
<a class="archive-delete btn btn-sm btn-default"
href="{% url 'backups:delete' uuid archive.name %}">
<span class="fa fa-trash-o" aria-hidden="true">
</span>
</a>
</td>
</tr>
{% endfor %}
{% for archive in repository.archives %}
<tr id="archive-{{ archive.name }}" class="archive">
<td class="archive-name">{{ archive.name }}</td>
<td class="archive-operations">
<a class="archive-export btn btn-sm btn-default" target="_blank"
href="{% url 'backups:download' uuid archive.name %}">
{% trans "Download" %}
</a>
<a class="archive-export btn btn-sm btn-default"
href="{% url 'backups:restore-archive' uuid archive.name %}">
{% trans "Restore" %}
</a>
<a class="archive-delete btn btn-sm btn-default"
href="{% url 'backups:delete' uuid archive.name %}">
<span class="fa fa-trash-o" aria-hidden="true">
</span>
</a>
</td>
</tr>
{% endfor %}
{% if repository.error %}
<tr>
<td>
<p>{{ repository.error }}</p>
</td>
</tr>
{% endif %}
{% if not repository.error and not repository.archives %}
<tr>
<td>
<p>{% trans 'No archives currently exist.' %}</p>
</td>
</tr>
{% endif %}
{% if repository.error %}
<tr>
<td>
<p>{{ repository.error }}</p>
</td>
</tr>
{% endif %}
{% if not repository.error and not repository.archives %}
<tr>
<td>
<p>{% trans 'No archives currently exist.' %}</p>
</td>
</tr>
{% endif %}
{% endif %}
</tbody>
</table>
</tbody>
</table>
</div>

View File

@ -22,34 +22,36 @@
{% if not passwords %}
<p>{% trans 'No passwords currently configured.' %}</p>
{% else %}
<table class="table" id="passwords-list">
<thead>
<tr>
<th>{% trans "Password" %}</th>
<th>{% trans "Permissions" %}</th>
<th>{% trans "Comment" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for password in passwords %}
<tr id="password-{{ password.password }}" class="password">
<td class="password-password">{{ password.password }}</td>
<td class="password-permissions">{{ password.permissions }}</td>
<td class="password-comment">{% trans password.comment %}</td>
<td class="password-operations">
<form class="form form-inline" method="post"
action="{% url 'bepasty:remove' password.password %}">
{% csrf_token %}
<button class="password-remove btn btn-sm btn-default fa fa-trash-o"
type="submit"></button>
</form>
</td>
<div class="table-responsive">
<table class="table" id="passwords-list">
<thead>
<tr>
<th>{% trans "Password" %}</th>
<th>{% trans "Permissions" %}</th>
<th>{% trans "Comment" %}</th>
<th></th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for password in passwords %}
<tr id="password-{{ password.password }}" class="password">
<td class="password-password">{{ password.password }}</td>
<td class="password-permissions">{{ password.permissions }}</td>
<td class="password-comment">{% trans password.comment %}</td>
<td class="password-operations">
<form class="form form-inline" method="post"
action="{% url 'bepasty:remove' password.password %}">
{% csrf_token %}
<button class="password-remove btn btn-sm btn-default fa fa-trash-o"
type="submit"></button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}

View File

@ -10,26 +10,28 @@
<h3>{% trans "Serving Domains" %}</h3>
<table class="table">
<thead>
<tr>
<th>{% trans "Type" %}</th>
<th>{% trans "Domain Names" %}</th>
<th>{% trans "Serving" %}</th>
<th>{% trans "IP addresses" %}</th>
</tr>
</thead>
<tbody>
{% for domain in domains_table %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>{{ domain.type}}</td>
<td>{{ domain.domain_name}}</td>
<td>{{ domain.serving }}</td>
<td>{{ domain.ip_address }}</td>
<th>{% trans "Type" %}</th>
<th>{% trans "Domain Names" %}</th>
<th>{% trans "Serving" %}</th>
<th>{% trans "IP addresses" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for domain in domains_table %}
<tr>
<td>{{ domain.type}}</td>
<td>{{ domain.domain_name}}</td>
<td>{{ domain.serving }}</td>
<td>{{ domain.ip_address }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div>
<a href="{% url 'bind:index' %}" class="btn btn-default"
role="button" title="{% trans 'Refresh IP address and domains' %}">

View File

@ -4,29 +4,31 @@
{% load i18n %}
<table class="table diagnostics-results">
<thead>
<tr>
<th class="diagnostic-test">{% trans "Test" %}</th>
<th class="diagnostics-result">{% trans "Result" %}</th>
</tr>
</thead>
<tbody>
{% for test, result in results %}
<div class="table-responsive">
<table class="table diagnostics-results">
<thead>
<tr>
<td>{{ test }}</td>
<td class="diagnostics-result">
{% if result == 'passed' %}
<span class="badge badge-success">{% trans result %}</span>
{% elif result == 'failed' %}
<span class="badge badge-danger">{% trans result %}</span>
{% elif result == 'error' %}
<span class="badge badge-warning">{% trans result %}</span>
{% else %}
{{ result }}
{% endif %}
</td>
<th class="diagnostic-test">{% trans "Test" %}</th>
<th class="diagnostics-result">{% trans "Result" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for test, result in results %}
<tr>
<td>{{ test }}</td>
<td class="diagnostics-result">
{% if result == 'passed' %}
<span class="badge badge-success">{% trans result %}</span>
{% elif result == 'failed' %}
<span class="badge badge-danger">{% trans result %}</span>
{% elif result == 'error' %}
<span class="badge badge-warning">{% trans result %}</span>
{% else %}
{{ result }}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>

View File

@ -23,65 +23,67 @@
{% else %}
<table class='table table-autowidth'>
<thead>
<th><center>{% trans "Show Ports" %}</center></th>
<th>{% trans "Service/Port" %}</th>
<th>{% trans "Status" %}</th>
</thead>
<div class="table-responsive">
<table class='table table-autowidth'>
<thead>
<th><center>{% trans "Show Ports" %}</center></th>
<th>{% trans "Service/Port" %}</th>
<th>{% trans "Status" %}</th>
</thead>
<tbody>
{% for component in components|dictsort:"name" %}
{% if component.ports %}
<tr>
<td>
<center>
<button data-toggle="collapse"
data-target=".{{component.component_id}}"
class="btn btn-info btn-sm">+</button>
</center>
</td>
<td><strong>{{ component.name }}</strong></td>
<td>
{% if component.is_enabled %}
<span class='badge badge-success'>
{% trans "Enabled" %}</span>
{% else %}
<span class='badge badge-warning'>
{% trans "Disabled" %}</span>
{% endif %}
</td>
</tr>
{% for port in component.ports_details %}
<tr class="collapse {{component.component_id}}"
style="background-color: #f9f9f9" >
<td></td>
<td class='cell-indented'><em>{{ port.name }}</em>:
{% for port_number, protocol in port.details %}
{{ port_number }}/{{ protocol }}
{% endfor %}
</td>
<tbody>
{% for component in components|dictsort:"name" %}
{% if component.ports %}
<tr>
<td>
{% if port.name in internal_enabled_ports and port.name in external_enabled_ports %}
<center>
<button data-toggle="collapse"
data-target=".{{component.component_id}}"
class="btn btn-info btn-sm">+</button>
</center>
</td>
<td><strong>{{ component.name }}</strong></td>
<td>
{% if component.is_enabled %}
<span class='badge badge-success'>
{% trans "Permitted" %}</span>
{% elif port.name in internal_enabled_ports %}
<span class='badge badge-warning'>
{% trans "Permitted (internal only)" %}</span>
{% elif port.name in external_enabled_ports %}
<span class='badge badge-warning'>
{% trans "Permitted (external only)" %}</span>
{% trans "Enabled" %}</span>
{% else %}
<span class='badge badge-danger'>
{% trans "Blocked" %}</span>
<span class='badge badge-warning'>
{% trans "Disabled" %}</span>
{% endif %}
</td>
</tr>
{% endfor %}
{% endif %}
{% endfor %}
</tbody>
</table>
{% for port in component.ports_details %}
<tr class="collapse {{component.component_id}}"
style="background-color: #f9f9f9" >
<td></td>
<td class='cell-indented'><em>{{ port.name }}</em>:
{% for port_number, protocol in port.details %}
{{ port_number }}/{{ protocol }}
{% endfor %}
</td>
<td>
{% if port.name in internal_enabled_ports and port.name in external_enabled_ports %}
<span class='badge badge-success'>
{% trans "Permitted" %}</span>
{% elif port.name in internal_enabled_ports %}
<span class='badge badge-warning'>
{% trans "Permitted (internal only)" %}</span>
{% elif port.name in external_enabled_ports %}
<span class='badge badge-warning'>
{% trans "Permitted (external only)" %}</span>
{% else %}
<span class='badge badge-danger'>
{% trans "Blocked" %}</span>
{% endif %}
</td>
</tr>
{% endfor %}
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
<p>
<em>

View File

@ -23,95 +23,96 @@
<h3>{% trans "Status" %}</h3>
{% if status.domains %}
<table class="table">
<thead>
<tr>
<th>{% trans "Domain" %}</th>
<th>{% trans "Certificate Status" %}</th>
<th>{% trans "Website Security" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for domain, domain_status in status.domains.items %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>{{ domain }}</td>
<td>
{% if domain_status.certificate_available and domain_status.validity == "valid" %}
<span class="badge badge-success">
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
Valid, expires on {{ expiry_date }}
{% endblocktrans %}
</span>
{% elif domain_status.certificate_available and not domain_status.validity == "valid" %}
<span class="badge badge-warning">
{% if "revoked" in domain_status.validity %}
{% blocktrans trimmed %}
Revoked
{% endblocktrans %}
{% elif "expired" in domain_status.validity %}
<th>{% trans "Domain" %}</th>
<th>{% trans "Certificate Status" %}</th>
<th>{% trans "Website Security" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for domain, domain_status in status.domains.items %}
<tr>
<td>{{ domain }}</td>
<td>
{% if domain_status.certificate_available and domain_status.validity == "valid" %}
<span class="badge badge-success">
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
Expired on {{ expiry_date }}
Valid, expires on {{ expiry_date }}
{% endblocktrans %}
{% elif "test" in domain_status.validity %}
{% blocktrans trimmed %}
Invalid test certificate
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with reason=domain_status.validity %}
Invalid ({{ reason }})
{% endblocktrans %}
{% endif %}
</span>
{% else %}
<span class="badge badge-warning">
{% trans "No certificate" %}
</span>
{% endif %}
</td>
<td>
{% if domain_status.web_enabled %}
<span class="badge badge-success">{% trans "Enabled" %}</span>
{% else %}
<span class="badge badge-warning">{% trans "Disabled" %}</span>
{% endif %}
</td>
<td>
{% if domain_status.certificate_available %}
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:re-obtain' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-default" type="submit">
{% trans "Re-obtain" %}</button>
</form>
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:delete' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-default" type="submit">
{% trans "Delete" %}</button>
</form>
{% if "revoked" not in domain_status.validity %}
</span>
{% elif domain_status.certificate_available and not domain_status.validity == "valid" %}
<span class="badge badge-warning">
{% if "revoked" in domain_status.validity %}
{% blocktrans trimmed %}
Revoked
{% endblocktrans %}
{% elif "expired" in domain_status.validity %}
{% blocktrans trimmed with expiry_date=domain_status.expiry_date %}
Expired on {{ expiry_date }}
{% endblocktrans %}
{% elif "test" in domain_status.validity %}
{% blocktrans trimmed %}
Invalid test certificate
{% endblocktrans %}
{% else %}
{% blocktrans trimmed with reason=domain_status.validity %}
Invalid ({{ reason }})
{% endblocktrans %}
{% endif %}
</span>
{% else %}
<span class="badge badge-warning">
{% trans "No certificate" %}
</span>
{% endif %}
</td>
<td>
{% if domain_status.web_enabled %}
<span class="badge badge-success">{% trans "Enabled" %}</span>
{% else %}
<span class="badge badge-warning">{% trans "Disabled" %}</span>
{% endif %}
</td>
<td>
{% if domain_status.certificate_available %}
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:revoke' domain %}">
action="{% url 'letsencrypt:re-obtain' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-default" type="submit">
{% trans "Revoke" %}</button>
{% trans "Re-obtain" %}</button>
</form>
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:delete' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-default" type="submit">
{% trans "Delete" %}</button>
</form>
{% if "revoked" not in domain_status.validity %}
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:revoke' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-default" type="submit">
{% trans "Revoke" %}</button>
</form>
{% endif %}
{% else %}
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:obtain' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-primary" type="submit">
{% trans "Obtain" %}</button>
</form>
{% endif %}
{% else %}
<form class="form form-inline" method="post"
action="{% url 'letsencrypt:obtain' domain %}">
{% csrf_token %}
<button class="btn btn-sm btn-primary" type="submit">
{% trans "Obtain" %}</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
{% url 'config:index' as config_url %}
{% blocktrans trimmed %}

View File

@ -10,23 +10,25 @@
{{ block.super }}
{% if domains %}
<table class="table">
<thead>
<tr>
<th>{% trans "Address" %}</th>
<th>{% trans "Port" %}</th>
</tr>
</thead>
<tbody>
{% for domain in domains %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>
{{ domain }}
</td>
<td>{{ 30000 }}</td>
<th>{% trans "Address" %}</th>
<th>{% trans "Port" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for domain in domains %}
<tr>
<td>
{{ domain }}
</td>
<td>{{ 30000 }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}

View File

@ -48,106 +48,108 @@
</p>
{% endif %}
<table class="table">
<thead>
<tr>
<th>{% trans "Service" %}</th>
<th>{% trans "Domains" %}</th>
<th>{% trans "OpenPGP Fingerprint" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for key in status.keys.values|dictsort:"ssh_fingerprint" %}
<tr class="monkeysphere-service-{{ key.service }}">
<td>
{% if key.service == 'ssh' %}
{% trans "Secure Shell" %}
{% elif key.service == 'https' %}
{% trans "Web Server" %}
{% else %}
{% trans "Other" %}
{% endif %}
</td>
<td>
<ul>
{% for domain in key.all_domains %}
{% if domain not in key.imported_domains %}
<li>
<span class="badge badge-secondary"
><span class="fa fa-times"
aria-hidden="true"></span></span>
<span class="monkeysphere-importable-domain"
>{{ domain }}</span>
</li>
{% elif domain not in key.available_domains %}
<li>
<span class="badge badge-warning"
><span class="fa fa-exclamation-triangle"
aria-hidden="true"></span></span>
<span class="monkeysphere-unavailable-domain"
>{{ domain }}</span>
</li>
{% else %}
<li>
<span class="badge badge-success"
><span class="fa fa-check"
aria-hidden="true"></span></span>
<span class="monkeysphere-imported-domain"
>{{ domain }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
</td>
<td>
{% if key.openpgp_fingerprint %}
<a href="{% url 'monkeysphere:details' key.openpgp_fingerprint %}"
title="{% blocktrans trimmed with fingerprint=key.openpgp_fingerprint %}
Show details for key {{ fingerprint }}
{% endblocktrans %}">
{{ key.openpgp_fingerprint }}
</a>
{% else %}
{% trans "-" %}
{% endif %}
</td>
<td>
{% if not key.openpgp_fingerprint %}
<form class="form pull-right form-action form-import"
method="post"
action="{% url 'monkeysphere:import' key.ssh_fingerprint %}">
{% csrf_token %}
<button type="submit" class="btn btn-primary btn-sm pull-right button-import">
{% trans "Import Key" %}</button>
</form>
{% else %}
{% if not running %}
<form class="form pull-right form-action form-publish"
method="post"
action="{% url 'monkeysphere:publish' key.openpgp_fingerprint %}">
{% csrf_token %}
<button type="submit" class="btn btn-warning btn-sm pull-right button-publish">
{% trans "Publish Key" %}</button>
</form>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Service" %}</th>
<th>{% trans "Domains" %}</th>
<th>{% trans "OpenPGP Fingerprint" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for key in status.keys.values|dictsort:"ssh_fingerprint" %}
<tr class="monkeysphere-service-{{ key.service }}">
<td>
{% if key.service == 'ssh' %}
{% trans "Secure Shell" %}
{% elif key.service == 'https' %}
{% trans "Web Server" %}
{% else %}
{% trans "Other" %}
{% endif %}
{% if key.importable_domains %}
<form class="form pull-right form-action form-add-domain"
</td>
<td>
<ul>
{% for domain in key.all_domains %}
{% if domain not in key.imported_domains %}
<li>
<span class="badge badge-secondary"
><span class="fa fa-times"
aria-hidden="true"></span></span>
<span class="monkeysphere-importable-domain"
>{{ domain }}</span>
</li>
{% elif domain not in key.available_domains %}
<li>
<span class="badge badge-warning"
><span class="fa fa-exclamation-triangle"
aria-hidden="true"></span></span>
<span class="monkeysphere-unavailable-domain"
>{{ domain }}</span>
</li>
{% else %}
<li>
<span class="badge badge-success"
><span class="fa fa-check"
aria-hidden="true"></span></span>
<span class="monkeysphere-imported-domain"
>{{ domain }}</span>
</li>
{% endif %}
{% endfor %}
</ul>
</td>
<td>
{% if key.openpgp_fingerprint %}
<a href="{% url 'monkeysphere:details' key.openpgp_fingerprint %}"
title="{% blocktrans trimmed with fingerprint=key.openpgp_fingerprint %}
Show details for key {{ fingerprint }}
{% endblocktrans %}">
{{ key.openpgp_fingerprint }}
</a>
{% else %}
{% trans "-" %}
{% endif %}
</td>
<td>
{% if not key.openpgp_fingerprint %}
<form class="form pull-right form-action form-import"
method="post"
action="{% url 'monkeysphere:import' key.ssh_fingerprint %}">
{% csrf_token %}
<button type="submit" class="btn btn-primary btn-sm pull-right button-add-domains">
{% trans "Add Domains" %}</button>
<button type="submit" class="btn btn-primary btn-sm pull-right button-import">
{% trans "Import Key" %}</button>
</form>
{% else %}
{% if not running %}
<form class="form pull-right form-action form-publish"
method="post"
action="{% url 'monkeysphere:publish' key.openpgp_fingerprint %}">
{% csrf_token %}
<button type="submit" class="btn btn-warning btn-sm pull-right button-publish">
{% trans "Publish Key" %}</button>
</form>
{% endif %}
{% if key.importable_domains %}
<form class="form pull-right form-action form-add-domain"
method="post"
action="{% url 'monkeysphere:import' key.ssh_fingerprint %}">
{% csrf_token %}
<button type="submit" class="btn btn-primary btn-sm pull-right button-add-domains">
{% trans "Add Domains" %}</button>
</form>
{% endif %}
{% endif %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -10,58 +10,60 @@
<h2>{% trans "Monkeysphere" %}</h2>
<table class="table">
<tbody>
<tr>
<td>{% trans "OpenPGP Fingerprint" %}</td>
<td>{{ key.openpgp_fingerprint }}</td>
</tr>
<tr>
<td>{% trans "OpenPGP User IDs" %}</td>
<td>{{ key.uids|join:', ' }}</td>
</tr>
<tr>
<td>{% trans "Key Import Date" %}</td>
<td>{{ key.date }}</td>
</tr>
<tr>
<td>{% trans "SSH Key Type" %}</td>
<td>{{ key.ssh_key_type }}</td>
</tr>
<tr>
<td>{% trans "SSH Key Size" %}</td>
<td>{{ key.ssh_key_size }}</td>
</tr>
<tr>
<td>{% trans "SSH Fingerprint" %}</td>
<td>{{ key.ssh_fingerprint }}</td>
</tr>
<tr>
<td>{% trans "Service" %}</td>
<td>
{% if key.service == 'ssh' %}
{% trans "Secure Shell" %}
{% elif key.service == 'https' %}
{% trans "Web Server" %}
{% else %}
{% trans "Other" %}
{% endif %}
</td>
</tr>
<tr>
<td>{% trans "Key File" %}</td>
<td>{{ key.key_file }}</td>
</tr>
<tr>
<td>{% trans "Available Domains" %}</td>
<td>{{ key.available_domains|join:', ' }}</td>
</tr>
<tr>
<td>{% trans "Added Domains" %}</td>
<td>{{ key.imported_domains|join:', ' }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<td>{% trans "OpenPGP Fingerprint" %}</td>
<td>{{ key.openpgp_fingerprint }}</td>
</tr>
<tr>
<td>{% trans "OpenPGP User IDs" %}</td>
<td>{{ key.uids|join:', ' }}</td>
</tr>
<tr>
<td>{% trans "Key Import Date" %}</td>
<td>{{ key.date }}</td>
</tr>
<tr>
<td>{% trans "SSH Key Type" %}</td>
<td>{{ key.ssh_key_type }}</td>
</tr>
<tr>
<td>{% trans "SSH Key Size" %}</td>
<td>{{ key.ssh_key_size }}</td>
</tr>
<tr>
<td>{% trans "SSH Fingerprint" %}</td>
<td>{{ key.ssh_fingerprint }}</td>
</tr>
<tr>
<td>{% trans "Service" %}</td>
<td>
{% if key.service == 'ssh' %}
{% trans "Secure Shell" %}
{% elif key.service == 'https' %}
{% trans "Web Server" %}
{% else %}
{% trans "Other" %}
{% endif %}
</td>
</tr>
<tr>
<td>{% trans "Key File" %}</td>
<td>{{ key.key_file }}</td>
</tr>
<tr>
<td>{% trans "Available Domains" %}</td>
<td>{{ key.available_domains|join:', ' }}</td>
</tr>
<tr>
<td>{% trans "Added Domains" %}</td>
<td>{{ key.imported_domains|join:', ' }}</td>
</tr>
</tbody>
</table>
</div>
<p>
{% blocktrans trimmed %}

View File

@ -8,44 +8,46 @@
{% block configuration %}
<table class="table names-table">
<thead>
<tr>
<th>{% trans "Type" %}</th>
<th class="names-domain-column">{% trans "Domain Name" %}</th>
<th>{% trans "Services" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for domain in status.domains|dictsort:"domain_type.display_name" %}
<div class="table-responsive">
<table class="table names-table">
<thead>
<tr>
<td>{{ domain.domain_type.display_name }}</td>
<td class="names-domain-column">{{ domain.name }}</td>
<td>{{ domain.get_readable_services|join:', ' }}</td>
<td>
<a href="{% url domain.domain_type.configuration_url %}"
role="button" class="btn btn-md btn-default">
{% trans "Configure" %}
</a>
</td>
<th>{% trans "Type" %}</th>
<th class="names-domain-column">{% trans "Domain Name" %}</th>
<th>{% trans "Services" %}</th>
<th></th>
</tr>
{% endfor %}
</thead>
<tbody>
{% for domain in status.domains|dictsort:"domain_type.display_name" %}
<tr>
<td>{{ domain.domain_type.display_name }}</td>
<td class="names-domain-column">{{ domain.name }}</td>
<td>{{ domain.get_readable_services|join:', ' }}</td>
<td>
<a href="{% url domain.domain_type.configuration_url %}"
role="button" class="btn btn-md btn-default">
{% trans "Configure" %}
</a>
</td>
</tr>
{% endfor %}
{% for domain_type in status.unused_domain_types %}
<tr>
<td>{{ domain_type.display_name }}</td>
<td>-</td>
<td>-</td>
<td>
<a href="{% url domain_type.configuration_url %}"
role="button" class="btn btn-md btn-default">
{% trans "Configure" %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% for domain_type in status.unused_domain_types %}
<tr>
<td>{{ domain_type.display_name }}</td>
<td>-</td>
<td>-</td>
<td>
<a href="{% url domain_type.configuration_url %}"
role="button" class="btn btn-md btn-default">
{% trans "Configure" %}
</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -69,49 +69,51 @@
{% csrf_token %}
<input type="hidden" name="filesystem_type"
value="{{ disk.filesystem_type }}">
<table class="table"
aria-describedby="{{ disk.name }}">
<thead>
<tr>
<th scope="col">{% trans 'Type' %}</th>
<th scope="col">{% trans 'Name' %}</th>
<th scope="col">{% trans 'Status' %}</th>
</tr>
</thead>
<tbody>
{% for share_type in share_types %}
<tr id="samba-share-{{ disk.share_name_prefix }}-{{ share_type.id }}"
class="share">
<td class="share-type">
{{ share_type.type }}
</td>
<td class="share-name">
{{ disk.share_name_prefix }}{{ share_type.share_name_suffix }}
</td>
<td class="share-status">
<button type="submit"
{% if disk.filesystem_type == 'vfat' %}
class="btn toggle-button"
title='{% trans "VFAT partitions are not supported" %}'
disabled
aria-readonly="true"
{% elif share_type.id in shared_mounts|lookup:disk.mount_point %}
class="btn toggle-button toggle-button--toggled"
name="{{ share_type.id }}_share"
value="disable"
aria-pressed="true"
{% else %}
class="btn toggle-button"
name="{{ share_type.id }}_share"
value="enable"
aria-pressed="false"
{% endif %}>
</button>
</td>
<div class="table-responsive">
<table class="table"
aria-describedby="{{ disk.name }}">
<thead>
<tr>
<th scope="col">{% trans 'Type' %}</th>
<th scope="col">{% trans 'Name' %}</th>
<th scope="col">{% trans 'Status' %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for share_type in share_types %}
<tr id="samba-share-{{ disk.share_name_prefix }}-{{ share_type.id }}"
class="share">
<td class="share-type">
{{ share_type.type }}
</td>
<td class="share-name">
{{ disk.share_name_prefix }}{{ share_type.share_name_suffix }}
</td>
<td class="share-status">
<button type="submit"
{% if disk.filesystem_type == 'vfat' %}
class="btn toggle-button"
title='{% trans "VFAT partitions are not supported" %}'
disabled
aria-readonly="true"
{% elif share_type.id in shared_mounts|lookup:disk.mount_point %}
class="btn toggle-button toggle-button--toggled"
name="{{ share_type.id }}_share"
value="disable"
aria-pressed="true"
{% else %}
class="btn toggle-button"
name="{{ share_type.id }}_share"
value="enable"
aria-pressed="false"
{% endif %}>
</button>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</form>
</div>
{% endfor %}
@ -143,31 +145,33 @@
is plugged back in, sharing will be automatically enabled.
{% endblocktrans %}
</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Share name" %}</th>
<th>{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for share in unavailable_shares %}
<tr>
<td>{{ share.name }}</td>
<td>
<form class="form" method="post"
action="{% url 'samba:share' share.mount_point|urlencode:'' %}">
{% csrf_token %}
<button type="submit" class="btn btn-danger"
name="{{ share.share_type }}_share"
value="disable">{% trans "Delete" %}
</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Share name" %}</th>
<th>{% trans "Action" %}</th>
</tr>
</thead>
<tbody>
{% for share in unavailable_shares %}
<tr>
<td>{{ share.name }}</td>
<td>
<form class="form" method="post"
action="{% url 'samba:share' share.mount_point|urlencode:'' %}">
{% csrf_token %}
<button type="submit" class="btn btn-danger"
name="{{ share.share_type }}_share"
value="disable">{% trans "Delete" %}
</button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% endblock %}

View File

@ -34,40 +34,42 @@
running.
{% endblocktrans %}
</p>
<table class="table">
<thead>
<tr>
<th>{% trans "App Name" %}</th>
<th>{% trans "Current Vulnerabilities" %}</th>
<th>{% trans "Past Vulnerabilities" %}</th>
<th>{% trans "Sandboxed" %}</th>
<th>{% trans "Sandbox Coverage" %}</th>
</tr>
</thead>
<tbody>
{% for app in apps_report %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>{{ app.name }}</td>
<td>{{ app.vulns }}</td>
<td>{{ app.past_vulns|default_if_none:"❗"}}</td>
<td>
{% if app.sandboxed is None %}
{% trans "N/A" %}
{% elif app.sandboxed %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
</td>
<td>
{% if app.sandbox_coverage %}
{{ app.sandbox_coverage }}%
{% elif app.sandboxed %}
{% trans "Not running" %}
{% endif %}
</td>
<th>{% trans "App Name" %}</th>
<th>{% trans "Current Vulnerabilities" %}</th>
<th>{% trans "Past Vulnerabilities" %}</th>
<th>{% trans "Sandboxed" %}</th>
<th>{% trans "Sandbox Coverage" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for app in apps_report %}
<tr>
<td>{{ app.name }}</td>
<td>{{ app.vulns }}</td>
<td>{{ app.past_vulns|default_if_none:"❗"}}</td>
<td>
{% if app.sandboxed is None %}
{% trans "N/A" %}
{% elif app.sandboxed %}
{% trans "Yes" %}
{% else %}
{% trans "No" %}
{% endif %}
</td>
<td>
{% if app.sandbox_coverage %}
{{ app.sandbox_coverage }}%
{% elif app.sandboxed %}
{% trans "Not running" %}
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -31,50 +31,52 @@
{% if not shares %}
<p>{% trans 'No shares currently configured.' %}</p>
{% else %}
<table class="table" id="shares-list">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Disk Path" %}</th>
<th>{% trans "Shared Over" %}</th>
<th>{% trans "With Groups" %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for share in shares %}
<tr id="share-{{ share.name }}" class="share">
<td class="share-name">{{ share.name }}</td>
<td class="share-path">{{ share.path }}</td>
<td class="share-url">
<a href="{{ share.url }}" title="{{ share.url}}">
{{ share.url }}
</a>
</td>
<td class="share-groups">
{% if not share.groups %}
<i>{% trans "public access" %}</i>
{% else %}
{{ share.groups|join:", " }}
{% endif %}
</td>
<td class="share-operations">
<a class="share-edit btn btn-sm btn-default"
href="{% url 'sharing:edit' share.name %}">
<span class="fa fa-pencil-square-o" aria-hidden="true"></span>
</a>
<form class="form form-inline" method="post"
action="{% url 'sharing:remove' share.name %}">
{% csrf_token %}
<button class="share-remove btn btn-sm btn-default fa fa-trash-o"
type="submit"></button>
</form>
</td>
<div class="table-responsive">
<table class="table" id="shares-list">
<thead>
<tr>
<th>{% trans "Name" %}</th>
<th>{% trans "Disk Path" %}</th>
<th>{% trans "Shared Over" %}</th>
<th>{% trans "With Groups" %}</th>
<th></th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for share in shares %}
<tr id="share-{{ share.name }}" class="share">
<td class="share-name">{{ share.name }}</td>
<td class="share-path">{{ share.path }}</td>
<td class="share-url">
<a href="{{ share.url }}" title="{{ share.url}}">
{{ share.url }}
</a>
</td>
<td class="share-groups">
{% if not share.groups %}
<i>{% trans "public access" %}</i>
{% else %}
{{ share.groups|join:", " }}
{% endif %}
</td>
<td class="share-operations">
<a class="share-edit btn btn-sm btn-default"
href="{% url 'sharing:edit' share.name %}">
<span class="fa fa-pencil-square-o" aria-hidden="true"></span>
</a>
<form class="form form-inline" method="post"
action="{% url 'sharing:remove' share.name %}">
{% csrf_token %}
<button class="share-remove btn btn-sm btn-default fa fa-trash-o"
type="submit"></button>
</form>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}

View File

@ -11,22 +11,24 @@
<p>{% trans "Delete the following snapshots permanently?" %}</p>
<table class="table">
<thead>
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
</thead>
<tbody>
{% for snapshot in snapshots %}
<tr>
<td>{{ snapshot.number }}</td>
<td>{{ snapshot.date }}</td>
<td>{{ snapshot.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
</thead>
<tbody>
{% for snapshot in snapshots %}
<tr>
<td>{{ snapshot.number }}</td>
<td>{{ snapshot.date }}</td>
<td>{{ snapshot.description }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<p>
<form class="form" method="post">

View File

@ -21,51 +21,53 @@
{{ has_deletable_snapshots|yesno:',disabled="disabled"' }}/>
</div>
<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 badge-secondary">
{% trans "will be used at next boot" %}
</span>
{% endif %}
{% if snapshot.is_active %}
<span class="badge badge-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 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 badge-secondary">
{% trans "will be used at next boot" %}
</span>
{% endif %}
{% if snapshot.is_active %}
<span class="badge badge-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 %}

View File

@ -19,20 +19,22 @@
{% endblocktrans %}
</p>
<table class="table">
<thead>
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
</thead>
<tbody>
<tr>
<td>{{ snapshot.number }}</td>
<td>{{ snapshot.date }}</td>
<td>{{ snapshot.description }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<th>{% trans "Number" %}</th>
<th>{% trans "Date" %}</th>
<th>{% trans "Description" %}</th>
</thead>
<tbody>
<tr>
<td>{{ snapshot.number }}</td>
<td>{{ snapshot.date }}</td>
<td>{{ snapshot.description }}</td>
</tr>
</tbody>
</table>
</div>
<p>
<form class="form" method="post">

View File

@ -17,20 +17,22 @@
{% endblocktrans %}
</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Algorithm" %}</th>
<th>{% trans "Fingerprint" %}</th>
</tr>
</thead>
<tbody>
{% for host_key in host_keys %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>{{ host_key.algorithm }}</td>
<td><samp>{{ host_key.fingerprint }}</samp></td>
<th>{% trans "Algorithm" %}</th>
<th>{% trans "Fingerprint" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for host_key in host_keys %}
<tr>
<td>{{ host_key.algorithm }}</td>
<td><samp>{{ host_key.fingerprint }}</samp></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}

View File

@ -19,60 +19,62 @@
<p>{% trans "The following storage devices are in use:" %}</p>
<table class="table">
<thead>
<tr>
<th>{% trans "Device" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Mount Point" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Used" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
</thead>
<tbody>
{% for disk in disks %}
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<td>{{ disk.device }}</td>
<td>{{ disk.label|default_if_none:"" }}</td>
<td>{{ disk.mount_points|join:"<br>" }}</td>
<td>{{ disk.filesystem_type }}</td>
<td>
{% if 'percent_used' in disk %}
<div class="progress">
<div class="progress-bar progress-bar-striped
{% if disk.percent_used < 75 %}
bg-success
{% elif disk.percent_used < 90 %}
bg-warning
{% else %}
bg-danger
{% endif %}"
role="progressbar" aria-valuenow="disk.percent_used"
aria-valuemin="0" aria-valuemax="100"
style="width: {{ disk.percent_used }}%;">
{{ disk.percent_used }}%
</div>
</div>
<div>{{ disk.used_str }} / {{ disk.size_str }}</div>
{% endif %}
</td>
<td>
{% if disk.is_removable %}
<form class="form" method="post"
action="{% url 'storage:eject' disk.device|urlencode:'' %}">
{% csrf_token %}
<button type="submit"
class="btn btn-sm btn-default fa fa-eject">
</button>
</form>
{% endif %}
</td>
<th>{% trans "Device" %}</th>
<th>{% trans "Label" %}</th>
<th>{% trans "Mount Point" %}</th>
<th>{% trans "Type" %}</th>
<th>{% trans "Used" %}</th>
<th>{% trans "Actions" %}</th>
</tr>
{% endfor %}
</tbody>
</table>
</thead>
<tbody>
{% for disk in disks %}
<tr>
<td>{{ disk.device }}</td>
<td>{{ disk.label|default_if_none:"" }}</td>
<td>{{ disk.mount_points|join:"<br>" }}</td>
<td>{{ disk.filesystem_type }}</td>
<td>
{% if 'percent_used' in disk %}
<div class="progress">
<div class="progress-bar progress-bar-striped
{% if disk.percent_used < 75 %}
bg-success
{% elif disk.percent_used < 90 %}
bg-warning
{% else %}
bg-danger
{% endif %}"
role="progressbar" aria-valuenow="disk.percent_used"
aria-valuemin="0" aria-valuemax="100"
style="width: {{ disk.percent_used }}%;">
{{ disk.percent_used }}%
</div>
</div>
<div>{{ disk.used_str }} / {{ disk.size_str }}</div>
{% endif %}
</td>
<td>
{% if disk.is_removable %}
<form class="form" method="post"
action="{% url 'storage:eject' disk.device|urlencode:'' %}">
{% csrf_token %}
<button type="submit"
class="btn btn-sm btn-default fa fa-eject">
</button>
</form>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% if expandable_root_size %}
<h3>{% trans "Partition Expansion" %}</h3>

View File

@ -27,18 +27,20 @@
{{ block.super }}
<h4>{% trans "Local introducer" %}</h4>
<table class="table local-introducers">
<thead>
<div class="table-responsive">
<table class="table local-introducers">
<thead>
<tr>
<th>{% trans "Pet Name" %}</th>
<th> furl </th>
</tr>
</thead>
<tr>
<th>{% trans "Pet Name" %}</th>
<th> furl </th>
<td class="introducer-pet-name">{{ local_introducer.0 }}</td>
<td class="introducer-furl">{{ local_introducer.1 }}</td>
</tr>
</thead>
<tr>
<td class="introducer-pet-name">{{ local_introducer.0 }}</td>
<td class="introducer-furl">{{ local_introducer.1 }}</td>
</tr>
</table>
</table>
</div>
<form class="form form-add-introducer" method="post"
action="{% url 'tahoe:add-introducer' %}">
@ -60,28 +62,30 @@
<br/>
<h4>{% trans "Connected introducers" %}</h4>
<table class="table connected-introducers">
<thead>
<tr>
<th>{% trans "Pet Name" %}</th>
<th> furl </th>
</tr>
</thead>
{% for introducer, furl in introducers %}
<tr>
<td class="introducer-pet-name">{{ introducer }}</td>
<td class="introducer-furl">{{ furl }}</td>
<td class="introducer-operations">
<form class="form form-remove" method="post"
action="{% url 'tahoe:remove-introducer' introducer %}">
{% csrf_token %}
<button type="submit" class="btn btn-danger">
{% trans "Remove" %}
</button>
</form>
</td>
</tr>
{% endfor %}
</table>
<div class="table-responsive">
<table class="table connected-introducers">
<thead>
<tr>
<th>{% trans "Pet Name" %}</th>
<th> furl </th>
</tr>
</thead>
{% for introducer, furl in introducers %}
<tr>
<td class="introducer-pet-name">{{ introducer }}</td>
<td class="introducer-furl">{{ furl }}</td>
<td class="introducer-operations">
<form class="form form-remove" method="post"
action="{% url 'tahoe:remove-introducer' introducer %}">
{% csrf_token %}
<button type="submit" class="btn btn-danger">
{% trans "Remove" %}
</button>
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}

View File

@ -19,24 +19,26 @@
{{ block.super }}
{% if status.hs_enabled %}
<table class="table tor-hs">
<thead>
<tr>
<th>{% trans "Onion Service" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Ports" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tor-hs-hostname">{{ status.hs_hostname }}</td>
<td class="tor-hs-status">{{ status.hs_status }}</td>
<td class="tor-hs-services">
{{ status.hs_services|join:', ' }}
</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table tor-hs">
<thead>
<tr>
<th>{% trans "Onion Service" %}</th>
<th>{% trans "Status" %}</th>
<th>{% trans "Ports" %}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tor-hs-hostname">{{ status.hs_hostname }}</td>
<td class="tor-hs-status">{{ status.hs_status }}</td>
<td class="tor-hs-services">
{{ status.hs_services|join:', ' }}
</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
{% endif %}
{% endblock %}
@ -62,25 +64,23 @@
necessary:
{% endblocktrans %}
</p>
<div class="row">
<div class="col-md-6">
<table class="table tor-relay-ports">
<thead>
<div class="table-responsive">
<table class="table tor-relay-ports">
<thead>
<tr>
<th>{% trans "Service" %}</th>
<th>{% trans "Port" %}</th>
</tr>
</thead>
<tbody>
{% for name, port in status.ports.items %}
<tr>
<th>{% trans "Service" %}</th>
<th>{% trans "Port" %}</th>
<td class="tor-relay-port-name">{{ name }}</td>
<td class="tor-relay-port-number">{{ port }}</td>
</tr>
</thead>
<tbody>
{% for name, port in status.ports.items %}
<tr>
<td class="tor-relay-port-name">{{ name }}</td>
<td class="tor-relay-port-number">{{ port }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}

View File

@ -11,36 +11,38 @@
<p>{% trans "Peers allowed to connect to this server:" %}</p>
<table class="table" id="server-peers-list">
<tr>
<th>{% trans "Public Key" %}</th>
<th>{% trans "Allowed IPs" %}</th>
<th>{% trans "Last Connected Time" %}</th>
</tr>
{% if server.peers %}
{% for peer in server.peers.values %}
{% if peer.public_key %}
<tr>
<td>
<a href="{% url 'wireguard:show-client' peer.public_key|urlencode:'' %}">
{{ peer.public_key }}
</a>
</td>
<td>{{ peer.allowed_ips|join:", " }}</td>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
{% endif %}
{% endfor %}
{% else %}
<div class="table-responsive">
<table class="table" id="server-peers-list">
<tr>
<td colspan="3">
{% blocktrans trimmed %}
No peers configured to connect to this {{ box_name }} yet.
{% endblocktrans %}
</td>
<th>{% trans "Public Key" %}</th>
<th>{% trans "Allowed IPs" %}</th>
<th>{% trans "Last Connected Time" %}</th>
</tr>
{% endif %}
</table>
{% if server.peers %}
{% for peer in server.peers.values %}
{% if peer.public_key %}
<tr>
<td>
<a href="{% url 'wireguard:show-client' peer.public_key|urlencode:'' %}">
{{ peer.public_key }}
</a>
</td>
<td>{{ peer.allowed_ips|join:", " }}</td>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
{% endif %}
{% endfor %}
{% else %}
<tr>
<td colspan="3">
{% blocktrans trimmed %}
No peers configured to connect to this {{ box_name }} yet.
{% endblocktrans %}
</td>
</tr>
{% endif %}
</table>
</div>
<p>
{% blocktrans trimmed %}
@ -66,38 +68,40 @@
Servers that {{ box_name }} will connect to:
{% endblocktrans %}
</p>
<table class="table" id="client-peers-list">
<tr>
<th>{% trans "Endpoint" %}</th>
<th>{% trans "Public Key" %}</th>
<th>{% trans "Last Connected Time" %}</th>
</tr>
{% if client_peers %}
{% for interface, server in client_peers.items %}
{% for peer in server.peers.values %}
{% if forloop.first %}
<tr>
<td>{{ peer.endpoint }}</td>
<td>
<a href="{% url 'wireguard:show-server' interface %}">
{{ peer.public_key }}
</a>
</td>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
<div class="table-responsive">
<table class="table" id="client-peers-list">
<tr>
<td colspan="4">
{% blocktrans trimmed %}
No connections to remote servers are configured yet.
{% endblocktrans %}
</td>
<th>{% trans "Endpoint" %}</th>
<th>{% trans "Public Key" %}</th>
<th>{% trans "Last Connected Time" %}</th>
</tr>
{% endif %}
</table>
{% if client_peers %}
{% for interface, server in client_peers.items %}
{% for peer in server.peers.values %}
{% if forloop.first %}
<tr>
<td>{{ peer.endpoint }}</td>
<td>
<a href="{% url 'wireguard:show-server' interface %}">
{{ peer.public_key }}
</a>
</td>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
{% endif %}
{% endfor %}
{% endfor %}
{% else %}
<tr>
<td colspan="4">
{% blocktrans trimmed %}
No connections to remote servers are configured yet.
{% endblocktrans %}
</td>
</tr>
{% endif %}
</table>
</div>
<a title="{% trans 'Add a new server' %}"
role="button" class="btn btn-default"

View File

@ -13,18 +13,20 @@
<p>
{% trans "Are you sure that you want to delete this server?" %}
</p>
<table class="table">
<tbody>
<tr>
<th>{% trans "Endpoint" %}</th>
<td>{{ peer_endpoint }}</td>
</tr>
<tr>
<th>{% trans "Public Key" %}</th>
<td>{{ peer_public_key }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th>{% trans "Endpoint" %}</th>
<td>{{ peer_endpoint }}</td>
</tr>
<tr>
<th>{% trans "Public Key" %}</th>
<td>{{ peer_public_key }}</td>
</tr>
</tbody>
</table>
</div>
<form class="form" method="post">
{% csrf_token %}

View File

@ -14,52 +14,56 @@
client is configured with the following information.
{% endblocktrans %}
</p>
<table class="table">
<tbody>
<tr>
<th>{% trans "Client public key:" %}</th>
<td>{{ client.public_key }}</td>
</tr>
<tr>
<th>{% trans "IP address to use for client:" %}</th>
<td>{{ client.allowed_ips|join:", " }}</td>
</tr>
<tr>
<th>{% trans "Pre-shared key:" %}</th>
<td>{{ client.preshared_key }}</td>
</tr>
<tr>
<th>{% trans "Server endpoints:" %}</th>
<td>
{% for endpoint in endpoints %}
<div>{{ endpoint }}</div>
{% endfor %}
</td>
</tr>
<tr>
<th>{% trans "Server public key:" %}</th>
<td>{{ server.public_key }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th>{% trans "Client public key:" %}</th>
<td>{{ client.public_key }}</td>
</tr>
<tr>
<th>{% trans "IP address to use for client:" %}</th>
<td>{{ client.allowed_ips|join:", " }}</td>
</tr>
<tr>
<th>{% trans "Pre-shared key:" %}</th>
<td>{{ client.preshared_key }}</td>
</tr>
<tr>
<th>{% trans "Server endpoints:" %}</th>
<td>
{% for endpoint in endpoints %}
<div>{{ endpoint }}</div>
{% endfor %}
</td>
</tr>
<tr>
<th>{% trans "Server public key:" %}</th>
<td>{{ server.public_key }}</td>
</tr>
</tbody>
</table>
</div>
<h3>{% trans "Status" %}</h3>
<table class="table">
<tbody>
<tr>
<th>{% trans "Data transmitted:" %}</th>
<td>{{ client.status.transfer_tx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Data received:" %}</th>
<td>{{ client.status.transfer_rx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Latest handshake:" %}</th>
<td>{{ client.status.latest_handshake|default:'' }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th>{% trans "Data transmitted:" %}</th>
<td>{{ client.status.transfer_tx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Data received:" %}</th>
<td>{{ client.status.transfer_rx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Latest handshake:" %}</th>
<td>{{ client.status.latest_handshake|default:'' }}</td>
</tr>
</tbody>
</table>
</div>
<p>
<a class="btn btn-default"

View File

@ -17,48 +17,52 @@
{{ box_name }}'s public key and IP address.
{% endblocktrans %}
</p>
<table class="table">
<tbody>
<tr>
<th>{% trans "Server endpoint:" %}</th>
<td>{{ peer.endpoint }}</td>
</tr>
<tr>
<th>{% trans "Server public key:" %}</th>
<td>{{ peer.public_key }}</td>
</tr>
<tr>
<th>{% trans "Pre-shared key:" %}</th>
<td>{{ peer.preshared_key }}</td>
</tr>
<tr>
<th>{% trans "Public key of this machine:" %}</th>
<td>{{ server.public_key }}</td>
</tr>
<tr>
<th>{% trans "IP address of this machine:" %}</th>
<td>{{ server.ip_address }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th>{% trans "Server endpoint:" %}</th>
<td>{{ peer.endpoint }}</td>
</tr>
<tr>
<th>{% trans "Server public key:" %}</th>
<td>{{ peer.public_key }}</td>
</tr>
<tr>
<th>{% trans "Pre-shared key:" %}</th>
<td>{{ peer.preshared_key }}</td>
</tr>
<tr>
<th>{% trans "Public key of this machine:" %}</th>
<td>{{ server.public_key }}</td>
</tr>
<tr>
<th>{% trans "IP address of this machine:" %}</th>
<td>{{ server.ip_address }}</td>
</tr>
</tbody>
</table>
</div>
<h3>{% trans "Status" %}</h3>
<table class="table">
<tbody>
<tr>
<th>{% trans "Data transmitted:" %}</th>
<td>{{ peer.status.transfer_tx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Data received:" %}</th>
<td>{{ peer.status.transfer_rx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Latest handshake:" %}</th>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<tbody>
<tr>
<th>{% trans "Data transmitted:" %}</th>
<td>{{ peer.status.transfer_tx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Data received:" %}</th>
<td>{{ peer.status.transfer_rx|filesizeformat }}</td>
</tr>
<tr>
<th>{% trans "Latest handshake:" %}</th>
<td>{{ peer.status.latest_handshake|default:'' }}</td>
</tr>
</tbody>
</table>
</div>
{% endif %}
{% endfor %}

View File

@ -7,7 +7,7 @@
{% load static %}
{% if clients %}
<div id="clients" class="collapse">
<div id="clients" class="collapse table-responsive">
<table class="table">
{% with clients|clients_of_type:'web' as web_clients %}

View File

@ -30,24 +30,26 @@
{{ service_name }}:
{% endblocktrans %}
<table class="table">
<thead>
<tr>
<th>{% trans "Protocol" %}</th>
<th>{% trans "From Router/WAN Ports" %}</th>
<th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th>
</tr>
</thead>
<tbody>
{% for port in port_forwarding_info.ports %}
<tr>
<td>{{ port.protocol }}</td>
<td>{{ port.ports }}</td>
<td>{{ port.ports }}</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>{% trans "Protocol" %}</th>
<th>{% trans "From Router/WAN Ports" %}</th>
<th>{% blocktrans %}To {{box_name}} Ports{% endblocktrans %}</th>
</tr>
</thead>
<tbody>
{% for port in port_forwarding_info.ports %}
<tr>
<td>{{ port.protocol }}</td>
<td>{{ port.ports }}</td>
<td>{{ port.ports }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</p>

View File

@ -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;
}