fix: TypeScript build errors — unused imports, unknown types
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
All checks were successful
Deploy Admin Frontend / build-and-deploy (push) Successful in 8s
- Remove unused imports from AiGateway (Space, EditOutlined, etc.) - Add type annotations in Events page (batch retry, failed jobs) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
f6917d63d3
commit
8464640e5d
@ -1,7 +1,7 @@
|
||||
import { useState } from 'react'
|
||||
import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query'
|
||||
import { Card, Row, Col, Statistic, Table, Tag, Button, Typography, Tabs, Modal, Form, Input, InputNumber, Select, Switch, Space, App } from 'antd'
|
||||
import { ReloadOutlined, CloudOutlined, PlusOutlined, EditOutlined, DeleteOutlined, StopOutlined, CheckCircleOutlined } from '@ant-design/icons'
|
||||
import { Card, Row, Col, Statistic, Table, Tag, Button, Typography, Tabs, Modal, Form, Input, InputNumber, Select, Switch, App } from 'antd'
|
||||
import { ReloadOutlined, CloudOutlined, PlusOutlined, DeleteOutlined } from '@ant-design/icons'
|
||||
import { api } from '@/services/http-client'
|
||||
|
||||
const { Title, Text } = Typography
|
||||
|
||||
@ -33,7 +33,7 @@ function EventsPage() {
|
||||
|
||||
const { data: failed } = useQuery({
|
||||
queryKey: ['events', 'failed', selectedQueue],
|
||||
queryFn: () => selectedQueue ? api.get(`/admin-api/events/${selectedQueue}/failed`) : null,
|
||||
queryFn: (): Promise<any> => selectedQueue ? api.get(`/admin-api/events/${selectedQueue}/failed`) : Promise.resolve(null),
|
||||
enabled: !!selectedQueue,
|
||||
})
|
||||
|
||||
@ -44,8 +44,8 @@ function EventsPage() {
|
||||
}
|
||||
|
||||
const handleBatchRetry = async (queue: string) => {
|
||||
const res = await api.post(`/admin-api/events/${queue}/jobs/batch-retry`, { count: 50 })
|
||||
message.success(`批量重试完成: ${res.data?.retried || 0}/${res.data?.total || 0}`)
|
||||
const res: any = await api.post(`/admin-api/events/${queue}/jobs/batch-retry`, { count: 50 })
|
||||
message.success(`批量重试完成: ${res?.data?.retried || 0}/${res?.data?.total || 0}`)
|
||||
qc.invalidateQueries({ queryKey: ['events'] })
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user