From 4265f5946016fa299d6afeef67b322cf3c2d2b93 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 8 Jun 2018 11:34:17 +0200 Subject: [PATCH] change columns in simulator list --- src/containers/simulators.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/containers/simulators.js b/src/containers/simulators.js index 76cc3e4..5c425c5 100644 --- a/src/containers/simulators.js +++ b/src/containers/simulators.js @@ -166,13 +166,16 @@ class Simulators extends Component { } isSimulatorOutdated(simulator) { + if (!simulator.stateUpdatedAt) + return true; + const fiveMinutes = 5 * 60 * 1000; return Date.now() - new Date(simulator.stateUpdatedAt) > fiveMinutes; } isSimulatorOnline(state) { - return state !== 'shutdown' && state !== 'unknown'; + return state != '' && state !== 'shutdown' && state !== 'unknown'; } stateLabelStyle = (state, simulator) => { @@ -218,10 +221,11 @@ class Simulators extends Component { this.onSimulatorChecked(index, event)} width='30' /> - - + + + - +