Private
Public Access
1
0

Fix all frontend ESLint errors
Some checks failed
CI Pipeline / Rust Format Check (push) Successful in 3s
CI Pipeline / Clippy Lints (push) Successful in 45s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 3s
CI Pipeline / Frontend Lint & Type Check (push) Failing after 4s
CI Pipeline / Build .deb & Release (push) Has been skipped

- Add eslint-plugin-react-hooks to package.json and config
- Fix duplicate imports in HostsPage.tsx
- Remove non-null assertion in main.tsx
- Fix != to !== in HostDetailPage.tsx and MaintenanceWindowsPage.tsx
- Fix unused variable in ReportsPage.tsx
- Change console.debug to console.warn in useJobWebSocket.ts
This commit is contained in:
2026-04-27 21:20:25 +00:00
parent adb88fc296
commit 2fd3eb89b4
9 changed files with 18 additions and 14 deletions

View File

@ -111,7 +111,7 @@ export function useJobWebSocket(options: JobWsOptions = {}): JobWsState {
ws.onopen = () => {
if (!mountedRef.current) { ws.close(); return }
console.debug('[JobWS] Connected')
console.warn('[JobWS] Connected')
backoffRef.current = BACKOFF_INITIAL_MS // reset backoff on successful connect
setConnected(true)
}
@ -134,7 +134,7 @@ export function useJobWebSocket(options: JobWsOptions = {}): JobWsState {
ws.onclose = () => {
if (!mountedRef.current) return
console.debug('[JobWS] Disconnected — scheduling reconnect')
console.warn('[JobWS] Disconnected — scheduling reconnect')
setConnected(false)
wsRef.current = null
scheduleReconnect()
@ -147,7 +147,7 @@ export function useJobWebSocket(options: JobWsOptions = {}): JobWsState {
clearRetryTimer()
const delay = backoffRef.current
backoffRef.current = Math.min(delay * BACKOFF_FACTOR, BACKOFF_MAX_MS)
console.debug(`[JobWS] Reconnecting in ${delay} ms`)
console.warn(`[JobWS] Reconnecting in ${delay} ms`)
retryTimerRef.current = setTimeout(() => {
if (mountedRef.current) connect()
}, delay)