feat: multi-type server support — SQL, Redis, Grafana, Prometheus, Telnet, WinRM, RDP/VNC
Full implementation of multi-type server management across GUI and CLI: New clients: SQLClient (MariaDB/MSSQL/PostgreSQL), RedisClient, GrafanaClient, PrometheusClient, TelnetSession, WinRMClient, RemoteDesktopLauncher. New GUI tabs: QueryTab (SQL editor + Treeview), RedisTab (console + history), GrafanaTab (dashboards + alerts), PrometheusTab (PromQL + targets), PowershellTab (PS/CMD), LaunchTab (RDP/VNC external client). Infrastructure: TAB_REGISTRY for conditional tabs per server type, adaptive server_dialog fields, colored type badges in sidebar, status checker for all types (SSH/TCP/SQL/Redis/HTTP), 100+ i18n keys. CLI: ssh.py extended with --sql, --redis, --grafana-*, --prom-*, --ps, --cmd. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
321
core/i18n.py
321
core/i18n.py
@@ -233,6 +233,12 @@ _EN = {
|
||||
"totp_secret_dialog": "TOTP Secret",
|
||||
"placeholder_totp_secret": "Base32 secret (optional)",
|
||||
"port_out_of_range": "Port must be 1-65535",
|
||||
"database": "Database",
|
||||
"db_index": "DB Index",
|
||||
"api_token": "API Token",
|
||||
"placeholder_api_token": "Bearer token or API key",
|
||||
"use_ssl": "Use SSL / HTTPS",
|
||||
"db_index_must_be_number": "DB index must be a number",
|
||||
|
||||
# Monitoring
|
||||
"monitoring": "Monitoring",
|
||||
@@ -289,6 +295,107 @@ _EN = {
|
||||
"recursive_delete_confirm": "Delete folder '{name}' and all contents?",
|
||||
"drive": "Drive",
|
||||
"active_sessions": "Active: {count}",
|
||||
|
||||
# Tab names (new server types)
|
||||
"query": "Query",
|
||||
"console": "Console",
|
||||
"dashboards": "Dashboards",
|
||||
"alerts": "Alerts",
|
||||
"metrics": "Metrics",
|
||||
"targets": "Targets",
|
||||
"powershell": "PowerShell",
|
||||
"launch": "Connect",
|
||||
|
||||
# Server dialog fields (new types)
|
||||
"database": "Database",
|
||||
"placeholder_database": "mydb",
|
||||
"db_index": "DB Index (0-15)",
|
||||
"placeholder_db_index": "0",
|
||||
"api_token": "API Token",
|
||||
"placeholder_api_token": "Token...",
|
||||
"use_ssl": "Use SSL/TLS",
|
||||
|
||||
# Query tab
|
||||
"query_execute": "Execute (F5)",
|
||||
"query_clear": "Clear",
|
||||
"query_export_csv": "Export CSV",
|
||||
"query_database": "Database:",
|
||||
"query_editor_placeholder": "Enter SQL query...",
|
||||
"query_status_rows": "{rows} rows | {elapsed}s",
|
||||
"query_error": "Error: {error}",
|
||||
"query_no_results": "Query executed, no results",
|
||||
"query_connected": "Connected to {alias} ({db})",
|
||||
"query_connecting": "Connecting...",
|
||||
"query_disconnected": "Not connected",
|
||||
"query_exported": "Exported to {path}",
|
||||
|
||||
# Redis tab
|
||||
"redis_execute": "Execute",
|
||||
"redis_db": "DB:",
|
||||
"redis_keys_count": "Keys: {count}",
|
||||
"redis_memory": "Mem: {mem}",
|
||||
"redis_prompt": "redis>",
|
||||
"redis_connected": "Connected to {alias}",
|
||||
"redis_connecting": "Connecting...",
|
||||
"redis_disconnected": "Not connected",
|
||||
"redis_error": "Error: {error}",
|
||||
|
||||
# Grafana tab
|
||||
"grafana_dashboards": "Dashboards",
|
||||
"grafana_alerts": "Alerts",
|
||||
"grafana_uid": "UID",
|
||||
"grafana_title": "Title",
|
||||
"grafana_folder": "Folder",
|
||||
"grafana_state": "State",
|
||||
"grafana_name": "Name",
|
||||
"grafana_severity": "Severity",
|
||||
"grafana_connected": "Connected to {alias}",
|
||||
"grafana_no_dashboards": "No dashboards found",
|
||||
"grafana_no_alerts": "No alerts",
|
||||
|
||||
# Prometheus tab
|
||||
"prom_query": "PromQL Query",
|
||||
"prom_execute": "Execute",
|
||||
"prom_targets": "Targets",
|
||||
"prom_alerts": "Alerts",
|
||||
"prom_job": "Job",
|
||||
"prom_instance": "Instance",
|
||||
"prom_health": "Health",
|
||||
"prom_last_scrape": "Last Scrape",
|
||||
"prom_connected": "Connected to {alias}",
|
||||
"prom_no_targets": "No targets",
|
||||
"prom_no_alerts": "No alerts",
|
||||
"prom_placeholder": "up",
|
||||
|
||||
# PowerShell tab
|
||||
"ps_execute": "Execute",
|
||||
"ps_mode_ps": "PowerShell",
|
||||
"ps_mode_cmd": "CMD",
|
||||
"ps_placeholder_ps": "Get-Process...",
|
||||
"ps_placeholder_cmd": "dir...",
|
||||
"ps_history_empty": "No command history",
|
||||
"ps_disconnected": "Not connected",
|
||||
"ps_connecting": "Connecting...",
|
||||
"ps_connected": "Connected to {alias}",
|
||||
"ps_connect_failed": "Connection failed: {error}",
|
||||
"ps_not_connected": "Not connected to server",
|
||||
"ps_running": "Running...",
|
||||
"ps_done": "Done",
|
||||
"ps_exec_error": "Error: {error}",
|
||||
|
||||
# Launch tab
|
||||
"launch_connect": "Connect",
|
||||
"launch_rdp_info": "Remote Desktop (RDP) to {alias}",
|
||||
"launch_vnc_info": "VNC connection to {alias}",
|
||||
"launch_started": "Client launched",
|
||||
"launch_starting": "Launching...",
|
||||
"launch_error": "Launch failed: {error}",
|
||||
"launch_no_server": "Select a server to connect",
|
||||
|
||||
# Info tab type-specific
|
||||
"info_database": "Database:",
|
||||
"info_ssl": "SSL:",
|
||||
"info_db_index": "DB Index:",
|
||||
}
|
||||
|
||||
_RU = {
|
||||
@@ -499,6 +606,12 @@ _RU = {
|
||||
"totp_secret_dialog": "TOTP-секрет",
|
||||
"placeholder_totp_secret": "Base32 секрет (необязательно)",
|
||||
"port_out_of_range": "Порт должен быть от 1 до 65535",
|
||||
"database": "База данных",
|
||||
"db_index": "Индекс БД",
|
||||
"api_token": "API-токен",
|
||||
"placeholder_api_token": "Bearer-токен или API-ключ",
|
||||
"use_ssl": "Использовать SSL / HTTPS",
|
||||
"db_index_must_be_number": "Индекс БД должен быть числом",
|
||||
|
||||
# Monitoring
|
||||
"monitoring": "Мониторинг",
|
||||
@@ -555,6 +668,107 @@ _RU = {
|
||||
"recursive_delete_confirm": "Удалить папку '{name}' со всем содержимым?",
|
||||
"drive": "Диск",
|
||||
"active_sessions": "Активных: {count}",
|
||||
|
||||
# Tab names (new server types)
|
||||
"query": "Запросы",
|
||||
"console": "Консоль",
|
||||
"dashboards": "Дашборды",
|
||||
"alerts": "Оповещения",
|
||||
"metrics": "Метрики",
|
||||
"targets": "Цели",
|
||||
"powershell": "PowerShell",
|
||||
"launch": "Подключение",
|
||||
|
||||
# Server dialog fields (new types)
|
||||
"database": "База данных",
|
||||
"placeholder_database": "mydb",
|
||||
"db_index": "Индекс БД (0-15)",
|
||||
"placeholder_db_index": "0",
|
||||
"api_token": "API-токен",
|
||||
"placeholder_api_token": "Токен...",
|
||||
"use_ssl": "Использовать SSL/TLS",
|
||||
|
||||
# Query tab
|
||||
"query_execute": "Выполнить (F5)",
|
||||
"query_clear": "Очистить",
|
||||
"query_export_csv": "Экспорт CSV",
|
||||
"query_database": "База данных:",
|
||||
"query_editor_placeholder": "Введите SQL запрос...",
|
||||
"query_status_rows": "{rows} строк | {elapsed}с",
|
||||
"query_error": "Ошибка: {error}",
|
||||
"query_no_results": "Запрос выполнен, нет результатов",
|
||||
"query_connected": "Подключено к {alias} ({db})",
|
||||
"query_connecting": "Подключение...",
|
||||
"query_disconnected": "Не подключено",
|
||||
"query_exported": "Экспортировано в {path}",
|
||||
|
||||
# Redis tab
|
||||
"redis_execute": "Выполнить",
|
||||
"redis_db": "БД:",
|
||||
"redis_keys_count": "Ключей: {count}",
|
||||
"redis_memory": "Память: {mem}",
|
||||
"redis_prompt": "redis>",
|
||||
"redis_connected": "Подключено к {alias}",
|
||||
"redis_connecting": "Подключение...",
|
||||
"redis_disconnected": "Не подключено",
|
||||
"redis_error": "Ошибка: {error}",
|
||||
|
||||
# Grafana tab
|
||||
"grafana_dashboards": "Дашборды",
|
||||
"grafana_alerts": "Оповещения",
|
||||
"grafana_uid": "UID",
|
||||
"grafana_title": "Название",
|
||||
"grafana_folder": "Папка",
|
||||
"grafana_state": "Состояние",
|
||||
"grafana_name": "Имя",
|
||||
"grafana_severity": "Серьёзность",
|
||||
"grafana_connected": "Подключено к {alias}",
|
||||
"grafana_no_dashboards": "Дашборды не найдены",
|
||||
"grafana_no_alerts": "Нет оповещений",
|
||||
|
||||
# Prometheus tab
|
||||
"prom_query": "PromQL запрос",
|
||||
"prom_execute": "Выполнить",
|
||||
"prom_targets": "Цели",
|
||||
"prom_alerts": "Оповещения",
|
||||
"prom_job": "Job",
|
||||
"prom_instance": "Инстанс",
|
||||
"prom_health": "Здоровье",
|
||||
"prom_last_scrape": "Последний опрос",
|
||||
"prom_connected": "Подключено к {alias}",
|
||||
"prom_no_targets": "Нет целей",
|
||||
"prom_no_alerts": "Нет оповещений",
|
||||
"prom_placeholder": "up",
|
||||
|
||||
# PowerShell tab
|
||||
"ps_execute": "Выполнить",
|
||||
"ps_mode_ps": "PowerShell",
|
||||
"ps_mode_cmd": "CMD",
|
||||
"ps_placeholder_ps": "Get-Process...",
|
||||
"ps_placeholder_cmd": "dir...",
|
||||
"ps_history_empty": "Нет истории команд",
|
||||
"ps_disconnected": "Не подключено",
|
||||
"ps_connecting": "Подключение...",
|
||||
"ps_connected": "Подключено к {alias}",
|
||||
"ps_connect_failed": "Ошибка подключения: {error}",
|
||||
"ps_not_connected": "Нет подключения к серверу",
|
||||
"ps_running": "Выполнение...",
|
||||
"ps_done": "Готово",
|
||||
"ps_exec_error": "Ошибка: {error}",
|
||||
|
||||
# Launch tab
|
||||
"launch_connect": "Подключиться",
|
||||
"launch_rdp_info": "Удалённый рабочий стол (RDP) к {alias}",
|
||||
"launch_vnc_info": "VNC-подключение к {alias}",
|
||||
"launch_started": "Клиент запущен",
|
||||
"launch_starting": "Запуск...",
|
||||
"launch_error": "Ошибка запуска: {error}",
|
||||
"launch_no_server": "Выберите сервер для подключения",
|
||||
|
||||
# Info tab type-specific
|
||||
"info_database": "База данных:",
|
||||
"info_ssl": "SSL:",
|
||||
"info_db_index": "Индекс БД:",
|
||||
}
|
||||
|
||||
_ZH = {
|
||||
@@ -765,6 +979,12 @@ _ZH = {
|
||||
"totp_secret_dialog": "TOTP密钥",
|
||||
"placeholder_totp_secret": "Base32密钥(可选)",
|
||||
"port_out_of_range": "端口必须在1-65535之间",
|
||||
"database": "数据库",
|
||||
"db_index": "数据库索引",
|
||||
"api_token": "API令牌",
|
||||
"placeholder_api_token": "Bearer令牌或API密钥",
|
||||
"use_ssl": "使用 SSL / HTTPS",
|
||||
"db_index_must_be_number": "数据库索引必须是数字",
|
||||
|
||||
# Monitoring
|
||||
"monitoring": "监控",
|
||||
@@ -821,6 +1041,107 @@ _ZH = {
|
||||
"recursive_delete_confirm": "删除文件夹 '{name}' 及所有内容?",
|
||||
"drive": "驱动器",
|
||||
"active_sessions": "活跃: {count}",
|
||||
|
||||
# Tab names (new server types)
|
||||
"query": "查询",
|
||||
"console": "控制台",
|
||||
"dashboards": "仪表盘",
|
||||
"alerts": "告警",
|
||||
"metrics": "指标",
|
||||
"targets": "目标",
|
||||
"powershell": "PowerShell",
|
||||
"launch": "连接",
|
||||
|
||||
# Server dialog fields (new types)
|
||||
"database": "数据库",
|
||||
"placeholder_database": "mydb",
|
||||
"db_index": "数据库索引 (0-15)",
|
||||
"placeholder_db_index": "0",
|
||||
"api_token": "API令牌",
|
||||
"placeholder_api_token": "令牌...",
|
||||
"use_ssl": "使用SSL/TLS",
|
||||
|
||||
# Query tab
|
||||
"query_execute": "执行 (F5)",
|
||||
"query_clear": "清除",
|
||||
"query_export_csv": "导出CSV",
|
||||
"query_database": "数据库:",
|
||||
"query_editor_placeholder": "输入SQL查询...",
|
||||
"query_status_rows": "{rows} 行 | {elapsed}秒",
|
||||
"query_error": "错误: {error}",
|
||||
"query_no_results": "查询已执行,无结果",
|
||||
"query_connected": "已连接到 {alias} ({db})",
|
||||
"query_connecting": "连接中...",
|
||||
"query_disconnected": "未连接",
|
||||
"query_exported": "已导出到 {path}",
|
||||
|
||||
# Redis tab
|
||||
"redis_execute": "执行",
|
||||
"redis_db": "数据库:",
|
||||
"redis_keys_count": "键数: {count}",
|
||||
"redis_memory": "内存: {mem}",
|
||||
"redis_prompt": "redis>",
|
||||
"redis_connected": "已连接到 {alias}",
|
||||
"redis_connecting": "连接中...",
|
||||
"redis_disconnected": "未连接",
|
||||
"redis_error": "错误: {error}",
|
||||
|
||||
# Grafana tab
|
||||
"grafana_dashboards": "仪表盘",
|
||||
"grafana_alerts": "告警",
|
||||
"grafana_uid": "UID",
|
||||
"grafana_title": "标题",
|
||||
"grafana_folder": "文件夹",
|
||||
"grafana_state": "状态",
|
||||
"grafana_name": "名称",
|
||||
"grafana_severity": "严重程度",
|
||||
"grafana_connected": "已连接到 {alias}",
|
||||
"grafana_no_dashboards": "未找到仪表盘",
|
||||
"grafana_no_alerts": "无告警",
|
||||
|
||||
# Prometheus tab
|
||||
"prom_query": "PromQL查询",
|
||||
"prom_execute": "执行",
|
||||
"prom_targets": "目标",
|
||||
"prom_alerts": "告警",
|
||||
"prom_job": "任务",
|
||||
"prom_instance": "实例",
|
||||
"prom_health": "健康",
|
||||
"prom_last_scrape": "最后抓取",
|
||||
"prom_connected": "已连接到 {alias}",
|
||||
"prom_no_targets": "无目标",
|
||||
"prom_no_alerts": "无告警",
|
||||
"prom_placeholder": "up",
|
||||
|
||||
# PowerShell tab
|
||||
"ps_execute": "执行",
|
||||
"ps_mode_ps": "PowerShell",
|
||||
"ps_mode_cmd": "CMD",
|
||||
"ps_placeholder_ps": "Get-Process...",
|
||||
"ps_placeholder_cmd": "dir...",
|
||||
"ps_history_empty": "无命令历史",
|
||||
"ps_disconnected": "未连接",
|
||||
"ps_connecting": "连接中...",
|
||||
"ps_connected": "已连接到 {alias}",
|
||||
"ps_connect_failed": "连接失败: {error}",
|
||||
"ps_not_connected": "未连接到服务器",
|
||||
"ps_running": "执行中...",
|
||||
"ps_done": "完成",
|
||||
"ps_exec_error": "错误: {error}",
|
||||
|
||||
# Launch tab
|
||||
"launch_connect": "连接",
|
||||
"launch_rdp_info": "远程桌面 (RDP) 到 {alias}",
|
||||
"launch_vnc_info": "VNC连接到 {alias}",
|
||||
"launch_started": "客户端已启动",
|
||||
"launch_starting": "启动中...",
|
||||
"launch_error": "启动失败: {error}",
|
||||
"launch_no_server": "选择服务器以连接",
|
||||
|
||||
# Info tab type-specific
|
||||
"info_database": "数据库:",
|
||||
"info_ssl": "SSL:",
|
||||
"info_db_index": "数据库索引:",
|
||||
}
|
||||
|
||||
_TRANSLATIONS = {
|
||||
|
||||
Reference in New Issue
Block a user