diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-21 15:10:15 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-23 10:06:04 +0200 |
| commit | 0439ccf76f9ccf68c7572deadf38d6a157c439e7 (patch) | |
| tree | e71d3ac9b2ab443d8c49342cc6c7708ba2a00788 /src/containers | |
| parent | da861719c6433a1fc9346da958f0907e52d578ce (diff) | |
Implement last-simulated-tick and states fetching
Diffstat (limited to 'src/containers')
| -rw-r--r-- | src/containers/sidebars/topology/machine/MachineSidebarContainer.js | 3 | ||||
| -rw-r--r-- | src/containers/timeline/TimelineControlsContainer.js | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/containers/sidebars/topology/machine/MachineSidebarContainer.js b/src/containers/sidebars/topology/machine/MachineSidebarContainer.js index b0d5eed9..f99fc05e 100644 --- a/src/containers/sidebars/topology/machine/MachineSidebarContainer.js +++ b/src/containers/sidebars/topology/machine/MachineSidebarContainer.js @@ -3,8 +3,9 @@ import MachineSidebarComponent from "../../../../components/sidebars/topology/ma const mapStateToProps = state => { return { - machineId: state.interactionLevel.machineId, inSimulation: state.currentExperimentId !== -1, + machineId: state.objects.rack[state.objects.tile[state.interactionLevel.tileId].objectId] + .machineIds[state.interactionLevel.position - 1], }; }; diff --git a/src/containers/timeline/TimelineControlsContainer.js b/src/containers/timeline/TimelineControlsContainer.js index 1afd336a..16d44052 100644 --- a/src/containers/timeline/TimelineControlsContainer.js +++ b/src/containers/timeline/TimelineControlsContainer.js @@ -6,7 +6,9 @@ const mapStateToProps = state => { if (state.currentExperimentId !== -1) { const sectionIds = state.objects.path[state.objects.experiment[state.currentExperimentId].pathId].sectionIds; if (sectionIds) { - sectionTicks = sectionIds.map(sectionId => state.objects.section[sectionId].startTick); + sectionTicks = sectionIds + .filter(sectionId => state.objects.section[sectionId].startTick !== 0) + .map(sectionId => state.objects.section[sectionId].startTick); } } |
