chore: reformat code

This commit is contained in:
Rafael Taranto 2025-05-12 14:49:39 +01:00
parent 3d930aa73b
commit aedabcbdee
509 changed files with 6030 additions and 4266 deletions

View file

@ -71,4 +71,4 @@
.buttonsWrapper > * {
margin: auto 6px;
}
}

View file

@ -12,7 +12,7 @@ import {
TableRow,
TableHeader,
TableBody,
TableCell
TableCell,
} from 'src/components/table/index.js'
import { formatDate } from 'src/utils/timezones.js'
@ -91,8 +91,8 @@ const Logs = () => {
{
variables: { deviceId, limit: NUM_LOG_RESULTS },
skip: !selected,
onCompleted: () => setSaveMessage('')
}
onCompleted: () => setSaveMessage(''),
},
)
if (machineResponse?.machines?.length && !selected) {

View file

@ -13,7 +13,7 @@ import {
TableRow,
TableHeader,
TableBody,
TableCell
TableCell,
} from 'src/components/table/index.js'
import { startCase } from 'src/utils/string.js'
import { formatDate } from 'src/utils/timezones.js'
@ -73,8 +73,8 @@ const Logs = () => {
const { data, loading: dataLoading } = useQuery(GET_SERVER_DATA, {
onCompleted: () => setSaveMessage(''),
variables: {
limit: NUM_LOG_RESULTS
}
limit: NUM_LOG_RESULTS,
},
})
const { data: configResponse, loading: configLoading } = useQuery(GET_DATA)
const timezone = R.path(['config', 'locale_timezone'], configResponse)
@ -82,7 +82,7 @@ const Logs = () => {
const defaultLogLevels = [
{ code: 'error', display: 'Error' },
{ code: 'info', display: 'Info' },
{ code: 'debug', display: 'Debug' }
{ code: 'debug', display: 'Debug' },
]
const serverVersion = data?.serverVersion
const processStates = data?.uptime ?? []
@ -93,9 +93,9 @@ const Logs = () => {
R.concat(defaultLogLevels),
R.map(it => ({
code: R.path(['logLevel'])(it),
display: startCase(R.path(['logLevel'])(it))
display: startCase(R.path(['logLevel'])(it)),
})),
R.path(['serverLogs'])
R.path(['serverLogs']),
)
const handleLogLevelChange = logLevel => {
@ -166,7 +166,7 @@ const Logs = () => {
data.serverLogs
.filter(
log =>
logLevel === SHOW_ALL || log.logLevel === logLevel.code
logLevel === SHOW_ALL || log.logLevel === logLevel.code,
)
.map((log, idx) => (
<TableRow key={idx} size="sm">
@ -175,7 +175,7 @@ const Logs = () => {
formatDate(
log.timestamp,
timezone,
'yyyy-MM-dd HH:mm'
'yyyy-MM-dd HH:mm',
)}
</TableCell>
<TableCell>{log.logLevel}</TableCell>

View file

@ -17,4 +17,4 @@
.uptimeContainer {
margin: auto 0 auto 0;
}
}