feat: revamp analytics dashboards and harden database migrations

Add dashboard and overview analytics, health monitoring, provider expense tracking, and announcement updates across the gateway and frontend.

Keep schema migrations free of historical backfills while preserving automatic backfill execution. Bound migration deadlines, run schema preparation before Compose replacement, and anonymize deleted dashboard users.

Include the current documentation cleanup and regression coverage.
This commit is contained in:
elky
2026-10-01 11:48:17 +08:00
parent 60b89cc840
commit 066ea87d72
327 changed files with 31728 additions and 20645 deletions
@@ -36,6 +36,15 @@ export interface PaginationParams {
}
export interface FilterParams {
provider_id?: string
api_key_id?: string
request_id?: string
attribution_kind?: string
endpoint_kind?: string
request_type?: string
is_stream?: boolean
has_format_conversion?: boolean
slow_threshold_ms?: number
search?: string
user_id?: string
model?: string
@@ -399,6 +408,12 @@ export function useUsageData(options: UseUsageDataOptions) {
if (isAdminPage.value) {
// 管理员页面:使用管理员 API
for (const key of ['provider_id', 'api_key_id', 'request_id', 'attribution_kind', 'endpoint_kind', 'request_type'] as const) {
if (filters?.[key]) params[key] = filters[key]
}
for (const key of ['is_stream', 'has_format_conversion', 'slow_threshold_ms'] as const) {
if (filters?.[key] !== undefined) params[key] = filters[key]
}
if (filters?.user_id) {
params.user_id = filters.user_id
}