network_inventory/inventory/templates/inventory/index.html

25 lines
752 B
HTML
Raw Normal View History

2017-12-25 00:37:31 +01:00
{% extends "inventory/base.html" %}
{% block content %}
{% if device_list or computer_list %}
<h3>Device List</h3>
2017-12-25 00:37:31 +01:00
<ul>
{% for device in device_list %}
<li><a href="{% url 'device' device.id %}">{{ device.name }}</a></li>
{% endfor %}
</ul>
<h3>Computer List</h3>
<table>
<tr>
<th>Hostname</th>
<th>IP</th>
</tr>
2017-12-25 00:37:31 +01:00
{% for computer in computer_list %}
<tr>
<td><a href="{% url 'computer' computer.id %}">{{ computer.name }}</a></td>
<td>{{ computer.ip }}</td>
</tr>
2017-12-25 00:37:31 +01:00
{% endfor %}
</table>
2017-12-25 00:37:31 +01:00
{% endif %}
{% endblock %}