2023-03-14 13:18:55 +00:00
|
|
|
{{!
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
}}
|
|
|
|
|
2021-04-06 12:40:40 +00:00
|
|
|
<Route
|
|
|
|
@name={{routeName}}
|
|
|
|
as |route|>
|
2021-09-15 18:50:11 +00:00
|
|
|
<DataLoader @src={{
|
|
|
|
uri '/${partition}/${nspace}/${dc}/namespace/${id}'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
id=(or route.params.name '')
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
as |loader|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
<AppError
|
|
|
|
@error={{loader.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
</BlockSlot>
|
|
|
|
|
|
|
|
<BlockSlot @name="loaded">
|
|
|
|
{{#let
|
|
|
|
|
|
|
|
route.params.dc
|
|
|
|
route.params.partition
|
|
|
|
route.params.nspace
|
|
|
|
|
|
|
|
loader.data
|
|
|
|
loader.data.isNew
|
|
|
|
as |dc partition nspace item create|}}
|
2021-04-06 12:40:40 +00:00
|
|
|
<AppView>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
|
|
|
<li><a data-test-back href={{href-to 'dc.nspaces'}}>All Namespaces</a></li>
|
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title={{if create "New Namespace" (concat "Edit " item.Name)}} />
|
2021-04-06 12:40:40 +00:00
|
|
|
</h1>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="actions">
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
2021-12-01 11:04:02 +00:00
|
|
|
<Consul::Nspace::Form
|
|
|
|
@item={{item}}
|
|
|
|
@dc={{route.params.dc}}
|
|
|
|
@nspace={{route.params.nspace}}
|
|
|
|
@partition={{route.params.partition}}
|
|
|
|
@onsubmit={{transition-to 'dc.nspaces.index'}}
|
|
|
|
/>
|
2021-04-06 12:40:40 +00:00
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2021-09-15 18:50:11 +00:00
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2021-04-06 12:40:40 +00:00
|
|
|
</Route>
|