summaryrefslogtreecommitdiff
path: root/app/client/system
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-05-28 10:18:25 +0200
committerJules Laplace <julescarbon@gmail.com>2018-05-28 10:18:25 +0200
commit3a8d99c5e4f64a9426585943c40635eb183b47ae (patch)
treed09bc57d59ec0ff7a6def8af49634c4aab64e493 /app/client/system
parented80103ff0c4b87d2726da5ceab8ec566b46e0ee (diff)
start/stop tasks
Diffstat (limited to 'app/client/system')
-rw-r--r--app/client/system/system.component.js6
-rw-r--r--app/client/system/system.reducer.js7
2 files changed, 9 insertions, 4 deletions
diff --git a/app/client/system/system.component.js b/app/client/system/system.component.js
index 2b09f38..b257573 100644
--- a/app/client/system/system.component.js
+++ b/app/client/system/system.component.js
@@ -79,15 +79,15 @@ class System extends Component {
<Group title="Test">
<Param title='CPU Test Task'>
<button onClick={() => actions.task.start_task(cpu_test_task, { preempt: true, watch: true })}>Start</button>
- <button onClick={() => actions.task.stop_task(runner.cpu)}>Stop</button>
+ <button onClick={() => actions.task.stop_task(runner.cpu.task)}>Stop</button>
</Param>
<Param title='GPU Test Task'>
<button onClick={() => actions.task.start_task(gpu_test_task, { preempt: true, watch: true })}>Start</button>
- <button onClick={() => actions.task.stop_task(runner.gpu)}>Stop</button>
+ <button onClick={() => actions.task.stop_task(runner.gpu.task)}>Stop</button>
</Param>
<Param title='Live Test Task'>
<button onClick={() => actions.task.start_task(live_test_task, { preempt: true, watch: true })}>Start</button>
- <button onClick={() => actions.task.stop_task(runner.cpu)}>Stop</button>
+ <button onClick={() => actions.task.stop_task(runner.cpu.task)}>Stop</button>
</Param>
<Param title='Test Live RPC'>
<button onClick={() => actions.live.get_params()}>Get</button>
diff --git a/app/client/system/system.reducer.js b/app/client/system/system.reducer.js
index c29572e..f945a65 100644
--- a/app/client/system/system.reducer.js
+++ b/app/client/system/system.reducer.js
@@ -21,7 +21,7 @@ const systemInitialState = {
},
rpc: {
connected: false,
- status: "unknown",
+ status: "disconnected",
error: null,
},
cmd: {
@@ -169,6 +169,11 @@ const systemReducer = (state = systemInitialState, action) => {
}
return {
...state,
+ rpc: {
+ connected: false,
+ status: "disconnected",
+ error: null,
+ },
runner: {
...state.runner,
[action.task.processor]: { status: 'IDLE', task: {} },