docs(audit): 14 页 API 契约审计与凭据轮询 SSOT 收尾
记录凭据轮询/pending 契约对照与生产验证,更新功能指南与附录 J,并将 pending 相关类型集中到 api.ts。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -343,7 +343,7 @@ import { http } from '@/api'
|
||||
import { useSnackbar } from '@/composables/useSnackbar'
|
||||
import { useServerPagination } from '@/composables/useServerPagination'
|
||||
import { statusChipColor, statusLabel, formatRelativeTime } from '@/utils/status'
|
||||
import type { ServerApiItem } from '@/types/api'
|
||||
import type { AddByIpResponse, PendingServerItem, PollErrorItem, ServerApiItem } from '@/types/api'
|
||||
import { normalizeServerIds, countBatchSuccess, type BatchAgentResultItem } from '@/utils/serverSelection'
|
||||
import { formatApiError } from '@/utils/apiError'
|
||||
import StatCardsRow from '@/components/StatCardsRow.vue'
|
||||
@@ -372,33 +372,6 @@ const deleting = ref(false)
|
||||
const deletingServer = ref<ServerApiItem | null>(null)
|
||||
|
||||
// ── Quick add by IP + pending failure list ──
|
||||
interface PollErrorItem {
|
||||
preset_type: string
|
||||
preset_name: string
|
||||
username: string
|
||||
error: string
|
||||
}
|
||||
|
||||
interface PendingServerItem {
|
||||
id: number
|
||||
name: string
|
||||
domain: string
|
||||
port: number
|
||||
attempts: number
|
||||
last_error: string
|
||||
last_attempt_at: string | null
|
||||
}
|
||||
|
||||
interface AddByIpResponse {
|
||||
success: boolean
|
||||
server?: ServerApiItem
|
||||
pending_id?: number
|
||||
errors?: PollErrorItem[]
|
||||
message?: string
|
||||
matched_preset?: string
|
||||
matched_username?: string
|
||||
}
|
||||
|
||||
const showQuickAdd = ref(false)
|
||||
const quickAddLoading = ref(false)
|
||||
const quickAddForm = ref({ domain: '', port: 22, name: '' })
|
||||
|
||||
Reference in New Issue
Block a user