diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/README.mdx b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/README.mdx new file mode 100644 index 000000000..6b791f391 --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/README.mdx @@ -0,0 +1,28 @@ +# Consul::Peer::Form::Generate + +```hbs preview-template + + +{{#if source.data}} + + + + +{{/if}} + +``` diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs new file mode 100644 index 000000000..5c7513233 --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/actions/index.hbs @@ -0,0 +1,10 @@ + + Generate token + diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js new file mode 100644 index 000000000..1c3b43f9d --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/chart.xstate.js @@ -0,0 +1,26 @@ +export default { + id: 'consul-peer-generate-form', + initial: 'idle', + states: { + idle: { + on: { + LOAD: { + target: 'loading' + } + } + }, + loading: { + on: { + SUCCESS: { + target: 'success' + }, + ERROR: { + target: 'error' + } + } + }, + success: { + }, + error: {}, + }, +}; diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.hbs new file mode 100644 index 000000000..f6fd4fcbc --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/fieldsets/index.hbs @@ -0,0 +1,40 @@ +
+ + {{#let + (hash + help=(concat + (t 'common.validations.dns-hostname.help') + (t 'common.validations.immutable.help') + ) + Name=(array + (hash + test=(t 'common.validations.dns-hostname.test') + error=(t 'common.validations.dns-hostname.error' name="Name") + ) + ) + ) + as |Name|}} +
+ + {{yield (hash + valid=(not (state-matches fsm.state 'error')) + )}} +
+ + {{/let}} +
+
diff --git a/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs new file mode 100644 index 000000000..204906324 --- /dev/null +++ b/ui/packages/consul-peerings/app/components/consul/peer/form/generate/index.hbs @@ -0,0 +1,56 @@ +
+ + + {{#let + (unique-id) + as |id reset|}} +
+ + + {{yield (hash + Fieldsets=(component "consul/peer/form/generate/fieldsets" + item=@item + ) + Actions=(component "consul/peer/form/generate/actions" + item=@item + id=id + ) + )}} + + + + + + + + + +
+ {{/let}} + +
+