mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2025-07-16 22:13:30 +02:00
Made templates work with new data.
This commit is contained in:
57
templates/dns_resolver.html
Normal file
57
templates/dns_resolver.html
Normal file
@ -0,0 +1,57 @@
|
||||
{% extends "base.html" %}
|
||||
{% import "helpers.html" as helper %}
|
||||
|
||||
{% block title %}{{ data.config.display_name }}{% endblock %}
|
||||
{% block h1 %}DNS Resolver: {{ data.config.display_name }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{%- set c = data.config %}
|
||||
<section>
|
||||
<h2>Connection Configuration</h2>
|
||||
<dl>
|
||||
<dt>Address{% if c.servers | length > 1 %}es{% endif %}</dt>
|
||||
{% if c.servers | length > 0 %}
|
||||
{%- for a in c.servers %}
|
||||
{% if a is matching("^\[") %}
|
||||
{% set ip = a | split(pat="]") | first | trim_start_matches(pat="[") %}
|
||||
{% else %}
|
||||
{% set ip = a | split(pat=":") | first %}
|
||||
{% endif %}
|
||||
<dd>{{ helper::ip(extra=extra, ip=ip) }}</dd>
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
<dd>None Configured</dd>
|
||||
{%- endif %}
|
||||
|
||||
<dt>Protocol</dt>
|
||||
<dd>{{ c.protocol }}</dd>
|
||||
|
||||
{%- if c.tls_dns_name %}
|
||||
<dt>DNS Name</dt>
|
||||
<dd>{{ helper::dig(extra=extra, name=c.tls_dns_name) }}</dd>
|
||||
{%- endif %}
|
||||
|
||||
{%- if c.search | length > 0 %}
|
||||
<dt>Search</dt>
|
||||
{%- for s in c.search %}
|
||||
<dd>{{s}}</dd>
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
</dl>
|
||||
{%- if c.info_url %}
|
||||
<p class="button-paragraph"><a href="{{c.info_url}}">More about the {{c.display_name}} DNS Server <small>(external link)</small></a></p>
|
||||
{%- endif %}
|
||||
</section>
|
||||
|
||||
{%- if c.aliases | length > 0 %}
|
||||
<section>
|
||||
<h2>Aliases</h2>
|
||||
<ul>
|
||||
{%- for a in c.aliases %}
|
||||
<li>{{a}}</li>
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
<p class="box hint">You can use this DNS server by typing <code>via {{c.aliases | first }}</code> {% if c.aliases | length > 1 %}(or any other alias){% endif %} in the searchfield.</p>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
Reference in New Issue
Block a user