mirror of
https://github.com/status-im/consul.git
synced 2025-01-19 10:15:06 +00:00
fce4311f55
* Add components for KV form, KV list and Session form * Pass through a @label attribute for a human label + don't require error * Ignore transition aborted errors for if you are re-transitioning * Make old confirmation dialog more ember-like and tagless * Make sure data-source and data-sink supports KV and sessions * Use new components and delete all the things * Fix up tests * Make list component tagless * Add component pageobject and fixup tests from that * Add eslint warning back in
42 lines
963 B
Handlebars
42 lines
963 B
Handlebars
<DataLoader @items={{item}} @src={{concat '/' nspace '/' dc '/' type '/' src}} @onchange={{action "setData"}} @once={{true}}>
|
|
<BlockSlot @name="loaded">
|
|
|
|
<DataWriter
|
|
@sink={{concat '/' nspace '/' (or data.Datacenter dc) '/' type '/'}}
|
|
@type={{type}}
|
|
@label={{label}}
|
|
@ondelete={{action ondelete}}
|
|
@onchange={{action onsubmit}}
|
|
as |writer|>
|
|
|
|
{{#let (hash
|
|
data=data
|
|
change=(action "change")
|
|
isCreate=create
|
|
error=writer.error
|
|
disabled=writer.inflight
|
|
submit=(action writer.persist data)
|
|
delete=(action writer.delete data)
|
|
) as |api|}}
|
|
|
|
{{yield api}}
|
|
{{#if hasError}}
|
|
<BlockSlot @name="error">
|
|
<YieldSlot @name="error">
|
|
{{yield api}}
|
|
</YieldSlot>
|
|
</BlockSlot>
|
|
{{/if}}
|
|
|
|
<BlockSlot @name="content">
|
|
<YieldSlot @name="form">
|
|
{{yield api}}
|
|
</YieldSlot>
|
|
</BlockSlot>
|
|
|
|
{{/let}}
|
|
|
|
</DataWriter>
|
|
|
|
</BlockSlot>
|
|
</DataLoader> |