diff options
Diffstat (limited to 'app/client/system/system.component.js')
| -rw-r--r-- | app/client/system/system.component.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/client/system/system.component.js b/app/client/system/system.component.js index 2aa4cd4..3783862 100644 --- a/app/client/system/system.component.js +++ b/app/client/system/system.component.js @@ -8,6 +8,7 @@ import Param from '../common/param.component' import * as systemActions from './system.actions' import * as liveActions from '../live/live.actions' import * as queueActions from '../queue/queue.actions' +import * as authActions from '../auth/auth.actions' const cpu_test_task = { activity: 'cpu', @@ -50,7 +51,7 @@ class System extends Component { } } render(){ - const { site, server, relay, runner, rpc, actions } = this.props + const { site, server, relay, runner, rpc, actions, user } = this.props return ( <div className='app system'> <div className='heading'> @@ -92,6 +93,11 @@ class System extends Component { <button onClick={() => actions.queue.stop_queue()}>Stop</button> </Param> </Group> + <Group title="Auth"> + <Param title={'Logged in as ' + user.username}> + <button onClick={() => actions.auth.logout()}>Logout</button> + </Param> + </Group> <Group title="Test"> <Param title='CPU Test Task'> <button onClick={() => actions.queue.start_task(cpu_test_task, { preempt: true, watch: true })}>Start</button> @@ -164,12 +170,14 @@ class System extends Component { } } const mapStateToProps = state => ({ + user: state.auth.user, ...state.system, ...state.live, }) const mapDispatchToProps = (dispatch, ownProps) => ({ actions: { + auth: bindActionCreators(authActions, dispatch), system: bindActionCreators(systemActions, dispatch), queue: bindActionCreators(queueActions, dispatch), live: bindActionCreators(liveActions, dispatch), |
