From 030aa7cbbed9a8784583c69fb5ce259e1d8e70f6 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Mon, 8 Mar 2021 10:27:48 +0100 Subject: [PATCH] fix saving of raw status update and optional statistics --- src/ic/ic-store.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/ic/ic-store.js b/src/ic/ic-store.js index b852b94..d892c7d 100644 --- a/src/ic/ic-store.js +++ b/src/ic/ic-store.js @@ -117,12 +117,7 @@ class InfrastructureComponentStore extends ArrayStore { if(!tempIC.managedexternally){ tempIC.state = action.data.state; tempIC.uptime = action.data.time_now - action.data.time_started; - if (tempIC.statusupdateraw === null || tempIC.statusupdateraw === undefined){ - tempIC.statusupdateraw = {}; - tempIC.statusupdateraw["status"] = action.data; - } else { - tempIC.statusupdateraw["status"] = action.data; - } + tempIC.statusupdateraw = action.data AppDispatcher.dispatch({ type: 'ics/start-edit', data: tempIC, @@ -138,12 +133,10 @@ class InfrastructureComponentStore extends ArrayStore { case 'ics/nodestats-received': let tempIC2 = action.ic; if(!tempIC2.managedexternally){ - if (tempIC2.statusupdateraw === null || tempIC2.statusupdateraw === undefined){ + if (tempIC2.statusupdateraw === null || tempIC2.statusupdateraw === undefined) { tempIC2.statusupdateraw = {}; - tempIC2.statusupdateraw["statistics"] = action.data; - } else { - tempIC2.statusupdateraw["statistics"] = action.data; } + tempIC2.statusupdateraw["statistics"] = action.data; AppDispatcher.dispatch({ type: 'ics/start-edit', data: tempIC2,