mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-18 02:14:32 +08:00
修复定时删除日志
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
.container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 50px 130px;
|
||||
flex-wrap: wrap;
|
||||
max-width: 800px;
|
||||
margin: 20px auto;
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
+18
-10
@@ -12,6 +12,7 @@ import {
|
||||
Modal,
|
||||
message,
|
||||
Typography,
|
||||
Input,
|
||||
} from 'antd';
|
||||
import config from '@/utils/config';
|
||||
import { PageContainer } from '@ant-design/pro-layout';
|
||||
@@ -273,8 +274,10 @@ const Setting = ({
|
||||
request
|
||||
.get(`${config.apiPrefix}system/log/remove`)
|
||||
.then((data: any) => {
|
||||
setLogRemoveFrequency(data.data.frequency);
|
||||
form.setFieldsValue({ frequency: data.data.frequency });
|
||||
if (data.data.info) {
|
||||
const { frequency } = data.data.info;
|
||||
setLogRemoveFrequency(frequency);
|
||||
}
|
||||
})
|
||||
.catch((error: any) => {
|
||||
console.log(error);
|
||||
@@ -367,14 +370,19 @@ const Setting = ({
|
||||
name="frequency"
|
||||
tooltip="每x天自动删除x天以前的日志"
|
||||
>
|
||||
<InputNumber
|
||||
addonBefore="每"
|
||||
addonAfter="天"
|
||||
style={{ width: 150 }}
|
||||
min={0}
|
||||
onBlur={updateRemoveLogFrequency}
|
||||
onChange={(value) => setLogRemoveFrequency(value)}
|
||||
/>
|
||||
<Input.Group compact>
|
||||
<InputNumber
|
||||
addonBefore="每"
|
||||
addonAfter="天"
|
||||
style={{ width: 150 }}
|
||||
min={0}
|
||||
value={logRemoveFrequency}
|
||||
onChange={(value) => setLogRemoveFrequency(value)}
|
||||
/>
|
||||
<Button type="primary" onClick={updateRemoveLogFrequency}>
|
||||
确认
|
||||
</Button>
|
||||
</Input.Group>
|
||||
</Form.Item>
|
||||
<Form.Item label="检查更新" name="update">
|
||||
<CheckUpdate socketMessage={socketMessage} />
|
||||
|
||||
Reference in New Issue
Block a user