ck管理增加排序,禁用,实时状态变成手动获取

This commit is contained in:
whyour
2021-04-10 00:21:51 +08:00
parent ef24fc8354
commit fb98bc44e4
17 changed files with 621 additions and 522 deletions
+8 -2
View File
@@ -3,6 +3,12 @@ import { Modal, notification, Input, Form } from 'antd';
import { request } from '@/utils/http';
import config from '@/utils/config';
enum CrontabStatus {
'running',
'idle',
'disabled',
}
const CronLogModal = ({
cron,
handleCancel,
@@ -12,14 +18,14 @@ const CronLogModal = ({
visible: boolean;
handleCancel: () => void;
}) => {
const [value, setValue] = useState<string>('运行中...');
const [value, setValue] = useState<string>('启动中...');
const [logTimer, setLogTimer] = useState<any>();
const getCronLog = () => {
request
.get(`${config.apiPrefix}crons/${cron._id}/log`)
.then((data: any) => {
setValue(data.data);
setValue(data.data || '暂无日志');
});
};