2020-12-09 09:22:46 +00:00
|
|
|
<DataLoader
|
|
|
|
@items={{item}}
|
|
|
|
@src={{uri
|
2021-09-15 18:50:11 +00:00
|
|
|
'/${partition}/${nspace}/${dc}/${type}/${src}'
|
2020-12-09 09:22:46 +00:00
|
|
|
(hash
|
2021-09-15 18:50:11 +00:00
|
|
|
partition=partition
|
2020-12-09 09:22:46 +00:00
|
|
|
nspace=nspace
|
|
|
|
dc=dc
|
|
|
|
type=type
|
|
|
|
src=src
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
@onchange={{action "setData"}}
|
|
|
|
@once={{true}}
|
|
|
|
>
|
2020-07-09 09:08:47 +00:00
|
|
|
<BlockSlot @name="loaded">
|
|
|
|
|
|
|
|
<DataWriter
|
2020-12-09 09:22:46 +00:00
|
|
|
@sink={{uri
|
2021-09-15 18:50:11 +00:00
|
|
|
'/${partition}/${nspace}/${dc}/${type}'
|
2020-12-09 09:22:46 +00:00
|
|
|
(hash
|
2021-09-15 18:50:11 +00:00
|
|
|
partition=partition
|
2020-12-09 09:22:46 +00:00
|
|
|
nspace=nspace
|
|
|
|
dc=(or data.Datacenter dc)
|
|
|
|
type=type
|
|
|
|
)
|
|
|
|
}}
|
2020-07-09 09:08:47 +00:00
|
|
|
@type={{type}}
|
2020-07-20 17:04:43 +00:00
|
|
|
@label={{label}}
|
2020-07-09 09:08:47 +00:00
|
|
|
@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}}
|
2020-07-20 17:04:43 +00:00
|
|
|
{{#if hasError}}
|
2020-07-09 09:08:47 +00:00
|
|
|
<BlockSlot @name="error">
|
|
|
|
<YieldSlot @name="error">
|
|
|
|
{{yield api}}
|
|
|
|
</YieldSlot>
|
|
|
|
</BlockSlot>
|
2020-07-20 17:04:43 +00:00
|
|
|
{{/if}}
|
2020-07-09 09:08:47 +00:00
|
|
|
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
<YieldSlot @name="form">
|
|
|
|
{{yield api}}
|
|
|
|
</YieldSlot>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
{{/let}}
|
|
|
|
|
|
|
|
</DataWriter>
|
|
|
|
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|