mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-22 00:42:47 +08:00
🐛 fix(connection): 修复连接环境标识与生产操作保护 (#830)
## 变更说明 Closes #823 - 删除分组级环境预设,连接分组下新建查询的 Tab、侧边栏和相关视图统一读取连接自身的环境类型与颜色。 - 对未配置任何生产保护的生产连接,所有可能修改数据、结构、配置、服务或消息的入口增加 5 秒风险确认,并要求点击“我已知悉”。 - 写操作成功提示等待实际刷新完成,避免提示早于侧栏、表概览、Redis、Nacos 等界面状态更新。 - 增加环境迁移、生产风险确认、刷新竞态和相关入口测试。 ## 验证 - `npx tsc --noEmit` 通过 - `npx vite build` 通过 - 定向 Vitest:8 个测试文件,55 个测试全部通过 - `go test ./shared/i18n` 仍受上游已有的 `ru-RU` 缺少 `table_designer.tdengine.tag.value` 阻断,本次未引入该问题
This commit is contained in:
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}} ({{seconds}} s)",
|
||||
"common.destructive_confirm.countdown": "Lesen Sie den Warnhinweis sorgfältig. Sie können in {{seconds}} s bestätigen.",
|
||||
"common.destructive_confirm.ready": "Die Wartezeit ist abgelaufen. Prüfen Sie das Ziel vor der Bestätigung erneut.",
|
||||
"connection.production_risk.title": "Warnung für Produktionsumgebung",
|
||||
"connection.production_risk.message": "Diese Verbindung ist als Produktion markiert, aber kein Produktionsschutz ist eingerichtet. Ausgeführt wird: {{action}}. Ziel: {{target}}. Prüfen Sie Verbindung und Ziel vor dem Fortfahren.",
|
||||
"connection.production_risk.action.execute_sql": "SQL ausführen, das Daten oder Struktur ändern kann",
|
||||
"connection.production_risk.action.modify_data": "Daten in der Produktionsumgebung ändern",
|
||||
"connection.production_risk.action.modify_configuration": "Produktionskonfiguration ändern",
|
||||
"connection.production_risk.action.modify_service": "Produktive Dienstinstanzen ändern",
|
||||
"connection.production_risk.action.sync_data": "Daten oder Struktur in die Produktionsumgebung synchronisieren",
|
||||
"connection.production_risk.action.publish_message": "Nachricht an die Produktionsumgebung senden",
|
||||
"connection.production_risk.unknown_target": "aktuelles Ziel",
|
||||
"connection.production_risk.acknowledge": "Ich habe es verstanden",
|
||||
"connection.production_risk.cancelled": "Der Benutzer hat den Vorgang in der Produktionsumgebung abgebrochen.",
|
||||
"common.edit": "Bearbeiten",
|
||||
"common.error": "Fehler",
|
||||
"common.loading": "Wird geladen",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "Verbindungen auswählen",
|
||||
"sidebar.field.select_database": "Datenbank auswählen",
|
||||
"sidebar.field.tag_name": "Gruppenname",
|
||||
"sidebar.field.environment_type": "Voreingestellter Gruppentyp",
|
||||
"connection.modal.field.environment_type.label": "Voreingestellter Typ",
|
||||
"connection.environment.production": "Produktionsumgebung",
|
||||
"connection.environment.test": "Testumgebung",
|
||||
|
||||
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}} ({{seconds}}s)",
|
||||
"common.destructive_confirm.countdown": "Review the warning carefully. You can confirm in {{seconds}}s.",
|
||||
"common.destructive_confirm.ready": "The waiting period has ended. Check the target again before confirming.",
|
||||
"connection.production_risk.title": "Production environment warning",
|
||||
"connection.production_risk.message": "This connection is marked as production and has no production guard configured. About to perform: {{action}}. Target: {{target}}. Verify the connection and target before continuing.",
|
||||
"connection.production_risk.action.execute_sql": "Execute SQL that may change data or structure",
|
||||
"connection.production_risk.action.modify_data": "Modify data in the production environment",
|
||||
"connection.production_risk.action.modify_configuration": "Modify production configuration",
|
||||
"connection.production_risk.action.modify_service": "Modify production service instances",
|
||||
"connection.production_risk.action.sync_data": "Sync data or structure into the production environment",
|
||||
"connection.production_risk.action.publish_message": "Publish a message to the production environment",
|
||||
"connection.production_risk.unknown_target": "current target",
|
||||
"connection.production_risk.acknowledge": "I understand",
|
||||
"connection.production_risk.cancelled": "The user cancelled the production operation.",
|
||||
"common.edit": "Edit",
|
||||
"common.error": "Error",
|
||||
"common.loading": "Loading",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "Select connections",
|
||||
"sidebar.field.select_database": "Select database",
|
||||
"sidebar.field.tag_name": "Group name",
|
||||
"sidebar.field.environment_type": "Preset group type",
|
||||
"connection.modal.field.environment_type.label": "Preset type",
|
||||
"connection.environment.production": "Production environment",
|
||||
"connection.environment.test": "Test environment",
|
||||
|
||||
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}}({{seconds}} 秒)",
|
||||
"common.destructive_confirm.countdown": "警告をよく確認してください。{{seconds}} 秒後に確認できます。",
|
||||
"common.destructive_confirm.ready": "待機時間が終了しました。対象を再確認してから実行してください。",
|
||||
"connection.production_risk.title": "本番環境のリスク警告",
|
||||
"connection.production_risk.message": "この接続は本番環境として設定されていますが、本番保護が未設定です。実行内容:{{action}}。対象:{{target}}。接続先と対象を確認して続行してください。",
|
||||
"connection.production_risk.action.execute_sql": "データまたは構造を変更する可能性がある SQL を実行",
|
||||
"connection.production_risk.action.modify_data": "本番環境のデータを変更",
|
||||
"connection.production_risk.action.modify_configuration": "本番環境の設定を変更",
|
||||
"connection.production_risk.action.modify_service": "本番環境のサービスインスタンスを変更",
|
||||
"connection.production_risk.action.sync_data": "本番環境へデータまたは構造を同期",
|
||||
"connection.production_risk.action.publish_message": "本番環境へメッセージを公開",
|
||||
"connection.production_risk.unknown_target": "現在の対象",
|
||||
"connection.production_risk.acknowledge": "了承しました",
|
||||
"connection.production_risk.cancelled": "ユーザーが本番環境の操作をキャンセルしました。",
|
||||
"common.edit": "編集",
|
||||
"common.error": "エラー",
|
||||
"common.loading": "読み込み中",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "接続を選択",
|
||||
"sidebar.field.select_database": "データベースを選択",
|
||||
"sidebar.field.tag_name": "グループ名",
|
||||
"sidebar.field.environment_type": "プリセットグループタイプ",
|
||||
"connection.modal.field.environment_type.label": "プリセットタイプ",
|
||||
"connection.environment.production": "本番環境",
|
||||
"connection.environment.test": "テスト環境",
|
||||
|
||||
@@ -245,7 +245,6 @@ export const messages: Record<SupportedLanguage, Record<MessageKey, string>> = {
|
||||
"connection.environment.test": "测试环境",
|
||||
"connection.environment.development": "开发环境",
|
||||
"connection.environment.local": "本地环境",
|
||||
"sidebar.field.environment_type": "预设分组类型",
|
||||
"connection.modal.field.name.placeholder.default": "例如:本地测试库",
|
||||
"connection.modal.field.name.placeholder.jvm":
|
||||
"例如:本地 JVM / 订单服务 JVM",
|
||||
@@ -1142,7 +1141,6 @@ export const messages: Record<SupportedLanguage, Record<MessageKey, string>> = {
|
||||
"connection.environment.test": "Test environment",
|
||||
"connection.environment.development": "Development environment",
|
||||
"connection.environment.local": "Local environment",
|
||||
"sidebar.field.environment_type": "Preset group type",
|
||||
"connection.modal.field.name.placeholder.default":
|
||||
"For example: local test database",
|
||||
"connection.modal.field.name.placeholder.jvm":
|
||||
|
||||
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}} ({{seconds}} с)",
|
||||
"common.destructive_confirm.countdown": "Внимательно прочитайте предупреждение. Подтверждение станет доступно через {{seconds}} с.",
|
||||
"common.destructive_confirm.ready": "Время ожидания истекло. Перед подтверждением ещё раз проверьте объект.",
|
||||
"connection.production_risk.title": "Предупреждение для продуктивной среды",
|
||||
"connection.production_risk.message": "Это подключение отмечено как продуктивное, но защита продуктивной среды не настроена. Будет выполнено: {{action}}. Цель: {{target}}. Проверьте подключение и цель перед продолжением.",
|
||||
"connection.production_risk.action.execute_sql": "Выполнить SQL, который может изменить данные или структуру",
|
||||
"connection.production_risk.action.modify_data": "Изменить данные в продуктивной среде",
|
||||
"connection.production_risk.action.modify_configuration": "Изменить конфигурацию продуктивной среды",
|
||||
"connection.production_risk.action.modify_service": "Изменить экземпляры сервисов в продуктивной среде",
|
||||
"connection.production_risk.action.sync_data": "Синхронизировать данные или структуру в продуктивную среду",
|
||||
"connection.production_risk.action.publish_message": "Опубликовать сообщение в продуктивной среде",
|
||||
"connection.production_risk.unknown_target": "текущая цель",
|
||||
"connection.production_risk.acknowledge": "Я понимаю",
|
||||
"connection.production_risk.cancelled": "Пользователь отменил операцию в продуктивной среде.",
|
||||
"common.edit": "Изменить",
|
||||
"common.error": "Ошибка",
|
||||
"common.loading": "Загрузка",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "Выберите подключения",
|
||||
"sidebar.field.select_database": "База данных",
|
||||
"sidebar.field.tag_name": "Имя группы",
|
||||
"sidebar.field.environment_type": "Предустановленный тип группы",
|
||||
"connection.modal.field.environment_type.label": "Предустановленный тип",
|
||||
"connection.environment.production": "Производственная среда",
|
||||
"connection.environment.test": "Тестовая среда",
|
||||
|
||||
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}}({{seconds}} 秒)",
|
||||
"common.destructive_confirm.countdown": "请仔细阅读风险提示,{{seconds}} 秒后才能确认。",
|
||||
"common.destructive_confirm.ready": "等待结束,请再次确认操作对象。",
|
||||
"connection.production_risk.title": "生产环境风险提示",
|
||||
"connection.production_risk.message": "当前连接属于生产环境,且尚未设置生产环境保护。即将执行:{{action}}。目标:{{target}}。请确认连接和操作对象无误。",
|
||||
"connection.production_risk.action.execute_sql": "执行可能修改数据或结构的 SQL",
|
||||
"connection.production_risk.action.modify_data": "修改生产环境中的数据",
|
||||
"connection.production_risk.action.modify_configuration": "修改生产环境中的配置",
|
||||
"connection.production_risk.action.modify_service": "修改生产环境中的服务实例",
|
||||
"connection.production_risk.action.sync_data": "向生产环境同步数据或结构",
|
||||
"connection.production_risk.action.publish_message": "向生产环境发布消息",
|
||||
"connection.production_risk.unknown_target": "当前目标",
|
||||
"connection.production_risk.acknowledge": "我已知悉",
|
||||
"connection.production_risk.cancelled": "用户已取消生产环境操作。",
|
||||
"common.edit": "编辑",
|
||||
"common.error": "错误",
|
||||
"common.loading": "加载中",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "选择连接",
|
||||
"sidebar.field.select_database": "选择数据库",
|
||||
"sidebar.field.tag_name": "分组名称",
|
||||
"sidebar.field.environment_type": "预设分组类型",
|
||||
"connection.modal.field.environment_type.label": "预设类型",
|
||||
"connection.environment.production": "生产环境",
|
||||
"connection.environment.test": "测试环境",
|
||||
|
||||
@@ -3201,6 +3201,17 @@
|
||||
"common.destructive_confirm.action_countdown": "{{action}}({{seconds}} 秒)",
|
||||
"common.destructive_confirm.countdown": "請仔細閱讀風險提示,{{seconds}} 秒後才能確認。",
|
||||
"common.destructive_confirm.ready": "等待結束,請再次確認操作對象。",
|
||||
"connection.production_risk.title": "生產環境風險提示",
|
||||
"connection.production_risk.message": "目前連線屬於生產環境,且尚未設定生產環境保護。即將執行:{{action}}。目標:{{target}}。請確認連線與操作對象無誤。",
|
||||
"connection.production_risk.action.execute_sql": "執行可能修改資料或結構的 SQL",
|
||||
"connection.production_risk.action.modify_data": "修改生產環境中的資料",
|
||||
"connection.production_risk.action.modify_configuration": "修改生產環境中的設定",
|
||||
"connection.production_risk.action.modify_service": "修改生產環境中的服務實例",
|
||||
"connection.production_risk.action.sync_data": "向生產環境同步資料或結構",
|
||||
"connection.production_risk.action.publish_message": "向生產環境發布訊息",
|
||||
"connection.production_risk.unknown_target": "目前目標",
|
||||
"connection.production_risk.acknowledge": "我已知悉",
|
||||
"connection.production_risk.cancelled": "使用者已取消生產環境操作。",
|
||||
"common.edit": "編輯",
|
||||
"common.error": "錯誤",
|
||||
"common.loading": "載入中",
|
||||
@@ -7324,7 +7335,6 @@
|
||||
"sidebar.field.select_connections": "選擇連線",
|
||||
"sidebar.field.select_database": "選擇資料庫",
|
||||
"sidebar.field.tag_name": "分組名稱",
|
||||
"sidebar.field.environment_type": "預設分組類型",
|
||||
"connection.modal.field.environment_type.label": "預設類型",
|
||||
"connection.environment.production": "生產環境",
|
||||
"connection.environment.test": "測試環境",
|
||||
|
||||
Reference in New Issue
Block a user