mirror of https://github.com/hashicorp/consul
133 lines
3.6 KiB
Handlebars
133 lines
3.6 KiB
Handlebars
<Route
|
|
@name={{routeName}}
|
|
as |route|>
|
|
|
|
<DataLoader
|
|
@src={{
|
|
uri '/${partition}/${nspace}/${dc}/auth-methods'
|
|
(hash
|
|
partition=route.params.partition
|
|
nspace=route.params.nspace
|
|
dc=route.params.dc
|
|
)}}
|
|
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
|
|
|
|
(hash
|
|
value=(or sortBy "MethodName:asc")
|
|
change=(action (mut sortBy) value="target.selected")
|
|
)
|
|
|
|
(hash
|
|
kind=(hash
|
|
value=(if kind (split kind ',') undefined)
|
|
change=(action (mut kind) value="target.selectedItems")
|
|
)
|
|
source=(hash
|
|
value=(if source (split source ',') undefined)
|
|
change=(action (mut source) value="target.selectedItems")
|
|
)
|
|
searchproperty=(hash
|
|
value=(if (not-eq searchproperty undefined)
|
|
(split searchproperty ',')
|
|
searchProperties
|
|
)
|
|
change=(action (mut searchproperty) value="target.selectedItems")
|
|
default=searchProperties
|
|
)
|
|
)
|
|
|
|
loader.data
|
|
|
|
as |sort filters items|}}
|
|
|
|
|
|
<AppView
|
|
@login={{route.model.app.login.open}}
|
|
>
|
|
<BlockSlot @name="header">
|
|
<h1>
|
|
<route.Title @title="Auth Methods" />
|
|
</h1>
|
|
</BlockSlot>
|
|
<BlockSlot @name="toolbar">
|
|
{{#if (gt items.length 0)}}
|
|
<Consul::AuthMethod::SearchBar
|
|
@search={{search}}
|
|
@onsearch={{action (mut search) value="target.value"}}
|
|
@sort={{sort}}
|
|
@filter={{filters}}
|
|
/>
|
|
{{/if}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="content">
|
|
<DataCollection
|
|
@type="auth-method"
|
|
@sort={{sort.value}}
|
|
@filters={{filters}}
|
|
@search={{search}}
|
|
@items={{items}}
|
|
as |collection|>
|
|
<collection.Collection>
|
|
<Consul::AuthMethod::List @items={{collection.items}} />
|
|
</collection.Collection>
|
|
<collection.Empty>
|
|
<EmptyState
|
|
@login={{route.model.app.login.open}}
|
|
>
|
|
<BlockSlot @name="header">
|
|
<h2>
|
|
{{t 'routes.dc.acls.auth-methods.index.empty.header'
|
|
items=items.length
|
|
}}
|
|
</h2>
|
|
</BlockSlot>
|
|
<BlockSlot @name="body">
|
|
{{t 'routes.dc.acls.auth-methods.index.empty.body'
|
|
items=items.length
|
|
htmlSafe=true
|
|
}}
|
|
</BlockSlot>
|
|
<BlockSlot @name="actions">
|
|
<li>
|
|
<Hds::Link::Standalone
|
|
@text='Documentation on auth methods'
|
|
@href="{{env 'CONSUL_DOCS_URL'}}/security/acl/auth-methods"
|
|
@icon='docs-link'
|
|
@iconPosition='trailing'
|
|
@size='small'
|
|
/>
|
|
</li>
|
|
<li>
|
|
<Hds::Link::Standalone
|
|
@text='Read the API Docs'
|
|
@href='{{env 'CONSUL_DOCS_API_URL'}}/acl/auth-methods.html'
|
|
@icon='learn-link'
|
|
@iconPosition='trailing'
|
|
@size='small'
|
|
/>
|
|
</li>
|
|
</BlockSlot>
|
|
</EmptyState>
|
|
</collection.Empty>
|
|
</DataCollection>
|
|
</BlockSlot>
|
|
</AppView>
|
|
{{/let}}
|
|
</BlockSlot>
|
|
</DataLoader>
|
|
</Route>
|