You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/app/components/data-writer/chart.xstate.js

58 lines
849 B

export default {
id: 'data-writer',
initial: 'idle',
states: {
idle: {
on: {
PERSIST: {
target: 'persisting',
},
REMOVE: {
target: 'removing',
},
},
},
removing: {
on: {
SUCCESS: {
target: 'removed',
},
ERROR: {
target: 'error',
},
},
},
persisting: {
on: {
SUCCESS: {
target: 'persisted',
},
ERROR: {
target: 'error',
},
},
},
removed: {
on: {
RESET: {
target: 'idle',
},
},
},
persisted: {
on: {
RESET: {
target: 'idle',
},
},
},
error: {
on: {
RESET: {
target: 'idle',
},
},
},
},
};