mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-22 22:36:06 +08:00
定时任务,环境变量添加状态筛选
This commit is contained in:
parent
18215b8336
commit
c09b22358b
|
@ -114,6 +114,31 @@ const Crontab = ({ headerStyle, isPhone }: any) => {
|
|||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
width: 60,
|
||||
filters: [
|
||||
{
|
||||
text: '运行中',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: '空闲中',
|
||||
value: 1,
|
||||
},
|
||||
{
|
||||
text: '已禁用',
|
||||
value: 2,
|
||||
},
|
||||
{
|
||||
text: '队列中',
|
||||
value: 3,
|
||||
},
|
||||
],
|
||||
onFilter: (value: number, record: any) => {
|
||||
if (record.isDisabled && record.status !== 0) {
|
||||
return value === 2;
|
||||
} else {
|
||||
return record.status === value;
|
||||
}
|
||||
},
|
||||
render: (text: string, record: any) => (
|
||||
<>
|
||||
{(!record.isDisabled || record.status !== CrontabStatus.idle) && (
|
||||
|
|
11
src/pages/env/index.tsx
vendored
11
src/pages/env/index.tsx
vendored
|
@ -150,6 +150,17 @@ const Env = ({ headerStyle, isPhone, theme }: any) => {
|
|||
dataIndex: 'status',
|
||||
align: 'center' as const,
|
||||
width: 60,
|
||||
filters: [
|
||||
{
|
||||
text: '已启用',
|
||||
value: 0,
|
||||
},
|
||||
{
|
||||
text: '已禁用',
|
||||
value: 1,
|
||||
},
|
||||
],
|
||||
onFilter: (value: number, record: any) => record.status === value,
|
||||
render: (text: string, record: any, index: number) => {
|
||||
return (
|
||||
<Space size="middle" style={{ cursor: 'text' }}>
|
||||
|
|
Loading…
Reference in New Issue
Block a user