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}/role/${id}'
|
|
|
|
(hash
|
|
|
|
partition=route.params.partition
|
|
|
|
nspace=route.params.nspace
|
|
|
|
dc=route.params.dc
|
|
|
|
id=(or route.params.id '')
|
|
|
|
)
|
|
|
|
}}
|
|
|
|
as |loader|>
|
|
|
|
|
|
|
|
<BlockSlot @name="error">
|
|
|
|
{{#if (eq loader.error.status '401')}}
|
|
|
|
<Consul::Acl::Disabled />
|
|
|
|
{{else}}
|
|
|
|
<AppError
|
|
|
|
@error={{loader.error}}
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</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
|
|
|
|
@login={{route.model.app.login.open}}
|
|
|
|
>
|
|
|
|
<BlockSlot @name="breadcrumbs">
|
|
|
|
<ol>
|
|
|
|
<li><a data-test-back href={{href-to 'dc.acls.roles'}}>All Roles</a></li>
|
|
|
|
</ol>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="header">
|
|
|
|
<h1>
|
|
|
|
{{#if create }}
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="New Role" />
|
2021-04-06 12:40:40 +00:00
|
|
|
{{else}}
|
2021-09-15 18:50:11 +00:00
|
|
|
<route.Title @title="Edit Role" />
|
2021-04-06 12:40:40 +00:00
|
|
|
{{/if}}
|
|
|
|
</h1>
|
|
|
|
</BlockSlot>
|
|
|
|
<BlockSlot @name="content">
|
|
|
|
{{#if (not create) }}
|
|
|
|
<div class="definition-table">
|
|
|
|
<dl>
|
|
|
|
<dt>Role ID</dt>
|
|
|
|
<dd>
|
|
|
|
<CopyButton @value={{item.ID}} @name="Role ID" @position="top-start" /> {{item.ID}}
|
|
|
|
</dd>
|
|
|
|
</dl>
|
|
|
|
</div>
|
2019-05-01 18:09:29 +00:00
|
|
|
{{/if}}
|
2021-04-06 12:40:40 +00:00
|
|
|
{{ partial 'dc/acls/roles/form'}}
|
|
|
|
</BlockSlot>
|
|
|
|
</AppView>
|
2021-09-15 18:50:11 +00:00
|
|
|
{{/let}}
|
|
|
|
</BlockSlot>
|
|
|
|
</DataLoader>
|
2021-04-06 12:40:40 +00:00
|
|
|
</Route>
|