from aiogram.types import ( ReplyKeyboardMarkup, KeyboardButton, InlineKeyboardMarkup, InlineKeyboardButton, ) from state import DOCKER_MAP menu_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="🩺 Health"), KeyboardButton(text="📊 Статус")], [KeyboardButton(text="🐳 Docker"), KeyboardButton(text="📦 Backup")], [KeyboardButton(text="🧉 Artifacts"), KeyboardButton(text="⚙️ System")], [KeyboardButton(text="ℹ️ Help")], ], resize_keyboard=True, ) docker_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="🐳 Status"), KeyboardButton(text="🧰 Arcane")], [KeyboardButton(text="🔄 Restart"), KeyboardButton(text="📜 Logs")], [KeyboardButton(text="⬅️ Назад")], ], resize_keyboard=True, ) arcane_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="🔄 Refresh")], [KeyboardButton(text="⬅️ Назад")], ], resize_keyboard=True, ) backup_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="📦 Status"), KeyboardButton(text="📦 Last snapshot")], [KeyboardButton(text="📊 Repo stats"), KeyboardButton(text="🧯 Restore help")], [KeyboardButton(text="▶️ Run backup"), KeyboardButton(text="🧾 Queue")], [KeyboardButton(text="🧪 Restic check"), KeyboardButton(text="📬 Weekly report"), KeyboardButton(text="⬅️ Назад")], ], resize_keyboard=True, ) artifacts_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="🧉 Status"), KeyboardButton(text="🧉 Last artifact")], [KeyboardButton(text="📤 Upload")], [KeyboardButton(text="⬅️ Назад")], ], resize_keyboard=True, ) system_kb = ReplyKeyboardMarkup( keyboard=[ [KeyboardButton(text="💽 Disks"), KeyboardButton(text="🔐 Security"), KeyboardButton(text="🧾 Audit")], [KeyboardButton(text="🌐 URLs"), KeyboardButton(text="📈 Metrics"), KeyboardButton(text="🔒 SSL")], [KeyboardButton(text="📦 Updates"), KeyboardButton(text="⬆️ Upgrade"), KeyboardButton(text="📣 Incidents")], [KeyboardButton(text="🧱 Hardware"), KeyboardButton(text="🔄 Reboot"), KeyboardButton(text="⬅️ Назад")], ], resize_keyboard=True, ) def docker_inline_kb(action: str) -> InlineKeyboardMarkup: rows = [] for alias in DOCKER_MAP.keys(): rows.append([ InlineKeyboardButton( text=alias, callback_data=f"docker:{action}:{alias}" ) ]) return InlineKeyboardMarkup(inline_keyboard=rows)