nomilo/templates/pages/records.html

91 lines
3.7 KiB
HTML
Raw Normal View History

2025-03-31 00:16:10 +00:00
{% import "macros.html" as macros %}
2024-12-22 21:36:26 +00:00
{% extends "bases/app.html" %}
2025-03-31 00:16:10 +00:00
2024-12-22 21:36:26 +00:00
{% block title %}Records - {{ current_zone }} - {% endblock title %}
{% block main %}
2025-03-31 00:16:10 +00:00
<h1>Zone <strong>{{ current_zone }}</strong> records</h1>
<svg width="0" height="0" aria-hidden="true" style="position: absolute;">
2024-12-22 21:36:26 +00:00
<defs>
<clipPath id="corner-folder-tab-right" clipPathUnits="objectBoundingBox">
<path d="m 0,0 c .25,0 0.75,1 1,1 l -1,0 z"/>
</clipPath>
</defs>
</svg>
<section>
<h2>Records</h2>
2025-03-31 00:16:10 +00:00
{% for group in records.records %}
2024-12-22 21:36:26 +00:00
<article class="domain">
<header>
2025-03-31 00:16:10 +00:00
<h3 class="folder-tab">{{ group.owner }}</h3>
2024-12-22 21:36:26 +00:00
<span class="sep"></span>
2025-03-31 00:16:10 +00:00
<a href="{{ url }}/new?subdomain={{ group.owner | trim_end_matches(pat=current_zone) | trim_end_matches(pat=".") }}" class="button">
2024-12-22 21:36:26 +00:00
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-plus-circle" viewBox="0 0 16 16" aria-hidden="true">
<path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/>
<path d="M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4"/>
</svg>
Add record
</a>
</header>
<div class="records">
2025-03-31 00:16:10 +00:00
{% if group.web %}
<h4>Web</h4>
2024-12-22 21:36:26 +00:00
<ul>
2025-03-31 00:16:10 +00:00
{% if group.web.addresses %}
{{ macros::rrset(
rtype=group.web.addresses.rtype,
ttl=group.web.addresses.ttl,
data=group.web.addresses.data,
zone=current_zone) }}
{% endif %}
</ul>
{% endif %}
{% if group.mail %}
<h4>E-mails</h4>
<ul>
{% if group.mail.servers %}
{{ macros::rrset(
rtype=group.mail.servers.rtype,
ttl=group.mail.servers.ttl,
data=group.mail.servers.data,
zone=current_zone) }}
{% endif %}
{% if group.mail.spf %}
{{ macros::rrset(
rtype=group.mail.spf.rtype,
ttl=group.mail.spf.ttl,
data=group.mail.spf.data,
zone=current_zone) }}
2024-12-22 21:36:26 +00:00
{% endif %}
2025-03-31 00:16:10 +00:00
</ul>
{% endif %}
{% if group.general_records %}
<h4>General</h4>
<ul>
{% for rrset in group.general_records %}
{{ macros::rrset(
rtype=rrset.rtype,
ttl=rrset.ttl,
data=rrset.data,
zone=current_zone) }}
{% endfor %}
</ul>
{% endif %}
</div>
</article>
{% endfor %}
</section>
<section>
<h2>Aliases</h2>
<ul>
{% for alias in records.aliases %}
<li>{{ alias.from }} → {{ alias.target }}</li>
2024-12-22 21:36:26 +00:00
{% endfor %}
2025-03-31 00:16:10 +00:00
</ul>
2024-12-22 21:36:26 +00:00
</section>
{% endblock main %}