feat:一键刷新与自动刷新覆盖绑定错误/使用超时/绑定超时
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Badge, Button, Card, Input, Radio, Space, Switch, Tooltip, Typography } from 'antd'
|
||||
import { ReloadOutlined, SearchOutlined, SyncOutlined } from '@ant-design/icons'
|
||||
import { ReloadOutlined, QuestionCircleOutlined, SearchOutlined, SyncOutlined } from '@ant-design/icons'
|
||||
import type { RockStats } from '../../api'
|
||||
|
||||
const { Text } = Typography
|
||||
@@ -11,12 +11,12 @@ export interface RockTokenFilterBarProps {
|
||||
totalTokens: number
|
||||
loadingTokens: boolean
|
||||
autoRefreshMismatchEnabled: boolean
|
||||
refreshingMismatch: boolean
|
||||
refreshingStale: boolean
|
||||
togglingAutoRefresh: boolean
|
||||
onSearchKeywordChange: (value: string) => void
|
||||
onFilterStatusChange: (value: string) => void
|
||||
onRefresh: () => void
|
||||
onRefreshMismatch: () => void
|
||||
onRefreshStale: () => void
|
||||
onToggleAutoRefreshMismatch: (checked: boolean) => void
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@ export function RockTokenFilterBar({
|
||||
totalTokens,
|
||||
loadingTokens,
|
||||
autoRefreshMismatchEnabled,
|
||||
refreshingMismatch,
|
||||
refreshingStale,
|
||||
togglingAutoRefresh,
|
||||
onSearchKeywordChange,
|
||||
onFilterStatusChange,
|
||||
onRefresh,
|
||||
onRefreshMismatch,
|
||||
onRefreshStale,
|
||||
onToggleAutoRefreshMismatch,
|
||||
}: RockTokenFilterBarProps) {
|
||||
return (
|
||||
@@ -109,15 +109,24 @@ export function RockTokenFilterBar({
|
||||
<Button icon={<ReloadOutlined />} onClick={onRefresh} loading={loadingTokens}>
|
||||
刷新
|
||||
</Button>
|
||||
<Tooltip title="立即刷新全部绑定错误 Token(单次最多 20 条,约 30 秒)">
|
||||
<Button
|
||||
icon={<SyncOutlined />}
|
||||
onClick={onRefreshMismatch}
|
||||
loading={refreshingMismatch}
|
||||
>
|
||||
一键刷新全部绑定错误
|
||||
<Space size={4} style={{ whiteSpace: 'nowrap' }}>
|
||||
<Button icon={<SyncOutlined />} onClick={onRefreshStale} loading={refreshingStale}>
|
||||
一键刷新
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
title={
|
||||
<div style={{ fontSize: 12, lineHeight: 1.7 }}>
|
||||
同时刷新三类异常 Token:绑定错误、使用超时、绑定超时。
|
||||
<br />
|
||||
单次最多 20 条,逐条间隔 1.5 秒,同一 Token 10 分钟内不重复刷新。
|
||||
<br />
|
||||
「启用自动刷新」每 5 分钟按同样规则自动执行。
|
||||
</div>
|
||||
}
|
||||
>
|
||||
<QuestionCircleOutlined style={{ color: '#94a3b8', fontSize: 15, cursor: 'help' }} />
|
||||
</Tooltip>
|
||||
</Space>
|
||||
<Space size={6} style={{ whiteSpace: 'nowrap' }}>
|
||||
<Switch
|
||||
size="small"
|
||||
|
||||
Reference in New Issue
Block a user