定时任务默认倒序,显示任务总条数,#22 #23 #173 #175

This commit is contained in:
hanhh
2021-05-24 20:27:25 +08:00
parent 4958d700de
commit 91e4905a3f
9 changed files with 69 additions and 11 deletions
+2
View File
@@ -620,6 +620,8 @@ const Crontab = () => {
hideOnSinglePage: true,
showSizeChanger: true,
defaultPageSize: 20,
showTotal: (total: number, range: number[]) =>
`${range[0]}-${range[1]} 条/总共 ${total}`,
}}
dataSource={value}
rowKey="_id"
+14 -3
View File
@@ -6,6 +6,7 @@ import {
Loading3QuartersOutlined,
CheckCircleOutlined,
} from '@ant-design/icons';
import { Controlled as CodeMirror } from 'react-codemirror2';
enum CrontabStatus {
'running',
@@ -98,9 +99,19 @@ const CronLogModal = ({
onOk={() => cancel()}
onCancel={() => cancel()}
>
<pre style={{ whiteSpace: 'pre-wrap', wordWrap: 'break-word' }}>
{!loading && value}
</pre>
{!loading && value && (
<CodeMirror
value={value}
options={{
lineWrapping: true,
readOnly: true,
}}
onBeforeChange={(editor, data, value) => {
setValue(value);
}}
onChange={(editor, data, value) => {}}
/>
)}
</Modal>
);
};