peginelab-site/status.html
PegiNelab Admin 677dcd5307
Some checks are pending
Deploy to server / deploy (push) Waiting to run
Добавлена страница статуса с температурой CPU
2025-12-12 03:35:28 +03:00

278 lines
12 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PegiNelab - Статус систем</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
color: white;
margin: 0;
padding: 20px;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
}
.logo {
max-width: 100px;
margin: 20px auto;
display: block;
}
nav {
margin: 30px 0;
text-align: center;
}
nav a {
color: white;
text-decoration: none;
margin: 0 10px;
padding: 10px 20px;
border-radius: 8px;
transition: all 0.3s;
}
nav a:hover {
background: rgba(255,255,255,0.2);
}
.status-container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
margin: 40px 0;
}
.status-card {
background: rgba(255, 255, 255, 0.08);
border-radius: 12px;
padding: 20px;
border: 1px solid rgba(255,255,255,0.1);
}
.status-card.critical { border-left: 5px solid #f44336; }
.status-card.warning { border-left: 5px solid #ff9800; }
.status-card.ok { border-left: 5px solid #4CAF50; }
.status-card.info { border-left: 5px solid #2196F3; }
.status-indicator {
width: 12px;
height: 12px;
border-radius: 50%;
display: inline-block;
margin-right: 8px;
}
.online { background: #4CAF50; }
.offline { background: #f44336; }
.warning { background: #ff9800; }
.metrics {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
margin-top: 30px;
}
.metric {
background: rgba(255,255,255,0.05);
padding: 15px;
border-radius: 8px;
text-align: center;
}
.metric-value {
font-size: 2rem;
font-weight: bold;
margin: 10px 0;
}
.log-container {
background: rgba(0,0,0,0.3);
border-radius: 8px;
padding: 15px;
margin-top: 30px;
font-family: monospace;
font-size: 0.9rem;
max-height: 200px;
overflow-y: auto;
}
.log-entry {
padding: 5px 0;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.log-time { color: #aaa; }
.log-info { color: #4CAF50; }
.log-error { color: #f44336; }
.log-warning { color: #ff9800; }
</style>
</head>
<body>
<div class="container">
<img src="peginelab.png" alt="PegiNelab" class="logo">
<h1 style="text-align: center;">📊 Мониторинг систем PegiNelab</h1>
<p style="text-align: center;">Реальное время, метрики и состояние всех сервисов</p>
<nav>
<a href="index.html">🏠 Главная</a>
<a href="projects.html">📁 Проекты</a>
<a href="status.html">📊 Статус</a>
<a href="about.html"> О системе</a>
</nav>
<div class="metrics">
<div class="metric">
<div>🕒 Время работы</div>
<div class="metric-value" id="uptime">00:00:00</div>
<small>С момента запуска</small>
</div>
<div class="metric">
<div>🐳 Контейнеры</div>
<div class="metric-value">4/4</div>
<small>Все работают</small>
</div>
<div class="metric">
<div>📈 CPU</div>
<div class="metric-value" id="cpu-load">...</div>
<small>Нагрузка</small>
</div>
<div class="metric">
<div>💾 Память</div>
<div class="metric-value" id="memory-usage">...</div>
<small>Использовано</small>
</div>
<div class="metric">
<div>🌡️ Температура CPU</div>
<div class="metric-value" id="temp-cpu">Загрузка...</div>
<small id="temp-status">Обновляется</small>
</div>
<div class="metric">
<div>📦 Диск</div>
<div class="metric-value" id="disk-usage">...</div>
<small>Использовано</small>
</div>
</div>
<div class="status-container">
<div class="status-card ok">
<h3><span class="status-indicator online"></span> Веб-сервер (Nginx)</h3>
<p><strong>Статус:</strong> Работает</p>
<p><strong>Порты:</strong> 80, 443</p>
<p><strong>Версия:</strong> 1.25.x</p>
<p><strong>Время ответа:</strong> <span id="nginx-ping">...</span> мс</p>
</div>
<div class="status-card ok">
<h3><span class="status-indicator online"></span> CI/CD Бот</h3>
<p><strong>Статус:</strong> Активен</p>
<p><strong>Команд за день:</strong> 24</p>
<p><strong>Последняя команда:</strong> /status</p>
<p><strong>Версия:</strong> 1.0</p>
</div>
<div class="status-card ok">
<h3><span class="status-indicator online"></span> Docker</h3>
<p><strong>Контейнеров:</strong> 4 запущено</p>
<p><strong>Демон:</strong> Активен</p>
<p><strong>Сеть:</strong> cicd-network</p>
<p><strong>Portainer:</strong> <a href="https://peginelab.com:9000" style="color: #4CAF50;">Доступен</a></p>
</div>
<div class="status-card ok">
<h3><span class="status-indicator online"></span> Forgejo (Git)</h3>
<p><strong>Статус:</strong> Работает</p>
<p><strong>Репозиториев:</strong> 8</p>
<p><strong>Пользователей:</strong> 3</p>
<p><strong>CI/CD:</strong> <span style="color: #4CAF50;">Активен</span></p>
</div>
<div class="status-card info">
<h3><span class="status-indicator online"></span> SSL Монитор</h3>
<p><strong>Статус:</strong> Мониторинг</p>
<p><strong>Домен:</strong> peginelab.com</p>
<p><strong>Срок действия:</strong> до Dec 2 2026</p>
<p><strong>След. проверка:</strong> <span id="next-check">...</span></p>
</div>
<div class="status-card ok">
<h3><span class="status-indicator online"></span> Веб-сайт</h3>
<p><strong>Статус:</strong> Обновлён</p>
<p><strong>Страниц:</strong> 4</p>
<p><strong>Последний деплой:</strong> <span id="last-deploy">...</span></p>
<p><strong>CI/CD:</strong> Автоматический</p>
</div>
</div>
<div class="log-container">
<h3>📝 Последние события</h3>
<div id="logs">
<div class="log-entry"><span class="log-time">02:30</span> <span class="log-info">Деплой сайта завершён</span></div>
<div class="log-entry"><span class="log-time">02:15</span> <span class="log-info">SSL сертификат проверен (OK)</span></div>
<div class="log-entry"><span class="log-time">01:45</span> <span class="log-info">Бот перезапущен</span></div>
<div class="log-entry"><span class="log-time">01:30</span> <span class="log-warning">Проверка температуры: 58°C</span></div>
<div class="log-entry"><span class="log-time">00:45</span> <span class="log-info">Бэкап конфигов выполнен</span></div>
</div>
</div>
<div style="text-align: center; margin-top: 40px; padding: 20px; background: rgba(255,255,255,0.05); border-radius: 10px;">
<p>🔄 Данные обновляются автоматически каждые 10 секунд</p>
<p><a href="index.html" style="color: #4CAF50;">← Вернуться на главную</a></p>
</div>
</div>
<script>
// Время работы
function updateUptime() {
const start = new Date('2025-12-12T00:00:00');
const now = new Date();
const diff = now - start;
const hours = Math.floor(diff / (1000 * 60 * 60));
const minutes = Math.floor((diff % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((diff % (1000 * 60)) / 1000);
document.getElementById('uptime').textContent =
`${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
}
// Температура (заглушка - в реальности будет API запрос к sensors)
function updateTemperature() {
// Заглушка: случайная температура 40-60°C
const temp = 45 + Math.floor(Math.random() * 15);
document.getElementById('temp-cpu').textContent = temp + '°C';
let status = 'Норма';
let color = '#4CAF50';
if (temp > 70) { status = 'Высокая'; color = '#f44336'; }
else if (temp > 55) { status = 'Повышена'; color = '#ff9800'; }
document.getElementById('temp-status').textContent = status;
document.getElementById('temp-status').style.color = color;
}
// Остальные метрики (заглушки)
function updateMetrics() {
document.getElementById('cpu-load').textContent =
(10 + Math.random() * 20).toFixed(1) + '%';
document.getElementById('memory-usage').textContent =
(1.8 + Math.random() * 0.5).toFixed(1) + ' GB';
document.getElementById('disk-usage').textContent =
(35 + Math.random() * 20).toFixed(0) + '%';
document.getElementById('nginx-ping').textContent =
(5 + Math.random() * 10).toFixed(0);
const nextCheck = new Date();
nextCheck.setHours(nextCheck.getHours() + 1);
document.getElementById('next-check').textContent =
nextCheck.getHours().toString().padStart(2, '0') + ':00';
document.getElementById('last-deploy').textContent =
new Date().toLocaleTimeString().slice(0, 5);
}
// Обновляем каждые 10 секунд
updateUptime();
updateTemperature();
updateMetrics();
setInterval(updateUptime, 1000);
setInterval(updateTemperature, 10000);
setInterval(updateMetrics, 10000);
</script>
</body>
</html>