{% extends "ui/base-devices.html" %}
{% load url from future %}
{% load icons %}


{% block content %}
<form method="POST" class="form form-inline" id="disco-form" action="/ui/discover/">
{% csrf_token %}
<textarea id="disco-console" class="disco-console" readonly></textarea>
<div class="form-actions">
    <div class="input-append control-group">
        <input name="ip" type="text"
            autocomplete="off"
            data-provide="typeahead"
            data-source="{{ addresses }}"
            value="{{ address }}"
         ><button class="btn btn-primary">
            {% icon 'fugue-flashlight' %} Discover
        </button>
    </div>
</div>
</form>

<h2>Warnings</h2>
<table class="table table-bordered">
<tr>
    <th>Date</th>
    <th>Plugin</th>
    <th>Address</th>
    <th>Message</th>
</tr>    
{% for warning in warnings %}
<tr>
    <td>{{ warning.date }}</td>
    <td>{{ warning.plugin }}</td>
    <td>{{ warning.ip|default:'' }}</td>
    <td>{{ warning.message }}</td>
</tr>
{% endfor %}
</table>
{% endblock content %}
