修复定时任务查询不存在的订阅报错

This commit is contained in:
whyour
2024-06-17 23:04:47 +08:00
parent 035f0eb9e3
commit a45efbd69b
2 changed files with 37 additions and 12 deletions
+9 -3
View File
@@ -57,6 +57,7 @@ import { useVT } from 'virtualizedtableforantd4';
import { ICrontab, OperationName, OperationPath, CrontabStatus } from './type';
import Name from '@/components/name';
import dayjs from 'dayjs';
import { noop } from 'lodash';
const { Text, Paragraph, Link } = Typography;
const { Search } = Input;
@@ -76,7 +77,7 @@ const Crontab = () => {
wordBreak: 'break-all',
marginBottom: 0,
color: '#1890ff',
cursor: 'pointer'
cursor: 'pointer',
}}
ellipsis={{ tooltip: text, rows: 2 }}
onClick={() => {
@@ -270,9 +271,14 @@ const Crontab = () => {
record.sub_id ? (
<Name
service={() =>
request.get(`${config.apiPrefix}subscriptions/${record.sub_id}`)
request.get(`${config.apiPrefix}subscriptions/${record.sub_id}`, {
onError: noop,
})
}
options={{ ready: record?.sub_id, cacheKey: record.sub_id }}
options={{
ready: record?.sub_id,
cacheKey: record.sub_id,
}}
/>
) : (
'-'