{% extends 'base.html' %}

{% set title = "Riego - Ventilboxen" %}
{% set active_menu = "boxes" %}


{% block content %}
<h1>{{ item['name'] }}</h1>
<ul>
	<li>topic: {{item['topic']}}</li>
	<li>hostname: {{item['hostname']}}</li>
	<li>remark: {{item['remark']}}</li>
	<li>first_seen: {{item['first_seen'].strftime("%Y-%m-%d %H:%M:%S")}}</li>
	<li>has_config: {{item['has_config']}}</li>
	<li>online_since: 
        {% if item['online_since'] is not none %}
        {{ item['online_since'].strftime("%Y-%m-%d %H:%M:%S") }}
        {% else %}
        -
        {% endif %}
    </li>
	<li>hw_type: {{item['hw_type']}}</li>
	<li>hw_version: {{item['hw_version']}}</li>
	<li>sw_version: {{item['sw_version']}}</li>
	<li>fallback_topic: {{item['fallback_topic']}}</li>
	<li>group_topic: {{item['group_topic']}}</li>
	<li>ip_address: <a href="http://{{item['ip_address']}}" target="_blank">{{item['ip_address']}}</a></li>
</ul>

<p>
    <a href="{{url('boxes')}}">list</a> 
    <a href="{{url('boxes_item_restart',item_id=item['id'])}}">Restart</a>
    <a href="{{url('boxes_item_edit',item_id=item['id'])}}">edit</a>
</p>
{% endblock %}
