- Added dashboard functionality at /status with Basic Auth using DASHBOARD_PASSWORD. - Created server-side event logging to track catalog and university status. - Implemented traffic metrics tracking and display on the dashboard. - Enhanced API tests to cover new dashboard features and authentication. - Introduced CSS and JS for dashboard styling and functionality. - Added tests for dashboard access control and data retrieval.
88 lines
3.6 KiB
HTML
88 lines
3.6 KiB
HTML
<!doctype html>
|
||
<html lang="ru">
|
||
<head>
|
||
<meta charset="UTF-8" />
|
||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||
<meta name="robots" content="noindex" />
|
||
<title>Статус · Расписание ПГУ</title>
|
||
<link rel="icon" href="/icon.svg" />
|
||
<link rel="stylesheet" href="status.css" />
|
||
<script type="module" src="status.js"></script>
|
||
</head>
|
||
<body>
|
||
<header class="top">
|
||
<div>
|
||
<h1>Расписание ПГУ</h1>
|
||
<p class="sub" id="sub">Статус сервера</p>
|
||
</div>
|
||
<div class="refresh">
|
||
<span id="updated" class="muted" aria-live="polite"></span>
|
||
<button id="reload" type="button" class="tonal">Обновить</button>
|
||
</div>
|
||
</header>
|
||
<main>
|
||
<p id="error" class="banner bad" hidden></p>
|
||
<ul id="warnings" class="warnings" hidden></ul>
|
||
<section class="tiles" id="tiles" aria-label="Состояние"></section>
|
||
|
||
<section class="card" aria-labelledby="traffic-title">
|
||
<div class="card-head">
|
||
<h2 id="traffic-title">Запросы за час</h2>
|
||
<span class="muted" id="traffic-since"></span>
|
||
</div>
|
||
<div class="kpis" id="kpis"></div>
|
||
<figure class="chart">
|
||
<svg id="chart" viewBox="0 0 600 140" preserveAspectRatio="none" role="img" aria-label="Запросы по минутам за последний час"></svg>
|
||
<figcaption class="legend">
|
||
<span><i class="swatch fresh"></i>С ответом</span>
|
||
<span><i class="swatch cached"></i>Без изменений (304)</span>
|
||
<span><i class="swatch failed"></i>Ошибки</span>
|
||
<span class="axis"><span>−60 мин</span><span>−30 мин</span><span>сейчас</span></span>
|
||
</figcaption>
|
||
</figure>
|
||
<div class="split">
|
||
<div>
|
||
<h3>Адреса</h3>
|
||
<table id="endpoints">
|
||
<thead>
|
||
<tr><th scope="col">Адрес</th><th scope="col" class="num">Запросов</th><th scope="col" class="num">Среднее</th><th scope="col" class="num">Ошибок</th></tr>
|
||
</thead>
|
||
<tbody></tbody>
|
||
</table>
|
||
</div>
|
||
<div>
|
||
<h3>Самые активные клиенты</h3>
|
||
<table id="clients">
|
||
<thead>
|
||
<tr><th scope="col">Адрес</th><th scope="col" class="num">Запросов</th></tr>
|
||
</thead>
|
||
<tbody></tbody>
|
||
</table>
|
||
<p class="muted small">Адреса без последней части: точные не хранятся.</p>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<div class="columns">
|
||
<section class="card" aria-labelledby="events-title">
|
||
<div class="card-head"><h2 id="events-title">События</h2></div>
|
||
<ol id="events" class="events"></ol>
|
||
</section>
|
||
|
||
<section class="card" aria-labelledby="diag-title">
|
||
<div class="card-head">
|
||
<h2 id="diag-title">Подозрительные ячейки</h2>
|
||
<span class="muted" id="diag-count"></span>
|
||
</div>
|
||
<div class="filters">
|
||
<input id="q" type="search" placeholder="Группа, документ или текст ячейки" aria-label="Поиск по ячейкам" />
|
||
<div id="codes" class="chips" role="group" aria-label="Виды"></div>
|
||
</div>
|
||
<div id="failed"></div>
|
||
<div id="problems"></div>
|
||
</section>
|
||
</div>
|
||
</main>
|
||
</body>
|
||
</html>
|