{% extends "../base.html" %}

{% block head %}
    <script defer type="module" src="{{fix_static('js/uptime/uptime.js')}}"></script>
{% end %}
{% block stylesheets %}
    <link rel="stylesheet" type="text/css" href="{{fix_static('css/uptime.css')}}">
{% end %}

{% block description %}Diese Webseite läuft bereits {{uptime_str}}{% end %}

{% block body %}
    <div class="text-2xl">
        Diese Webseite läuft bereits <div id="uptime" uptime="{{uptime}}">{{uptime_str}}</div>
    </div>
    {% if availability and availability.get('percentage') %}
        <div class="text-2xl">
            <br>Verfügbarkeit: {{f"{availability['percentage']:.2f}".replace(".", ",")}} %<br>
            <img src="{{fix_url('/betriebszeit/verfuegbarkeit.svg', a=int(availability['percentage'] * 100) / (100.0 * 100))}}"
                 alt="Verfügbarkeits-Tortendiagramm"
                 width="100"
                 height="100">
        </div>
    {% end %}
{% end %}
