feat(admin): 支持定时测试自动恢复并统一账号恢复入口

- 为定时测试计划增加 auto_recover 配置,补齐前后端类型、接口、仓储与数据库迁移
- 在定时测试成功后自动恢复账号 error、rate-limit 等可恢复运行时状态
- 新增 /admin/accounts/:id/recover-state 接口,合并原有重置状态与清限流操作
- 更新账号管理菜单与定时测试面板,补充自动恢复开关、说明提示和状态展示
- 补充账号恢复、限流清理与仓储同步相关测试
This commit is contained in:
kyx236
2026-03-08 06:59:53 +08:00
parent 03bf348530
commit 0c29468f90
22 changed files with 525 additions and 85 deletions

View File

@@ -1772,9 +1772,9 @@ export default {
remaining: 'Remaining',
matchedKeyword: 'Matched Keyword',
errorMessage: 'Error Details',
reset: 'Reset Status',
resetSuccess: 'Temp unschedulable status reset',
resetFailed: 'Failed to reset temp unschedulable status',
reset: 'Recover State',
resetSuccess: 'Account state recovered successfully',
resetFailed: 'Failed to recover account state',
failedToLoad: 'Failed to load temp unschedulable status',
notActive: 'This account is not temporarily unschedulable.',
expired: 'Expired',
@@ -1840,6 +1840,10 @@ export default {
bulkDeleteSuccess: 'Deleted {count} account(s)',
bulkDeletePartial: 'Partially deleted: {success} succeeded, {failed} failed',
bulkDeleteFailed: 'Bulk delete failed',
recoverState: 'Recover State',
recoverStateHint: 'Used to recover error, rate-limit, and temporary unschedulable runtime state.',
recoverStateSuccess: 'Account state recovered successfully',
recoverStateFailed: 'Failed to recover account state',
resetStatus: 'Reset Status',
statusReset: 'Account status reset successfully',
failedToResetStatus: 'Failed to reset account status',
@@ -2471,7 +2475,21 @@ export default {
failed: 'Failed',
running: 'Running',
schedule: 'Schedule',
cronHelp: 'Standard 5-field cron expression (e.g., */30 * * * *)'
cronHelp: 'Standard 5-field cron expression (e.g., */30 * * * *)',
cronTooltipTitle: 'Cron expression examples:',
cronTooltipMeaning: 'Defines when the test runs automatically. The 5 fields are: minute, hour, day, month, and weekday.',
cronTooltipExampleEvery30Min: '*/30 * * * *: run every 30 minutes',
cronTooltipExampleHourly: '0 * * * *: run at the start of every hour',
cronTooltipExampleDaily: '0 9 * * *: run every day at 09:00',
cronTooltipExampleWeekly: '0 9 * * 1: run every Monday at 09:00',
cronTooltipRange: 'Recommended range: use standard 5-field cron. For health checks, start with a moderate frequency such as every 30 minutes, every hour, or once a day instead of running too often.',
maxResultsTooltipTitle: 'What Max Results means:',
maxResultsTooltipMeaning: 'Sets how many historical test results are kept for a single plan so the result list does not grow without limit.',
maxResultsTooltipBody: 'Only the newest test results are kept. Once the number of saved results exceeds this value, older records are pruned automatically so the history list and storage stay under control.',
maxResultsTooltipExample: 'For example, 100 means keeping at most the latest 100 test results. When the 101st result is saved, the oldest one is removed.',
maxResultsTooltipRange: 'Recommended range: usually 20 to 200. Use 20-50 when you only care about recent health status, or 100-200 if you want a longer trend history.',
autoRecover: 'Auto Recover',
autoRecoverHelp: 'Automatically recover account from error/rate-limited state on successful test'
},
// Proxies