mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修复定时任务页面样式
This commit is contained in:
+29
-35
@@ -69,7 +69,7 @@ const Crontab = () => {
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
fixed: 'left',
|
||||
width: 120,
|
||||
width: 140,
|
||||
render: (text: string, record: any) => (
|
||||
<>
|
||||
<a
|
||||
@@ -124,7 +124,7 @@ const Crontab = () => {
|
||||
title: intl.get('命令/脚本'),
|
||||
dataIndex: 'command',
|
||||
key: 'command',
|
||||
width: 200,
|
||||
width: 220,
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<Paragraph
|
||||
@@ -214,7 +214,7 @@ const Crontab = () => {
|
||||
},
|
||||
{
|
||||
title: intl.get('最后运行时长'),
|
||||
width: 180,
|
||||
width: 167,
|
||||
dataIndex: 'last_running_time',
|
||||
key: 'last_running_time',
|
||||
sorter: {
|
||||
@@ -232,7 +232,7 @@ const Crontab = () => {
|
||||
title: intl.get('最后运行时间'),
|
||||
dataIndex: 'last_execution_time',
|
||||
key: 'last_execution_time',
|
||||
width: 150,
|
||||
width: 141,
|
||||
sorter: {
|
||||
compare: (a, b) => {
|
||||
return (a.last_execution_time || 0) - (b.last_execution_time || 0);
|
||||
@@ -259,7 +259,7 @@ const Crontab = () => {
|
||||
},
|
||||
{
|
||||
title: intl.get('下次运行时间'),
|
||||
width: 150,
|
||||
width: 144,
|
||||
sorter: {
|
||||
compare: (a: any, b: any) => {
|
||||
return a.nextRunTime - b.nextRunTime;
|
||||
@@ -276,7 +276,7 @@ const Crontab = () => {
|
||||
},
|
||||
{
|
||||
title: intl.get('关联订阅'),
|
||||
width: 190,
|
||||
width: 185,
|
||||
render: (text, record: any) =>
|
||||
record.sub_id ? (
|
||||
<Name
|
||||
@@ -292,46 +292,40 @@ const Crontab = () => {
|
||||
{
|
||||
title: intl.get('操作'),
|
||||
key: 'action',
|
||||
width: 130,
|
||||
width: 140,
|
||||
fixed: isPhone ? undefined : 'right',
|
||||
render: (text, record, index) => {
|
||||
const isPc = !isPhone;
|
||||
return (
|
||||
<Space size="middle">
|
||||
{record.status === CrontabStatus.idle && (
|
||||
<Tooltip title={isPc ? intl.get('运行') : ''}>
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
runCron(record, index);
|
||||
}}
|
||||
>
|
||||
<PlayCircleOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
{record.status !== CrontabStatus.idle && (
|
||||
<Tooltip title={isPc ? intl.get('停止') : ''}>
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
stopCron(record, index);
|
||||
}}
|
||||
>
|
||||
<PauseCircleOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title={isPc ? intl.get('日志') : ''}>
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
setLogCron({ ...record, timestamp: Date.now() });
|
||||
runCron(record, index);
|
||||
}}
|
||||
>
|
||||
<FileTextOutlined />
|
||||
{intl.get('运行')}
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
{record.status !== CrontabStatus.idle && (
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
stopCron(record, index);
|
||||
}}
|
||||
>
|
||||
{intl.get('停止')}
|
||||
</a>
|
||||
)}
|
||||
<a
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
setLogCron({ ...record, timestamp: Date.now() });
|
||||
}}
|
||||
>
|
||||
{intl.get('日志')}
|
||||
</a>
|
||||
<MoreBtn key="more" record={record} index={index} />
|
||||
</Space>
|
||||
);
|
||||
@@ -1041,7 +1035,7 @@ const Crontab = () => {
|
||||
dataSource={value}
|
||||
rowKey="id"
|
||||
size="middle"
|
||||
scroll={{ x: 1000, y: tableScrollHeight }}
|
||||
scroll={{ x: 1200, y: tableScrollHeight }}
|
||||
loading={loading}
|
||||
rowSelection={rowSelection}
|
||||
rowClassName={getRowClassName}
|
||||
|
||||
Reference in New Issue
Block a user