open-vault/ui/app/machines/auth-machine.js

51 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-08-28 05:03:55 +00:00
export default {
key: 'auth',
initial: 'idle',
on: {
RESET: 'idle',
DONE: 'complete',
},
states: {
idle: {
onEntry: [
{ type: 'routeTransition', params: ['vault.cluster.settings.auth.enable'] },
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
{ type: 'render', level: 'step', component: 'wizard/auth-idle' },
],
on: {
CONTINUE: 'enable',
},
},
enable: {
onEntry: [
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
{ type: 'render', level: 'step', component: 'wizard/auth-enable' },
],
on: {
2019-02-14 18:52:34 +00:00
CONTINUE: 'config',
2018-08-28 05:03:55 +00:00
},
},
2019-02-14 18:52:34 +00:00
config: {
2018-08-28 05:03:55 +00:00
onEntry: [
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
2019-02-14 18:52:34 +00:00
{ type: 'render', level: 'step', component: 'wizard/auth-config' },
2018-08-28 05:03:55 +00:00
],
on: {
2019-02-14 18:52:34 +00:00
CONTINUE: 'details',
2018-08-28 05:03:55 +00:00
},
},
details: {
onEntry: [
{ type: 'render', level: 'step', component: 'wizard/auth-details' },
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
],
on: {
CONTINUE: 'complete',
},
},
complete: {
onEntry: ['completeFeature'],
},
},
};