diff options
Diffstat (limited to 'app/client/system')
| -rw-r--r-- | app/client/system/system.actions.js | 11 | ||||
| -rw-r--r-- | app/client/system/system.component.js | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/app/client/system/system.actions.js b/app/client/system/system.actions.js index 9e4f178..c661769 100644 --- a/app/client/system/system.actions.js +++ b/app/client/system/system.actions.js @@ -1,6 +1,8 @@ import socket from '../socket' import types from '../types' +import actions from '../actions' + export const run = (cmd) => (dispatch) => { dispatch({ type: types.system.running_command, cmd }) socket.actions.run_system_command(cmd) @@ -26,3 +28,12 @@ export const listDirectory = (opt) => (dispatch) => { export const changeTool = (tool) => { return { type: types.app.change_tool, tool } } + +export const enqueue_test_task = (dataset) => dispatch => { + const task = { + module: 'test', + activity: 'test', + dataset: dataset, + } + return actions.queue.add_task(task) +} diff --git a/app/client/system/system.component.js b/app/client/system/system.component.js index 1953ee3..b4a0ed7 100644 --- a/app/client/system/system.component.js +++ b/app/client/system/system.component.js @@ -93,6 +93,9 @@ class System extends Component { <button onClick={() => actions.live.get_params()}>Get</button> <button onClick={() => actions.live.set_param('fruit', choice(fruits))}>Set</button> </Param> + <Param title='Queue'> + <button onClick={() => actions.system.enqueue_test_task(choice(fruits))}>+ Add</button> + </Param> </Group> </div> {this.renderCommandOutput()} |
