mirror of
https://github.com/whyour/qinglong.git
synced 2025-07-27 14:46:06 +08:00
修复cron日志弹框异常
This commit is contained in:
parent
83ff4db8c4
commit
a722b59a13
|
@ -166,3 +166,5 @@ main () {
|
|||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -385,6 +385,7 @@ const Crontab = () => {
|
|||
|
||||
useEffect(() => {
|
||||
if (logCron) {
|
||||
localStorage.setItem('logCron', logCron._id);
|
||||
setIsLogModalVisible(true);
|
||||
}
|
||||
}, [logCron]);
|
||||
|
|
|
@ -28,6 +28,7 @@ const CronLogModal = ({
|
|||
request
|
||||
.get(`${config.apiPrefix}crons/${cron._id}/log`)
|
||||
.then((data: any) => {
|
||||
if (localStorage.getItem('logCron') === cron._id) {
|
||||
const log = data.data as string;
|
||||
setValue(log || '暂无日志');
|
||||
if (log && !log.includes('执行结束')) {
|
||||
|
@ -35,6 +36,7 @@ const CronLogModal = ({
|
|||
getCronLog();
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
if (isFirst) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user