mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修复定时任务列表格式化 crontab
This commit is contained in:
@@ -51,7 +51,7 @@ import ViewManageModal from './viewManageModal';
|
||||
import { FilterValue, SorterResult } from 'antd/lib/table/interface';
|
||||
import { SharedContext } from '@/layouts';
|
||||
import useTableScrollHeight from '@/hooks/useTableScrollHeight';
|
||||
import { getCommandScript } from '@/utils';
|
||||
import { getCommandScript, parseCrontab } from '@/utils';
|
||||
import { ColumnProps } from 'antd/lib/table';
|
||||
import { VList } from 'virtuallist-antd';
|
||||
|
||||
@@ -446,10 +446,7 @@ const Crontab = () => {
|
||||
data.map((x) => {
|
||||
return {
|
||||
...x,
|
||||
nextRunTime: cron_parser
|
||||
.parseExpression(x.schedule)
|
||||
.next()
|
||||
.toDate(),
|
||||
nextRunTime: parseCrontab(x.schedule),
|
||||
};
|
||||
}),
|
||||
);
|
||||
@@ -736,10 +733,7 @@ const Crontab = () => {
|
||||
if (code === 200) {
|
||||
const index = value.findIndex((x) => x.id === cron.id);
|
||||
const result = [...value];
|
||||
data.nextRunTime = cron_parser
|
||||
.parseExpression(data.schedule)
|
||||
.next()
|
||||
.toDate();
|
||||
data.nextRunTime = parseCrontab(data.schedule);
|
||||
if (index !== -1) {
|
||||
result.splice(index, 1, {
|
||||
...cron,
|
||||
|
||||
Reference in New Issue
Block a user