feat(datasource): 完成 M03 数据源配置与熔断巡检

交付三种引擎登记、草稿/已保存连接测试、可逆启用、每源熔断与 Cron 巡检,以及控制台页面;用户确认收尾后标 DONE_LOCAL。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
unknownandCursor committed 2026-11-18 12:50:46 +08:00
1 parent f17bf19709
commit e6d37d176d
98 files changed
+9097 -91

No files matched your search

+134
View File
@@ -32,5 +32,139 @@
"failure": "Health check failed",
"successDetail": "Service available: {detail}",
"failureDetail": "Service unavailable: {detail}"
},
"nav": {
"home": "Overview",
"datasources": "Data sources",
"create": "New",
"detail": "Details"
},
"datasource": {
"list": {
"create": "New",
"loading": "Loading data sources",
"loadFailed": "Failed to load data sources",
"empty": "No data sources yet",
"emptyHint": "An administrator can create the first data source."
},
"columns": {
"name": "Name",
"engine": "Engine",
"host": "Host",
"port": "Port",
"database": "Database",
"username": "Username",
"status": "Status",
"lastTest": "Last test",
"actions": "Actions"
},
"status": {
"enabled": "Enabled",
"disabled": "Disabled",
"circuitOpen": "Circuit open"
},
"actions": {
"edit": "Edit",
"test": "Test",
"disable": "Disable",
"save": "Save",
"backToList": "Back to list",
"testDisabledWhy": "A disabled data source cannot be tested",
"testConnection": "Test connection",
"testSaved": "Test saved connection",
"enable": "Enable"
},
"denied": {
"title": "Data sources are not available",
"body": "Only administrators can open the data source pages."
},
"form": {
"connection": "Connection",
"name": "Name",
"engine": "Engine",
"description": "Purpose",
"host": "Host",
"hostPlaceholder": "For example db.example.test",
"port": "Port",
"database": "Database",
"username": "Username",
"password": "Password",
"passwordPlaceholder": "Enter a password",
"required": "Required",
"saving": "Saving",
"invalidRange": "Enter a whole number from {min} to {max}"
},
"disabledNote": "This data source is disabled, so its saved connection cannot be tested. Click Enable to restore it.",
"circuit": {
"title": "Circuit breaker",
"hint": "When the saved connection fails the threshold number of times within the window, the circuit opens. It cannot be tested during the cooldown and recovers automatically afterwards.",
"window": "Failure window (seconds)",
"threshold": "Failure threshold (times)",
"cooldown": "Cooldown (seconds)",
"openTitle": "Circuit open",
"openBody": "Repeated failures opened the circuit. The saved connection cannot be tested until {until}.",
"testBlocked": "Circuit open, cannot be tested until {until}"
},
"enabledDone": "Enabled",
"loadFailed": "Failed to load the data source",
"notFound": "Data source not found",
"test": {
"title": "Connection test",
"none": "Not tested yet",
"noneDraft": "You can test the connection with the current form values before saving.",
"draftNote": "Draft test: uses the current form values. Nothing is saved and Last test is not updated.",
"savedNote": "Test of the saved connection. The result is recorded in Last test.",
"running": "Testing",
"failedUnknown": "The test did not finish. Try again shortly."
},
"category": {
"success": {
"title": "Test succeeded",
"body": "Connected and completed the read-only probe."
},
"auth_failed": {
"title": "Authentication failed",
"body": "The server did not accept the username or password. Check the username, then enter the password again and save."
},
"timeout": {
"title": "Timed out",
"body": "No reply from the server in the allowed time. Try again later, or check the network and firewall."
},
"unreachable": {
"title": "Unreachable",
"body": "Could not connect to the host and port. Check the host, the port, and whether the network allows it."
},
"rejected": {
"title": "Rejected by the server",
"body": "The server replied but refused the request, for example because the database does not exist. This is not a password error."
}
},
"lastTest": {
"success": "Succeeded",
"auth_failed": "Authentication failed",
"timeout": "Timed out",
"unreachable": "Unreachable",
"rejected": "Rejected",
"none": "Not tested yet"
},
"refs": {
"title": "References",
"empty": "No references yet",
"loadFailed": "Failed to load references"
},
"disableConfirm": {
"title": "Disable data source",
"body": "A disabled data source cannot be tested. The record is kept. Disable \"{name}\"?",
"ok": "Disable",
"cancel": "Cancel"
},
"errors": {
"duplicate_name": "This name already exists. Choose another.",
"disabled": "The data source is disabled, so the saved connection cannot be tested",
"circuit_open": "Circuit open, the saved connection cannot be tested for now",
"secret_unavailable": "The saved password cannot be used. Enter the password again, then test."
},
"saved": "Saved",
"disabled": "Disabled"
}
}
+134
View File
@@ -32,5 +32,139 @@
"failure": "ตรวจสอบสถานะล้มเหลว",
"successDetail": "บริการพร้อมใช้งาน: {detail}",
"failureDetail": "บริการไม่พร้อมใช้งาน: {detail}"
},
"nav": {
"home": "ภาพรวม",
"datasources": "แหล่งข้อมูล",
"create": "สร้างใหม่",
"detail": "รายละเอียด"
},
"datasource": {
"list": {
"create": "สร้างใหม่",
"loading": "กำลังโหลดแหล่งข้อมูล",
"loadFailed": "โหลดแหล่งข้อมูลไม่สำเร็จ",
"empty": "ยังไม่มีแหล่งข้อมูล",
"emptyHint": "ผู้ดูแลสามารถสร้างแหล่งข้อมูลแรกได้"
},
"columns": {
"name": "ชื่อ",
"engine": "เอนจิน",
"host": "โฮสต์",
"port": "พอร์ต",
"database": "ฐานข้อมูล",
"username": "ชื่อผู้ใช้",
"status": "สถานะ",
"lastTest": "ทดสอบล่าสุด",
"actions": "การดำเนินการ"
},
"status": {
"enabled": "เปิดใช้งาน",
"disabled": "ปิดใช้งานแล้ว",
"circuitOpen": "วงจรตัดการทำงาน"
},
"actions": {
"edit": "แก้ไข",
"test": "ทดสอบ",
"disable": "ปิดใช้งาน",
"save": "บันทึก",
"backToList": "กลับไปที่รายการ",
"testDisabledWhy": "แหล่งข้อมูลที่ปิดใช้งานทดสอบไม่ได้",
"testConnection": "ทดสอบการเชื่อมต่อ",
"testSaved": "ทดสอบการเชื่อมต่อที่บันทึกไว้",
"enable": "เปิดใช้งาน"
},
"denied": {
"title": "ไม่สามารถเข้าหน้าแหล่งข้อมูลได้",
"body": "เฉพาะผู้ดูแลเท่านั้นที่เข้าหน้าแหล่งข้อมูลได้"
},
"form": {
"connection": "ข้อมูลการเชื่อมต่อ",
"name": "ชื่อ",
"engine": "เอนจิน",
"description": "วัตถุประสงค์",
"host": "โฮสต์",
"hostPlaceholder": "เช่น db.example.test",
"port": "พอร์ต",
"database": "ฐานข้อมูล",
"username": "ชื่อผู้ใช้",
"password": "รหัสผ่าน",
"passwordPlaceholder": "กรอกรหัสผ่าน",
"required": "จำเป็นต้องกรอก",
"saving": "กำลังบันทึก",
"invalidRange": "ต้องเป็นจำนวนเต็มตั้งแต่ {min} ถึง {max}"
},
"disabledNote": "แหล่งข้อมูลนี้ปิดใช้งานแล้ว จึงทดสอบการเชื่อมต่อที่บันทึกไว้ไม่ได้ กด \"เปิดใช้งาน\" เพื่อกู้คืน",
"circuit": {
"title": "การป้องกันด้วยวงจรตัด",
"hint": "เมื่อการเชื่อมต่อที่บันทึกไว้ล้มเหลวถึงเกณฑ์ภายในช่วงเวลาที่กำหนด วงจรจะตัดการทำงาน ทดสอบไม่ได้ในช่วงพัก และจะกลับมาเองเมื่อครบเวลา",
"window": "ช่วงนับความล้มเหลว (วินาที)",
"threshold": "เกณฑ์ความล้มเหลว (ครั้ง)",
"cooldown": "ระยะเวลาพัก (วินาที)",
"openTitle": "วงจรตัดการทำงานอยู่",
"openBody": "ความล้มเหลวซ้ำทำให้วงจรตัด ทดสอบการเชื่อมต่อที่บันทึกไว้ไม่ได้จนถึง {until}",
"testBlocked": "วงจรตัดอยู่ ทดสอบไม่ได้จนถึง {until}"
},
"enabledDone": "เปิดใช้งานแล้ว",
"loadFailed": "โหลดแหล่งข้อมูลไม่สำเร็จ",
"notFound": "ไม่พบแหล่งข้อมูล",
"test": {
"title": "ทดสอบการเชื่อมต่อ",
"none": "ยังไม่ได้ทดสอบ",
"noneDraft": "ทดสอบการเชื่อมต่อด้วยค่าในแบบฟอร์มปัจจุบันได้ก่อนบันทึก",
"draftNote": "ทดสอบแบบร่าง: ใช้ค่าในแบบฟอร์มปัจจุบัน ไม่มีการบันทึกและไม่อัปเดต \"ทดสอบล่าสุด\"",
"savedNote": "ทดสอบการเชื่อมต่อที่บันทึกไว้ ผลลัพธ์ถูกบันทึกใน \"ทดสอบล่าสุด\"",
"running": "กำลังทดสอบ",
"failedUnknown": "การทดสอบไม่เสร็จสมบูรณ์ โปรดลองอีกครั้ง"
},
"category": {
"success": {
"title": "ทดสอบสำเร็จ",
"body": "เชื่อมต่อและตรวจสอบแบบอ่านอย่างเดียวเสร็จแล้ว"
},
"auth_failed": {
"title": "การยืนยันตัวตนล้มเหลว",
"body": "เซิร์ฟเวอร์ไม่ยอมรับชื่อผู้ใช้หรือรหัสผ่าน ตรวจสอบชื่อผู้ใช้ แล้วกรอกรหัสผ่านใหม่และบันทึก"
},
"timeout": {
"title": "หมดเวลา",
"body": "ไม่ได้รับการตอบกลับจากเซิร์ฟเวอร์ภายในเวลาที่กำหนด ลองอีกครั้งภายหลัง หรือตรวจสอบเครือข่ายและไฟร์วอลล์"
},
"unreachable": {
"title": "เข้าถึงไม่ได้",
"body": "เชื่อมต่อกับโฮสต์และพอร์ตไม่ได้ ตรวจสอบโฮสต์ พอร์ต และการอนุญาตของเครือข่าย"
},
"rejected": {
"title": "เซิร์ฟเวอร์ปฏิเสธ",
"body": "เซิร์ฟเวอร์ตอบกลับแต่ปฏิเสธคำขอ เช่น ไม่มีฐานข้อมูลนี้ ไม่ใช่ปัญหารหัสผ่าน"
}
},
"lastTest": {
"success": "สำเร็จ",
"auth_failed": "ยืนยันตัวตนล้มเหลว",
"timeout": "หมดเวลา",
"unreachable": "เข้าถึงไม่ได้",
"rejected": "ถูกปฏิเสธ",
"none": "ยังไม่ได้ทดสอบ"
},
"refs": {
"title": "การอ้างอิง",
"empty": "ยังไม่มีการอ้างอิง",
"loadFailed": "โหลดการอ้างอิงไม่สำเร็จ"
},
"disableConfirm": {
"title": "ปิดใช้งานแหล่งข้อมูล",
"body": "แหล่งข้อมูลที่ปิดใช้งานทดสอบไม่ได้ แต่ยังเก็บบันทึกไว้ ต้องการปิดใช้งาน \"{name}\" หรือไม่",
"ok": "ปิดใช้งาน",
"cancel": "ยกเลิก"
},
"errors": {
"duplicate_name": "ชื่อนี้มีอยู่แล้ว โปรดใช้ชื่ออื่น",
"disabled": "แหล่งข้อมูลปิดใช้งานอยู่ จึงทดสอบการเชื่อมต่อที่บันทึกไว้ไม่ได้",
"circuit_open": "วงจรตัดอยู่ ทดสอบการเชื่อมต่อที่บันทึกไว้ไม่ได้ในขณะนี้",
"secret_unavailable": "ใช้รหัสผ่านที่บันทึกไว้ไม่ได้ โปรดกรอกรหัสผ่านใหม่แล้วทดสอบอีกครั้ง"
},
"saved": "บันทึกแล้ว",
"disabled": "ปิดใช้งานแล้ว"
}
}
+134
View File
@@ -33,5 +33,139 @@
"failure": "健康检查失败",
"successDetail": "服务可用:{detail}",
"failureDetail": "服务不可用:{detail}"
},
"nav": {
"home": "概览",
"datasources": "数据源",
"create": "新建",
"detail": "详情"
},
"datasource": {
"list": {
"create": "新建",
"loading": "数据源加载中",
"loadFailed": "数据源加载失败",
"empty": "还没有数据源",
"emptyHint": "管理者可以新建第一个数据源。"
},
"columns": {
"name": "名称",
"engine": "引擎",
"host": "主机",
"port": "端口",
"database": "库名",
"username": "用户名",
"status": "状态",
"lastTest": "最近测试",
"actions": "操作"
},
"status": {
"enabled": "启用",
"disabled": "已停用",
"circuitOpen": "熔断中"
},
"actions": {
"edit": "编辑",
"test": "测试",
"disable": "停用",
"save": "保存",
"backToList": "返回列表",
"testDisabledWhy": "停用后不能测试",
"testConnection": "测试连接",
"testSaved": "测试已保存连接",
"enable": "启用"
},
"denied": {
"title": "无法进入数据源",
"body": "只有管理者可以进入数据源界面。"
},
"form": {
"connection": "连接信息",
"name": "名称",
"engine": "引擎",
"description": "用途说明",
"host": "主机",
"hostPlaceholder": "例如 db.example.test",
"port": "端口",
"database": "库名",
"username": "用户名",
"password": "密码",
"passwordPlaceholder": "请输入密码",
"required": "必填",
"saving": "保存中",
"invalidRange": "须为 {min}–{max} 的整数"
},
"disabledNote": "该数据源已停用,不能测试已保存的连接。点击「启用」可恢复。",
"circuit": {
"title": "熔断保护",
"hint": "已保存连接在时间窗内连续失败达到阈值后会熔断,冷却期内不能测试,到期后自动恢复。",
"window": "统计窗口(秒)",
"threshold": "失败阈值(次)",
"cooldown": "冷却时长(秒)",
"openTitle": "已熔断",
"openBody": "连续失败触发熔断,{until} 前不能测试已保存的连接。",
"testBlocked": "熔断中,{until} 前不能测试"
},
"enabledDone": "已启用",
"loadFailed": "数据源加载失败",
"notFound": "数据源不存在",
"test": {
"title": "连接测试",
"none": "尚未测试",
"noneDraft": "可在保存前用当前表单内容测试连接。",
"draftNote": "草稿测试:使用当前表单内容,不会保存,也不会更新「最近测试」。",
"savedNote": "已保存连接的测试,结果已记录到「最近测试」。",
"running": "测试中",
"failedUnknown": "测试未完成,请稍后再试"
},
"category": {
"success": {
"title": "测试成功",
"body": "已连接并完成只读探测。"
},
"auth_failed": {
"title": "认证失败",
"body": "服务端不接受该用户名或密码。请核对用户名,并在密码框重新输入后保存。"
},
"timeout": {
"title": "超时",
"body": "在允许的时间内没有收到服务端响应。可稍后重试,或检查网络与防火墙。"
},
"unreachable": {
"title": "不可达",
"body": "无法与目标主机和端口建立连接。请核对主机、端口,以及网络是否放行。"
},
"rejected": {
"title": "服务端拒绝",
"body": "服务端已响应但拒绝了请求,例如库名不存在。这不是密码错误。"
}
},
"lastTest": {
"success": "成功",
"auth_failed": "认证失败",
"timeout": "超时",
"unreachable": "不可达",
"rejected": "服务端拒绝",
"none": "尚未测试"
},
"refs": {
"title": "引用",
"empty": "尚无引用",
"loadFailed": "引用加载失败"
},
"disableConfirm": {
"title": "停用数据源",
"body": "停用后不能测试,记录仍然保留。确定停用「{name}」吗?",
"ok": "停用",
"cancel": "取消"
},
"errors": {
"duplicate_name": "名称已存在,请换一个名称",
"disabled": "数据源已停用,不能测试已保存的连接",
"circuit_open": "熔断中,暂不能测试已保存的连接",
"secret_unavailable": "已保存的密码无法使用,请在密码框重新输入后再测试"
},
"saved": "已保存",
"disabled": "已停用"
}
}
+134
View File
@@ -32,5 +32,139 @@
"failure": "健康檢查失敗",
"successDetail": "服務可用:{detail}",
"failureDetail": "服務不可用:{detail}"
},
"nav": {
"home": "概覽",
"datasources": "資料來源",
"create": "新增",
"detail": "詳情"
},
"datasource": {
"list": {
"create": "新增",
"loading": "資料來源載入中",
"loadFailed": "資料來源載入失敗",
"empty": "還沒有資料來源",
"emptyHint": "管理者可以新增第一個資料來源。"
},
"columns": {
"name": "名稱",
"engine": "引擎",
"host": "主機",
"port": "連接埠",
"database": "資料庫名",
"username": "使用者名稱",
"status": "狀態",
"lastTest": "最近測試",
"actions": "操作"
},
"status": {
"enabled": "啟用",
"disabled": "已停用",
"circuitOpen": "熔斷中"
},
"actions": {
"edit": "編輯",
"test": "測試",
"disable": "停用",
"save": "儲存",
"backToList": "返回列表",
"testDisabledWhy": "停用後不能測試",
"testConnection": "測試連線",
"testSaved": "測試已儲存連線",
"enable": "啟用"
},
"denied": {
"title": "無法進入資料來源",
"body": "只有管理者可以進入資料來源介面。"
},
"form": {
"connection": "連線資訊",
"name": "名稱",
"engine": "引擎",
"description": "用途說明",
"host": "主機",
"hostPlaceholder": "例如 db.example.test",
"port": "連接埠",
"database": "資料庫名",
"username": "使用者名稱",
"password": "密碼",
"passwordPlaceholder": "請輸入密碼",
"required": "必填",
"saving": "儲存中",
"invalidRange": "須為 {min}–{max} 的整數"
},
"disabledNote": "該資料來源已停用,不能測試已儲存的連線。點擊「啟用」可恢復。",
"circuit": {
"title": "熔斷保護",
"hint": "已儲存連線在時間窗內連續失敗達到門檻後會熔斷,冷卻期內不能測試,到期後自動恢復。",
"window": "統計視窗(秒)",
"threshold": "失敗門檻(次)",
"cooldown": "冷卻時長(秒)",
"openTitle": "已熔斷",
"openBody": "連續失敗觸發熔斷,{until} 前不能測試已儲存的連線。",
"testBlocked": "熔斷中,{until} 前不能測試"
},
"enabledDone": "已啟用",
"loadFailed": "資料來源載入失敗",
"notFound": "資料來源不存在",
"test": {
"title": "連線測試",
"none": "尚未測試",
"noneDraft": "可在儲存前用目前表單內容測試連線。",
"draftNote": "草稿測試:使用目前表單內容,不會儲存,也不會更新「最近測試」。",
"savedNote": "已儲存連線的測試,結果已記錄到「最近測試」。",
"running": "測試中",
"failedUnknown": "測試未完成,請稍後再試"
},
"category": {
"success": {
"title": "測試成功",
"body": "已連線並完成唯讀探測。"
},
"auth_failed": {
"title": "認證失敗",
"body": "服務端不接受該使用者名稱或密碼。請核對使用者名稱,並在密碼框重新輸入後儲存。"
},
"timeout": {
"title": "逾時",
"body": "在允許的時間內沒有收到服務端回應。可稍後重試,或檢查網路與防火牆。"
},
"unreachable": {
"title": "無法連線",
"body": "無法與目標主機和連接埠建立連線。請核對主機、連接埠,以及網路是否放行。"
},
"rejected": {
"title": "服務端拒絕",
"body": "服務端已回應但拒絕了請求,例如資料庫名不存在。這不是密碼錯誤。"
}
},
"lastTest": {
"success": "成功",
"auth_failed": "認證失敗",
"timeout": "逾時",
"unreachable": "無法連線",
"rejected": "服務端拒絕",
"none": "尚未測試"
},
"refs": {
"title": "引用",
"empty": "尚無引用",
"loadFailed": "引用載入失敗"
},
"disableConfirm": {
"title": "停用資料來源",
"body": "停用後不能測試,記錄仍然保留。確定停用「{name}」嗎?",
"ok": "停用",
"cancel": "取消"
},
"errors": {
"duplicate_name": "名稱已存在,請換一個名稱",
"disabled": "資料來源已停用,不能測試已儲存的連線",
"circuit_open": "熔斷中,暫不能測試已儲存的連線",
"secret_unavailable": "已儲存的密碼無法使用,請在密碼框重新輸入後再測試"
},
"saved": "已儲存",
"disabled": "已停用"
}
}