sonarlint improvements

This commit is contained in:
Proddy
2024-10-02 13:32:51 +02:00
parent 1eaa16995b
commit 8e6434cf7f
28 changed files with 459 additions and 610 deletions

View File

@@ -35,7 +35,7 @@ export const apStatusHighlight = ({ status }: APStatusType, theme: Theme) => {
const APStatus = () => {
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(APApi.readAPStatus, { pollingTime: 5000 });

View File

@@ -18,7 +18,7 @@ import type { Stat } from '../main/types';
const SystemActivity = () => {
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(readActivity, { pollingTime: 2000 });

View File

@@ -33,7 +33,7 @@ const HardwareStatus = () => {
useLayoutTitle(LL.STATUS_OF(LL.HARDWARE()));
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(SystemApi.readSystemStatus, { pollingTime: 2000 });
@@ -50,6 +50,7 @@ const HardwareStatus = () => {
{data.model ? (
<Avatar sx={{ bgcolor: '#003289', color: 'white' }}>
<img
alt="BBQKees"
src={BBQKeesIcon}
style={{ width: 16, verticalAlign: 'middle' }}
/>
@@ -93,7 +94,7 @@ const HardwareStatus = () => {
' (rev.' +
data.cpu_rev +
', ' +
(data.cpu_cores == 1 ? 'single-core)' : 'dual-core)') +
(data.cpu_cores === 1 ? 'single-core)' : 'dual-core)') +
' @ ' +
data.cpu_freq_mhz +
' Mhz'

View File

@@ -55,7 +55,7 @@ export const mqttQueueHighlight = (
const MqttStatus = () => {
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(MqttApi.readMqttStatus, { pollingTime: 5000 });

View File

@@ -37,7 +37,7 @@ import { formatDateTime, formatLocalDateTime } from 'utils';
const NTPStatus = () => {
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(NTPApi.readNTPStatus, { pollingTime: 5000 });

View File

@@ -82,7 +82,7 @@ const IPs = (status: NetworkStatusType) => {
const NetworkStatus = () => {
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(NetworkApi.readNetworkStatus, { pollingTime: 5000 });

View File

@@ -60,7 +60,7 @@ const SystemStatus = () => {
});
const {
data: data,
data,
send: loadData,
error
} = useAutoRequest(readSystemStatus, {

View File

@@ -250,7 +250,7 @@ const SystemLog = () => {
}}
>
{logEntries.map((e) => (
<div style={{ font: '14px monospace', whiteSpace: 'nowrap' }}>
<div key={e.i} style={{ font: '14px monospace', whiteSpace: 'nowrap' }}>
<span>{e.t}</span>
<span>{paddedLevelLabel(e.l)}&nbsp;</span>
<span>{paddedIDLabel(e.i)} </span>