Redux handles our data flow and storage throughout the application. We trigger actions which can can call asyncronus client calls and other actions which in turn get dispatched to reducers which updates our data store. What follows is an annotated version of our Redux data model as outlined here. The term “… object” (e.g. “simulation object”) refers to the plain object you would get back from the Girder endpoint.
Auth
auth: { pending: false, user: {}, },
pending determines if there is an async auth action in progress.
user is the user object we use throughout the application.
Each property is self explanatory for what the data contains, they have some common properties too.
mapById This is the main container for the parent property categorized by their id.
pending if there are any pending network calls, we use this to make sure we don’t poll the endpoints more than necessary.
list This is the source for the item list in the ActiveList panel.
active determines which item in the list is active, -1 if none are active.
Under clusters there’s presets this is a list of preset machines so you don’t have to enter them everytime. We have some preset machines at Kitware setup, if you’d like to add your own machines you can edit the source file for the presets at dist/clusters-presets.json.
The taskflow store is the most complicated store because of the amount of relations a single taskflow can have to other objects.
mapById is similar to mapById in clusters however it contains some extra information and the actual taskflow object is stored in flow, all other properties are effectively metadata.
taskMayById contains full task objects by id for the taskflow.
jobMayById contains full job objects by id for the taskflow.
log is the taskflow’s log, we display this as “Workflow log” in the JobMonitor component.
simulation is the simulation id the taskflow belongs to
primaryJob is the primary job for the taskflow
actions contains button objects for the button bar on the simulation view page, they are updated in StateTransitionBehavior.
allComplete is a bool which helps StateTransitionBehavior determine actions.
taskflowMapByTaskId and taskflowMapByJobId are maps of tasks and job id’s which correspond to taskflows. These are used for connecting status and log events to the right objects.
updateLogs used by StateTransitionBehavior to know if it should update.