version 1.2: Telegram-бот, мониторинг сервера на дашборде, README

- bot.py: Telegram-бот (/users, /create, /delete, /warp, /stats, /dashboard)
- install-bot.sh: установщик бота (systemd, конфиг /etc/mita/bot.json)
- app.py: API /api/bot/{status,install,uninstall,config}, /api/stats (CPU/RAM/диск)
- templates: раздел «Telegram бот» в UI, мониторинг CPU/RAM/диск на дашборде (2s auto-refresh)
- mita-ctl.sh: пункт 11 «Telegram-бот», удаление бота в полном uninstall
- install.sh: опциональная установка бота с инструкцией
- README.md: описание проекта и дорожная карта
This commit is contained in:
2026-06-26 23:37:05 +03:00
parent d65f80cf9e
commit 33bdcdce68
9 changed files with 1432 additions and 49 deletions
+7 -1
View File
@@ -125,6 +125,10 @@ tr:hover td{background:rgba(255,255,255,.02)}
<svg class="nav-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"/></svg>
Безопасность
</button>
<button class="nav-item" onclick="showPage('bot',this)">
<svg class="nav-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/></svg>
Telegram бот
</button>
<div class="sidebar-footer"><a href="{{ base }}/logout">Выйти</a></div>
</nav>
<main class="main">{% block content %}{% endblock %}</main>
@@ -148,10 +152,12 @@ function showPage(id,btn){
document.querySelectorAll('.nav-item').forEach(n=>n.classList.remove('active'));
document.getElementById('page-'+id).classList.add('active');
if(btn)btn.classList.add('active');
if(id==='dashboard')loadDashboard();
if(id==='dashboard'){loadDashboard();if(typeof startStatsPolling==='function')startStatsPolling();}
else{if(typeof stopStatsPolling==='function')stopStatsPolling();}
if(id==='users')loadUsers();
if(id==='ssl')loadSSL();
if(id==='security')loadSecurityPage();
if(id==='bot')loadBotPage();
}
function openModal(title,html){
document.getElementById('modal-title-text').textContent=title;