修复重启面板提示

This commit is contained in:
whyour 2021-05-14 21:59:51 +08:00
parent d25ae98c68
commit c3a53ddda9
3 changed files with 8 additions and 4 deletions

View File

@ -268,7 +268,7 @@ update_qinglong() {
if [[ $exit_status -eq 0 ]]; then if [[ $exit_status -eq 0 ]]; then
cd $dir_root cd $dir_root
nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf nginx -s reload 2>/dev/null || nginx -c /etc/nginx/nginx.conf
echo -e "重启面板完成" echo -e "重启面板中..."
pm2 reload all >/dev/null 2>&1 pm2 reload all >/dev/null 2>&1
fi fi
} }

View File

@ -37,7 +37,11 @@ const CronLogModal = ({
const log = data.data as string; const log = data.data as string;
setValue(log || '暂无日志'); setValue(log || '暂无日志');
setExcuting(log && !log.includes('执行结束')); setExcuting(log && !log.includes('执行结束'));
if (log && !log.includes('执行结束')) { if (
log &&
!log.includes('执行结束') &&
!log.includes('重启面板完成')
) {
setTimeout(() => { setTimeout(() => {
getCronLog(); getCronLog();
}, 2000); }, 2000);
@ -65,9 +69,9 @@ const CronLogModal = ({
const titleElement = () => { const titleElement = () => {
return ( return (
<> <>
<span style={{ marginRight: 5 }}>-{cron && cron.name}</span>{' '}
{excuting && <Loading3QuartersOutlined spin />} {excuting && <Loading3QuartersOutlined spin />}
{!excuting && <CheckCircleOutlined />} {!excuting && <CheckCircleOutlined />}
<span style={{ marginRight: 5 }}>-{cron && cron.name}</span>{' '}
</> </>
); );
}; };

View File

@ -3,7 +3,7 @@ import { notification } from 'antd';
import config from './config'; import config from './config';
notification.config({ notification.config({
duration: 2.5, duration: 2,
}); });
const time = Date.now(); const time = Date.now();