formatting

This commit is contained in:
proddy
2024-09-08 19:55:34 +02:00
parent 20a1a6f952
commit 859b218609

View File

@@ -6,8 +6,12 @@ import WarningIcon from '@mui/icons-material/Warning';
import { Box, Button, Checkbox, MenuItem, TextField, styled } from '@mui/material';
import Grid from '@mui/material/Grid2';
import * as SystemApi from 'api/system';
import { fetchLogES } from 'api/system';
import {
fetchLog,
fetchLogES,
readLogSettings,
updateLogSettings
} from 'api/system';
import { useRequest, useSSE } from 'alova/client';
import {
@@ -77,8 +81,8 @@ const SystemLog = () => {
saveData,
errorMessage
} = useRest<LogSettings>({
read: SystemApi.readLogSettings,
update: SystemApi.updateLogSettings
read: readLogSettings,
update: updateLogSettings
});
const [logEntries, setLogEntries] = useState<LogEntry[]>([]);
@@ -112,7 +116,7 @@ const SystemLog = () => {
});
// called on page load to reset pointer and fetch all log entries
useRequest(SystemApi.fetchLog());
useRequest(fetchLog());
const paddedLevelLabel = (level: LogLevel) => {
const label = levelLabel(level);
@@ -188,6 +192,7 @@ const SystemLog = () => {
<MenuItem value={9}>ALL</MenuItem>
</TextField>
</Grid>
{data.psram && (
<Grid size={2}>
<TextField
name="max_messages"
@@ -205,6 +210,7 @@ const SystemLog = () => {
<MenuItem value={100}>100</MenuItem>
</TextField>
</Grid>
)}
<Grid>
<BlockFormControlLabel
control={