From 43e63daad30d0dd3f62e2f33711a2dfb98308112 Mon Sep 17 00:00:00 2001 From: deityhub Date: Fri, 23 Jul 2021 13:00:55 +0100 Subject: [PATCH] fix chart update for monitor log --- dashboard/src/reducers/monitor.js | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/dashboard/src/reducers/monitor.js b/dashboard/src/reducers/monitor.js index c2db95efbf..c04db3305d 100755 --- a/dashboard/src/reducers/monitor.js +++ b/dashboard/src/reducers/monitor.js @@ -843,7 +843,13 @@ export default function monitor(state = INITIAL_STATE, action) { .map(a => a._id) .includes( logData.probeId - ) || !logData.probeId + ._id || + logData.probeId + ) || + !( + logData.probeId._id || + logData.probeId + ) ? monitor.logs.map( probeLogs => { const probeId = @@ -851,9 +857,17 @@ export default function monitor(state = INITIAL_STATE, action) { if ( probeId === - logData.probeId || + (logData + .probeId + ._id || + logData.probeId) || (!probeId && - !logData.probeId) + !( + logData + .probeId + ._id || + logData.probeId + )) ) { if ( probeLogs.logs && @@ -929,6 +943,9 @@ export default function monitor(state = INITIAL_STATE, action) { ...monitor.logs, { _id: + logData + .probeId + ._id || logData.probeId || null, logs: [logData], @@ -937,6 +954,8 @@ export default function monitor(state = INITIAL_STATE, action) { : [ { _id: + logData.probeId + ._id || logData.probeId || null, logs: [logData],