Files
app-autotest/site/templates/index.html
T

58 lines
3.0 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<title>Autotest</title>
<link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='favicon.svg') }}" />
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
<style>
.layout { display:flex; gap:16px; max-width:900px; margin:16px auto; padding:0 16px; }
.left { width:380px; flex-shrink:0; }
.right { flex:1; min-width:0; display:flex; align-items:center; justify-content:center; color:var(--muted); }
</style>
</head>
<body>
<div style="max-width:900px;margin:0 auto;padding:12px 16px 0;display:flex;align-items:center;gap:12px;">
<img src="{{ url_for('static', filename='logo.svg') }}" alt="Nubes" style="height:24px;" />
<span style="font-size:11px;color:var(--muted);">v{{ config.VERSION if config else '?' }}</span>
<span style="flex:1;"></span>
<form method="post" style="display:flex;align-items:center;gap:6px;">
<input type="password" name="token" placeholder="env: {{ env_token_masked }}" value="{{ '' if not has_user_token else '••••••••' }}" style="height:28px;width:200px;font-size:12px;border:1px solid var(--brand-gray);border-radius:4px;padding:0 6px;" />
<button type="submit" name="action" value="save" class="btn" style="height:28px;font-size:12px;padding:0 8px;">OK</button>
{% if has_user_token %}
<button type="submit" name="action" value="clear" class="btn btn-danger" style="height:28px;font-size:12px;padding:0 8px;">Выйти</button>
{% endif %}
{% if error %}<span style="color:var(--destructive);font-size:12px;">{{ error }}</span>{% endif %}
</form>
<div class="layout">
<div class="left">
{% if organization %}
<div class="card">
<div class="card-header">Организация</div>
<div class="card-body" style="padding:8px 14px;font-size:12px;">
{{ organization.displayName }}{% if client_id %} ({{ client_id }}){% endif %} — <span class="badge badge-success">{{ organization.explainedStatus or "OK" }}</span>
</div>
</div>
{% endif %}
{% for svc_name, items in instance_groups.items() %}
<div class="card" style="margin-top:8px;">
<div class="card-header" style="cursor:pointer;font-size:13px;" onclick="this.nextElementSibling.style.display=this.nextElementSibling.style.display==='none'?'block':'none'">{{ svc_name }} ({{ items|length }})</div>
<div class="card-body" style="padding:0;max-height:200px;overflow-y:auto;">
<table>
{% for i in items %}
<tr><td style="font-size:12px;">{{ i.displayName }}</td><td><span class="badge badge-success" style="font-size:10px;">{{ i.explainedStatus or "?" }}</span></td></tr>
{% endfor %}
</table>
</div>
</div>
{% endfor %}
</div>
<div class="right">
<p>Скоро здесь будут тесты.</p>
</div>
</div>
</body>
</html>