mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-27 07:34:12 +08:00
fix(overview): error when reading length (#188)
* fix(overview): error when reading length * fix(connections): update WsMsg type definition --------- Signed-off-by: nb5p <2098464+nb5p@users.noreply.github.com> Co-authored-by: nb5p <nb5p@users.noreply.github.com>
This commit is contained in:
parent
4e4f2f85c0
commit
9f227c9c2c
@ -103,7 +103,7 @@ export default () => {
|
|||||||
</TrafficWidget>
|
</TrafficWidget>
|
||||||
|
|
||||||
<TrafficWidget label={t('activeConnections')}>
|
<TrafficWidget label={t('activeConnections')}>
|
||||||
{latestConnectionMsg()?.connections.length || 0}
|
{latestConnectionMsg()?.connections?.length || 0}
|
||||||
</TrafficWidget>
|
</TrafficWidget>
|
||||||
|
|
||||||
<TrafficWidget label={t('memoryUsage')}>
|
<TrafficWidget label={t('memoryUsage')}>
|
||||||
|
@ -4,7 +4,7 @@ import { CONNECTIONS_TABLE_MAX_CLOSED_ROWS } from '~/constants'
|
|||||||
import { Connection, ConnectionRawMessage } from '~/types'
|
import { Connection, ConnectionRawMessage } from '~/types'
|
||||||
|
|
||||||
export type WsMsg = {
|
export type WsMsg = {
|
||||||
connections: ConnectionRawMessage[]
|
connections: ConnectionRawMessage[] | null
|
||||||
uploadTotal: number
|
uploadTotal: number
|
||||||
downloadTotal: number
|
downloadTotal: number
|
||||||
} | null
|
} | null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user