mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修复轮询日志和任务状态
This commit is contained in:
parent
a50e3ad401
commit
57c1bbcae4
|
@ -99,12 +99,12 @@ const Crontab = () => {
|
||||||
align: 'center' as const,
|
align: 'center' as const,
|
||||||
render: (text: string, record: any) => (
|
render: (text: string, record: any) => (
|
||||||
<>
|
<>
|
||||||
{record.status !== CrontabStatus.disabled && !record.pid && (
|
{record.status === CrontabStatus.idle && (
|
||||||
<Tag icon={<ClockCircleOutlined />} color="default">
|
<Tag icon={<ClockCircleOutlined />} color="default">
|
||||||
空闲中
|
空闲中
|
||||||
</Tag>
|
</Tag>
|
||||||
)}
|
)}
|
||||||
{record.status === CrontabStatus.running && record.pid && (
|
{record.status === CrontabStatus.running && (
|
||||||
<Tag icon={<SyncOutlined spin />} color="processing">
|
<Tag icon={<SyncOutlined spin />} color="processing">
|
||||||
运行中
|
运行中
|
||||||
</Tag>
|
</Tag>
|
||||||
|
|
|
@ -31,7 +31,7 @@ const CronLogModal = ({
|
||||||
if (localStorage.getItem('logCron') === cron._id) {
|
if (localStorage.getItem('logCron') === cron._id) {
|
||||||
const log = data.data as string;
|
const log = data.data as string;
|
||||||
setValue(log || '暂无日志');
|
setValue(log || '暂无日志');
|
||||||
if (log && !log.includes('执行结束') && visible) {
|
if (log && !log.includes('执行结束')) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getCronLog();
|
getCronLog();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user