This repository has been archived on 2026-11-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
WGTools-Extended/app/templates/dashboard.html
T
asminme affe28ad71
Wydanie WGTools-Extended / release (push) Failing after 16s
1.0.0
2026-10-30 00:35:08 +01:00

95 lines
8.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "base.html" %}
{% block content %}
<section class="page-head page-head-actions dashboard-head">
<div>
<h1 data-i18n="dashboard.title">{{ tr('dashboard.title') }}</h1>
<p data-i18n="dashboard.subtitle">{{ tr('dashboard.subtitle') }}</p>
</div>
<div class="wg-control-row" aria-label="WireGuard controls">
<button class="btn small success-control" id="wg-start-button" type="button">▶ {{ tr('dashboard.start') }}</button>
<button class="btn small" id="wg-restart-button" type="button">↻ {{ tr('dashboard.restart') }}</button>
<button class="btn small danger" id="wg-stop-button" type="button">■ {{ tr('dashboard.stop') }}</button>
</div>
</section>
<div class="metric-grid">
<section class="card metric-card">
<div class="metric-title" data-i18n="dashboard.wireguard">{{ tr('dashboard.wireguard') }}</div>
<div class="metric-value"><span id="wg-state-dot" class="status-dot unknown"></span><span id="wg-state">{{ tr('common.checking') }}</span></div>
<div class="metric-lines"><span id="wg-interface">wg0</span><span id="wg-address">—</span><span id="wg-port">—</span></div>
</section>
<section class="card metric-card">
<div class="metric-title" data-i18n="dashboard.peers">{{ tr('dashboard.peers') }}</div>
<div class="metric-value"><span id="peer-online">0</span> <small data-i18n="common.online">{{ tr('common.online') }}</small></div>
<div class="metric-lines"><span><span data-i18n="common.total">{{ tr('common.total') }}</span>: <b id="peer-total">0</b></span><span><span data-i18n="dashboard.site_to_site">{{ tr('dashboard.site_to_site') }}</span>: <b id="peer-s2s">0</b></span></div>
</section>
<section class="card metric-card">
<div class="metric-title-row">
<div class="metric-title" data-i18n="dashboard.traffic">{{ tr('dashboard.traffic') }}</div>
<button class="btn small traffic-reset-button" id="traffic-reset-button" type="button" data-i18n="dashboard.traffic_reset">{{ tr('dashboard.traffic_reset') }}</button>
</div>
<div class="traffic-pair"><div><span class="traffic-arrow">↓</span><b id="rx-total">0 B</b><small>RX</small></div><div><span class="traffic-arrow">↑</span><b id="tx-total">0 B</b><small>TX</small></div></div>
</section>
<section class="card metric-card">
<div class="metric-title" data-i18n="dashboard.routing">{{ tr('dashboard.routing') }}</div>
<div class="health-list compact"><div><span id="forwarding-icon">○</span><span data-i18n="server.ip_forwarding">{{ tr('server.ip_forwarding') }}</span></div><div><span id="nat-icon">○</span><span data-i18n="server.nat">{{ tr('server.nat') }}</span></div><div><span id="table-icon">○</span><span data-i18n="server.policy_table">{{ tr('server.policy_table') }}</span> <b id="policy-table">—</b></div></div>
</section>
</div>
<div class="resource-grid">
<section class="card resource-card">
<div class="resource-head"><span class="resource-icon">◉</span><span>{{ tr('dashboard.cpu') }}</span></div>
<div class="resource-value"><span id="cpu-percent">—</span><small>%</small></div>
<div class="resource-sub" id="cpu-detail">—</div>
<div class="resource-bar"><span id="cpu-bar"></span></div>
<div class="resource-history">
<div class="history-stats" aria-label="24 hour CPU statistics">
<span><small>{{ tr('dashboard.history_min') }}</small><b id="cpu-history-min">—</b></span>
<span><small>{{ tr('dashboard.history_avg') }}</small><b id="cpu-history-avg">—</b></span>
<span><small>{{ tr('dashboard.history_max') }}</small><b id="cpu-history-max">—</b></span>
</div>
<svg class="history-chart" viewBox="0 0 320 64" preserveAspectRatio="none" aria-hidden="true"><path class="history-grid" d="M0 63.5H320 M0 32H320 M0 .5H320"></path><path class="history-line primary" id="cpu-history-line"></path></svg>
<div class="history-caption"><span>{{ tr('dashboard.history_24h') }}</span><span>{{ tr('dashboard.history_now') }}</span></div>
</div>
</section>
<section class="card resource-card">
<div class="resource-head"><span class="resource-icon">▣</span><span>{{ tr('dashboard.memory') }}</span></div>
<div class="resource-value"><span id="memory-percent">—</span><small>%</small></div>
<div class="resource-sub" id="memory-detail">—</div>
<div class="resource-bar"><span id="memory-bar"></span></div>
<div class="resource-history">
<div class="history-stats" aria-label="24 hour memory statistics">
<span><small>{{ tr('dashboard.history_min') }}</small><b id="memory-history-min">—</b></span>
<span><small>{{ tr('dashboard.history_avg') }}</small><b id="memory-history-avg">—</b></span>
<span><small>{{ tr('dashboard.history_max') }}</small><b id="memory-history-max">—</b></span>
</div>
<svg class="history-chart" viewBox="0 0 320 64" preserveAspectRatio="none" aria-hidden="true"><path class="history-grid" d="M0 63.5H320 M0 32H320 M0 .5H320"></path><path class="history-line memory" id="memory-history-line"></path></svg>
<div class="history-caption"><span>{{ tr('dashboard.history_24h') }}</span><span>{{ tr('dashboard.history_now') }}</span></div>
</div>
</section>
<section class="card resource-card network-resource-card">
<div class="resource-head"><span class="resource-icon">⇄</span><span>{{ tr('dashboard.network') }}</span></div>
<div class="network-speed-row"><div><small>↓ RX</small><b id="network-rx-rate">—</b></div><div><small>↑ TX</small><b id="network-tx-rate">—</b></div></div>
<div class="resource-sub"><span id="network-interface">—</span> · <span id="server-uptime">—</span></div>
<div class="resource-history network-history">
<div class="history-stats network-history-stats" aria-label="24 hour network statistics">
<div class="network-stat-row rx"><strong>RX</strong><span><small>{{ tr('dashboard.history_min') }}</small><b id="network-rx-history-min">—</b></span><span><small>{{ tr('dashboard.history_avg') }}</small><b id="network-rx-history-avg">—</b></span><span><small>{{ tr('dashboard.history_max') }}</small><b id="network-rx-history-max">—</b></span></div>
<div class="network-stat-row tx"><strong>TX</strong><span><small>{{ tr('dashboard.history_min') }}</small><b id="network-tx-history-min">—</b></span><span><small>{{ tr('dashboard.history_avg') }}</small><b id="network-tx-history-avg">—</b></span><span><small>{{ tr('dashboard.history_max') }}</small><b id="network-tx-history-max">—</b></span></div>
</div>
<svg class="history-chart" viewBox="0 0 320 64" preserveAspectRatio="none" aria-hidden="true"><path class="history-grid" d="M0 63.5H320 M0 32H320 M0 .5H320"></path><path class="history-line network-rx" id="network-rx-history-line"></path><path class="history-line network-tx" id="network-tx-history-line"></path></svg>
<div class="history-caption"><span>{{ tr('dashboard.history_24h') }} · RX / TX</span><span>{{ tr('dashboard.history_now') }}</span></div>
</div>
</section>
</div>
<section class="card">
<div class="card-head"><div><h2 data-i18n="dashboard.active_peers">{{ tr('dashboard.active_peers') }}</h2><p data-i18n="dashboard.active_peers_subtitle">{{ tr('dashboard.active_peers_subtitle') }}</p></div><div class="dashboard-peer-tools"><div class="quick-search-wrap"><input id="dashboard-peer-search" class="quick-search-input" type="search" autocomplete="off" placeholder="{{ tr('dashboard.quick_search') }}" aria-label="{{ tr('dashboard.quick_search') }}"><button class="quick-search-clear" id="dashboard-peer-search-clear" type="button" aria-label="{{ tr('dashboard.quick_search_clear') }}" data-tooltip="{{ tr('dashboard.quick_search_clear') }}" hidden>×</button></div><button class="btn" id="refresh-button" data-i18n="common.refresh">{{ tr('common.refresh') }}</button></div></div>
<div class="table-wrap"><table><thead><tr><th data-i18n="clients.name">{{ tr('clients.name') }}</th><th data-i18n="clients.address">{{ tr('clients.address') }}</th><th data-i18n="clients.type">{{ tr('clients.type') }}</th><th data-i18n="clients.status">{{ tr('clients.status') }}</th><th data-i18n="clients.handshake">{{ tr('clients.handshake') }}</th><th>RX</th><th>TX</th></tr></thead><tbody id="dashboard-peer-body"><tr><td colspan="7" class="empty">{{ tr('common.loading') }}</td></tr></tbody></table></div>
</section>
<section class="card">
<div class="card-head"><div><h2 data-i18n="dashboard.activity">{{ tr('dashboard.activity') }}</h2><p data-i18n="dashboard.activity_subtitle">{{ tr('dashboard.activity_subtitle') }}</p></div><span id="last-update" class="muted">—</span></div>
<div id="diagnostic-strip" class="diagnostic-grid"></div>
</section>
{% endblock %}