summaryrefslogtreecommitdiff
path: root/app/client/system
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/system')
-rw-r--r--app/client/system/system.component.js10
-rw-r--r--app/client/system/system.reducer.js25
2 files changed, 32 insertions, 3 deletions
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 {
}
<Param title='Relay'>{relay.status}</Param>
<Param title='RPC'>{rpc.status}</Param>
- <Param title='CPU'>pix2pix dataset.py</Param>
- <Param title='GPU'>pix2pix train.py</Param>
+ <Param title='CPU'>{rpc.cpu_cmd}</Param>
+ <Param title='GPU'>{rpc.gpu_cmd}</Param>
<Param title='Current Task'>train samplernn</Param>
</Group>
<Group title="Diagnostics">
- <Param title='Commands'>
+ <Param title='Check GPU'>
<button onClick={() => actions.run('nvidia-smi')}>nvidia-smi</button>
+ </Param>
+ <Param title='List processes'>
<button onClick={() => actions.run('ps')}>ps</button>
+ </Param>
+ <Param title='List users'>
<button onClick={() => actions.run('w')}>w</button>
</Param>
</Group>
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: