{% extends "base.html" %}
{% block title %}suvi - Manage{% endblock %}

{% block content %}

<h3>Management tasks</h3>
<div class="btn-group-vertical" role="group">
    <a href="{{url_for('app_clean_task_logs')}}" class="btn btn-secondary text-start"><img src="/static/img/recycle.svg" width="24" height="24" title="Clear all task logs"> Clear all task logs</a>
    <a href="{{url_for('telemetry_json')}}" class="btn btn-secondary mt-1 text-start"><img src="/static/img/code.svg" width="24" height="24" title="Telemetry data as JSON"> Telemetry data</a>
    <a href="{{url_for('app_shutdown')}}" class="btn btn-danger mt-1 text-start"><img src="/static/img/shutdown.svg" width="24" height="24" title="Stop all tasks and schedules"> Stop all tasks and schedules</a>
</div>

{% if message is not none %}
    <h3 class="mt-5">Message</h3>
    <div class="alert alert-info" role="alert">
        {{ message }}
    </div>
{%endif %}

{% if infos is not none %}
    <h3 class="mt-5">Infos</h3>
    <table class="table">
        <thead>
            <tr>
                <th style="width: 200px">Key</th>
                <th>Value</th>
            </tr>
        </thead>
        <tbody>
            {% for key, value in infos.items() %}
            <tr>
                <td>{{ key }}</td>
                <td><code>{{ value }}</code></td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
{% endif %}

{% endblock %}