open-vault/ui/app/machines/auth-machine.js
Hamid Ghaf 27bb03bbc0
adding copyright header (#19555)
* adding copyright header

* fix fmt and a test
2023-03-15 09:00:52 -07:00

56 lines
1.3 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
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: {
CONTINUE: 'config',
},
},
config: {
onEntry: [
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
{ type: 'render', level: 'step', component: 'wizard/auth-config' },
],
on: {
CONTINUE: 'details',
},
},
details: {
onEntry: [
{ type: 'render', level: 'step', component: 'wizard/auth-details' },
{ type: 'render', level: 'feature', component: 'wizard/mounts-wizard' },
],
on: {
CONTINUE: 'complete',
},
},
complete: {
onEntry: ['completeFeature'],
},
},
};