diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 12:40:40 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-09-17 12:40:40 +0200 |
| commit | 15e5df27774fef8d976c74b6ec7bcf8f878e5834 (patch) | |
| tree | b9d0110849789382bf9f255fcadf4587e338d2f1 /app/client/system | |
| parent | 439888003a41279a0fe5a74ac5b92898cabd827b (diff) | |
log in / log out
Diffstat (limited to 'app/client/system')
| -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), |
