{% extends "base.html" %}

{% block pagebanner %}
  <div class="header">
      <h2>dns info for {{ host.hostname }}</h2>
  </div>
  <br/>
{% endblock %}

{% block sidebar %}
{% include "navbar.tmpl" %}
<ul class="sidebar">
   <li><a href="/hostbase/{{ host.id }}/" class="sidebar">host info</a></li>
   <li><a href="/hostbase/{{ host.id }}/edit/" class="sidebar">edit host info</a></li>
   <li><a href="edit/" class="sidebar">edit dns info</a></li>
   <li><a href="/hostbase/{{ host.id }}/logs/" class="sidebar">change logs</a></li>
</ul>
{% include "logout.tmpl" %}
{% endblock %}

{% block content %}

{% for interface in host.interface_set.all %}
    {% for ip in interface.ip_set.all %}
        <ul><li> <b>ip_addr:</b> {{ ip.ip_addr }}</li>
        {% for name in ip.name_set.all  %}
            <ul> <li><b>name:</b> {{ name.name }}</li> <ul>
            {% for cname in name.cname_set.all %}
                <li> <b>cname:</b> {{ cname.cname }}</li>
            {% endfor %}
            {% for mx in name.mxs.all %}
                <li> <b>mx:</b> {{ mx.priority }} {{ mx.mx }}</li>
            {% endfor %}
            </ul></ul>
        {% endfor %}
        </ul>
    {% endfor %}
{% endfor %}
{% endblock %}

