diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-26 18:25:21 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-26 18:25:21 +0200 |
| commit | 3d836c372d7eff1e2b507888f1ff652a30187c54 (patch) | |
| tree | 7712d75d400a48124192e2967fab4d8fcc72063c /app/client/system/system.reducer.js | |
| parent | 0157537cc049d4b13384b7042129a61f297f9132 (diff) | |
checking on RPC status and sending it thru
Diffstat (limited to 'app/client/system/system.reducer.js')
| -rw-r--r-- | app/client/system/system.reducer.js | 25 |
1 files changed, 25 insertions, 0 deletions
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: |
