From 02b8e2bb552e5f9ab800090d66a1e64c261826cd Mon Sep 17 00:00:00 2001 From: benya Date: Mon, 9 Feb 2026 04:08:27 +0300 Subject: [PATCH] Keep docker restarts inside docker keyboard --- handlers/system.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/system.py b/handlers/system.py index 8d1a079..7332ede 100644 --- a/handlers/system.py +++ b/handlers/system.py @@ -13,6 +13,7 @@ from keyboards import ( system_logs_integrations_kb, system_logs_kb, openwrt_kb, + docker_kb, ) from system_checks import security, disks, hardware, list_disks, smart_last_test from services.http_checks import get_url_checks, check_url @@ -609,7 +610,7 @@ async def docker_restarts(msg: Message): rows = read_raw(cfg, hours=hours, limit=5000, include_old=True) restarts = [(dt, line) for dt, line in rows if "docker_restart" in line] if not restarts: - await msg.answer(f"🐳 No docker restarts in last {hours}h", reply_markup=system_logs_audit_kb) + await msg.answer(f"🐳 No docker restarts in last {hours}h", reply_markup=docker_kb) return counts: dict[str, int] = {} for _dt, line in restarts: @@ -623,7 +624,7 @@ async def docker_restarts(msg: Message): body = "\n".join(f"{dt.astimezone().strftime('%m-%d %H:%M')} {line}" for dt, line in restarts[-50:]) await msg.answer( f"🐳 Docker restarts ({hours}h): {len(restarts)} ({top})\n```\n{body}\n```", - reply_markup=system_logs_audit_kb, + reply_markup=docker_kb, parse_mode="Markdown", )