<!DOCTYPE html>
{% extends "bootstrap/base.html" %}
{% import "navbar.html" as nav %}
{% block navbar %}
    {{ nav }}
{% endblock navbar %}

{% block content %}
<div class="table-responsive"> 
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th>Dienst</th>
                    <th>Aktion</th>
                    <th>Status</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><img src="/static/img/net.png" width="48" height="48"></td>
                    <td>{% if showbutton %}
                            <form class="navbar-form navbar-left" action="/startserver" method="post">
                            <input type="submit" class="btn btn-default" value="VNC-Server starten"></input>
                            </form>
                        {% else %}
                            <form class="navbar-form navbar-left" action="/stoppserver" method="post">
                            <input type="submit" class="btn btn-default" value="VNC-Server stoppen"></input>
                            </form>
                        {% endif %}</td>
                    <td>{% if showbutton %}
                            IP-Adresse: Unbekannt
                        {% else %}
                            IP-Adresse: {{ getip }}:5901
                        {% endif %}
                        {% if showbutton %}
                            (Offline)
                        {% else %}
                            (Online)
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <td><img src="/static/img/reboot.png" width="48" height="48"></td>
                    <td><form class="navbar-form navbar-left" action="/reboot" method="post">
                        <div class="form-group">
                            <input type="password" class="form-control" name="password" maxlength="128" placeholder="Root-Passwort"></input>
                        </div>
                            <input type="submit" class="btn btn-default" value="Neu starten"></input>
                        </form>
                    </td>
                    <td>{% if rbt1 %}
                            {{ rbt1 }}
                        {% else %}
                            
                        {% endif %}</td>
                </tr>
            </tbody>
        </table>
    </div>
{% endblock %}