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
|
@ -165,4 +165,6 @@ main () {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
main "$@"
|
main "$@"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -385,6 +385,7 @@ const Crontab = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (logCron) {
|
if (logCron) {
|
||||||
|
localStorage.setItem('logCron', logCron._id);
|
||||||
setIsLogModalVisible(true);
|
setIsLogModalVisible(true);
|
||||||
}
|
}
|
||||||
}, [logCron]);
|
}, [logCron]);
|
||||||
|
|
|
@ -28,12 +28,14 @@ const CronLogModal = ({
|
||||||
request
|
request
|
||||||
.get(`${config.apiPrefix}crons/${cron._id}/log`)
|
.get(`${config.apiPrefix}crons/${cron._id}/log`)
|
||||||
.then((data: any) => {
|
.then((data: any) => {
|
||||||
const log = data.data as string;
|
if (localStorage.getItem('logCron') === cron._id) {
|
||||||
setValue(log || '暂无日志');
|
const log = data.data as string;
|
||||||
if (log && !log.includes('执行结束')) {
|
setValue(log || '暂无日志');
|
||||||
setTimeout(() => {
|
if (log && !log.includes('执行结束')) {
|
||||||
getCronLog();
|
setTimeout(() => {
|
||||||
}, 2000);
|
getCronLog();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user