Made templates work with new data.

This commit is contained in:
Slatian
2023-08-05 21:09:56 +02:00
parent 727d9a77cd
commit fdb23312df
11 changed files with 155 additions and 20 deletions

View File

@ -20,6 +20,10 @@
{% if extra.stylesheet %}<link rel="stylesheet" href="{{extra.stylesheet}}" type="text/css" />{% endif %}
{% if extra.favicon %}<link rel="icon" href="{{extra.favicon}}" type="{{extra.favicon_mimetype|default(value="image/png")}}" \>{% endif %}
<!-- View: {{view}} -->
{% set used_dns_resolver = "default" %}
{% if data.result.used_dns_resolver %}
{% set used_dns_resolver = data.result.used_dns_resolver %}
{% endif%}
</head>
<body>
<header>
@ -30,6 +34,11 @@
title="Search for an IP-Adress, Domain-Name, or ASN."
placeholder="1.2.3.4, 2001::1:2:3:4, example.org, AS1234"
value="{% if view == "dig" %}{{ data.query }}{% elif view == "ip" %}{{ data.result.address }}{% elif view == "asn"%}AS{{ data.asn }}{% endif %}"/>
<select name="dns">
{% for r in dns_resolvers %}
<option value="{{ r.id }}" {% if r.id == used_dns_resolver %}selected{%endif%}>{{ r.name }}</option>
{% endfor %}
</select>
<input type="submit" value="Query"/>
</form>
</nav>