{% extends "/base.html" %}
{% block title %}{{ target }} をテスト中 - Nercone TLS Test{% endblock %}
{% block title_suffix %}TLS Test{% endblock %}
{% block description %}{{ target }} に対する TLS Test の進捗を表示しています。{% endblock %}
{% block header_desc %}ただのTLS/SSL設定分析サービス{% endblock %}
{% block extra_head %}
        <link rel="stylesheet" href="/tools/tls-test/assets/tls-test.css">
{% endblock %}
{% block content %}
            <section class="tls-status">
                <h1 class="tls-landing-title"><span class="font-bold">Nercone</span> <span class="font-weight-300">TLS Test</span></h1>
                <p class="tls-status-subtitle"><span class="font-bold">{{ target }}</span><span class="text-tx-alt"> のテストは<span id="tls-status-verb">実行中</span>です。</span></p>

                <div class="tls-status-progress">
                    <p id="tls-phase" class="tls-status-phase text-tx-alt font-small">待機中…</p>
                    <div class="tls-progress-track">
                        <div id="tls-progress-bar" class="tls-progress-bar" style="width: 0%"></div>
                    </div>
                    <p class="tls-status-testid text-tx-alt font-small">テストID: <code>{{ test_id }}</code></p>
                </div>

                <div class="tls-log-wrap">
                    <div id="tls-log" class="tls-log">
                        {% for entry in progress_entries %}
                        <div class="tls-log-row">
                            <span class="tls-log-cat text-tx-alt">[{{ entry.phase }}]</span>
                            <span class="tls-log-msg">{{ entry.detail }}</span>
                        </div>
                        {% endfor %}
                    </div>
                </div>
            </section>

            <script>
                window.__TLS_INIT__ = {
                    id: "{{ test_id }}",
                    target: "{{ target }}",
                    status: "{{ status }}",
                    wsUrl: (location.protocol === "https:" ? "wss://" : "ws://") + location.host + "/tools/tls-test/ws/{{ test_id }}",
                    resultsUrl: "/tools/tls-test/results/{{ test_id }}/",
                };
            </script>
            <script src="/tools/tls-test/assets/tls-test.js" defer></script>
{% endblock %}
