From 3d836c372d7eff1e2b507888f1ff652a30187c54 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Sat, 26 May 2018 18:25:21 +0200 Subject: checking on RPC status and sending it thru --- app/client/system/system.component.js | 10 +++++++--- app/client/system/system.reducer.js | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) (limited to 'app/client/system') diff --git a/app/client/system/system.component.js b/app/client/system/system.component.js index e097b61..7428c22 100644 --- a/app/client/system/system.component.js +++ b/app/client/system/system.component.js @@ -27,14 +27,18 @@ class System extends Component { } {relay.status} {rpc.status} - pix2pix dataset.py - pix2pix train.py + {rpc.cpu_cmd} + {rpc.gpu_cmd} train samplernn - + + + + + diff --git a/app/client/system/system.reducer.js b/app/client/system/system.reducer.js index 1b0e28f..a21966d 100644 --- a/app/client/system/system.reducer.js +++ b/app/client/system/system.reducer.js @@ -22,6 +22,8 @@ const systemInitialState = { rpc: { connected: false, status: "unknown", + cpu_cmd: "unknown", + gpu_cmd: "unknown", error: null, }, cmd: { @@ -181,6 +183,29 @@ const systemReducer = (state = systemInitialState, action) => { status: 'disconnected', connected: false, error: null, + }, + rpc: { + status: 'disconnected', + connected: false, + error: null, + }, + } + case types.system.rpc_connected: + return { + ...state, + rpc: { + status: 'connected', + connected: true, + error: null, + } + } + case types.system.rpc_connected: + return { + ...state, + rpc: { + status: 'disconnected', + connected: false, + error: null, } } case types.system.running_command: -- cgit v1.2.3-70-g09d2