2019-07-01 20:35:18 +00:00
|
|
|
<PageHeader as |p|>
|
|
|
|
<p.top>
|
2021-12-17 03:44:29 +00:00
|
|
|
<KeyValueHeader @path="vault.cluster.access.methods">
|
2019-07-01 20:35:18 +00:00
|
|
|
<li>
|
|
|
|
<span class="sep">
|
|
|
|
/
|
|
|
|
</span>
|
2021-12-17 03:44:29 +00:00
|
|
|
<LinkTo @route="vault.cluster.access.methods">
|
2019-07-01 20:35:18 +00:00
|
|
|
methods
|
2021-12-17 03:44:29 +00:00
|
|
|
</LinkTo>
|
2019-07-01 20:35:18 +00:00
|
|
|
</li>
|
2021-12-17 03:44:29 +00:00
|
|
|
</KeyValueHeader>
|
2019-07-01 20:35:18 +00:00
|
|
|
</p.top>
|
|
|
|
<p.levelLeft>
|
|
|
|
<h1 class="title is-3">
|
2022-06-04 00:34:42 +00:00
|
|
|
{{@methodModel.id}}
|
2019-07-01 20:35:18 +00:00
|
|
|
</h1>
|
|
|
|
</p.levelLeft>
|
|
|
|
</PageHeader>
|
2022-06-04 00:34:42 +00:00
|
|
|
{{#let (tabs-for-auth-section @methodModel "authConfig" @paths) as |tabs|}}
|
2019-10-17 23:19:14 +00:00
|
|
|
{{#if tabs.length}}
|
|
|
|
<div class="tabs-container box is-sideless is-fullwidth is-paddingless is-marginless">
|
|
|
|
<nav class="tabs">
|
|
|
|
<ul>
|
|
|
|
{{#each tabs as |tab|}}
|
2022-03-18 15:38:54 +00:00
|
|
|
<li>
|
|
|
|
<LinkTo @route={{get tab.routeParams 0}} @model={{get tab.routeParams 1}} data-test-auth-section-tab={{true}}>
|
2019-10-17 23:19:14 +00:00
|
|
|
{{tab.label}}
|
2022-03-18 15:38:54 +00:00
|
|
|
</LinkTo>
|
|
|
|
</li>
|
2019-10-17 23:19:14 +00:00
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-03-21 20:36:21 +00:00
|
|
|
{{/let}}
|
2019-07-01 20:35:18 +00:00
|
|
|
<Toolbar>
|
|
|
|
<ToolbarActions>
|
2019-10-17 23:19:14 +00:00
|
|
|
<ToolbarLink
|
2022-10-18 15:46:02 +00:00
|
|
|
@route="vault.cluster.access.method.item.create"
|
|
|
|
@model={{this.itemType}}
|
2019-10-17 23:19:14 +00:00
|
|
|
@type="add"
|
2022-10-18 15:46:02 +00:00
|
|
|
data-test-entity-create-link={{this.itemType}}
|
2021-12-17 03:44:29 +00:00
|
|
|
>
|
2019-07-01 20:35:18 +00:00
|
|
|
Create
|
2021-12-17 03:44:29 +00:00
|
|
|
{{singularize this.itemType}}
|
2019-07-01 20:35:18 +00:00
|
|
|
</ToolbarLink>
|
|
|
|
</ToolbarActions>
|
|
|
|
</Toolbar>
|
2021-12-17 03:44:29 +00:00
|
|
|
<ListView
|
|
|
|
@items={{this.model}}
|
|
|
|
@itemNoun={{this.itemType}}
|
|
|
|
@paginationRouteName="vault.cluster.access.method.item.list"
|
|
|
|
as |list|
|
|
|
|
>
|
2019-07-01 20:35:18 +00:00
|
|
|
{{#if list.empty}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<list.empty
|
|
|
|
@title="No {{pluralize this.itemType}} yet"
|
|
|
|
@message="A list of {{pluralize
|
|
|
|
this.itemType
|
|
|
|
}} will be listed here. Create your first {{this.itemType}} to get started."
|
|
|
|
>
|
2022-03-18 15:38:54 +00:00
|
|
|
<LinkTo @route="vault.cluster.access.method.item.create" @model={{this.itemType}} class="link">
|
2021-12-17 03:44:29 +00:00
|
|
|
Create
|
|
|
|
{{singularize this.itemType}}
|
2022-03-18 15:38:54 +00:00
|
|
|
</LinkTo>
|
2019-07-01 20:35:18 +00:00
|
|
|
</list.empty>
|
|
|
|
{{else if list.item}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<ListItem @linkParams={{array "vault.cluster.access.method.item.show" this.itemType list.item.id}} as |Item|>
|
2019-07-01 20:35:18 +00:00
|
|
|
<Item.content>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="folder" class="has-text-grey-light" />{{list.item.id}}
|
2019-07-01 20:35:18 +00:00
|
|
|
</Item.content>
|
2019-10-17 23:19:14 +00:00
|
|
|
<Item.menu as |Menu|>
|
2019-07-01 20:35:18 +00:00
|
|
|
<li class="action">
|
2022-03-18 15:38:54 +00:00
|
|
|
<LinkTo @route="vault.cluster.access.method.item.show" @model={{list.item.id}} class="is-block">
|
2021-12-17 03:44:29 +00:00
|
|
|
View
|
|
|
|
{{singularize this.itemType}}
|
2022-03-18 15:38:54 +00:00
|
|
|
</LinkTo>
|
2019-07-01 20:35:18 +00:00
|
|
|
</li>
|
|
|
|
<li class="action">
|
2022-03-18 15:38:54 +00:00
|
|
|
<LinkTo @route="vault.cluster.access.method.item.edit" @model={{list.item.id}} class="is-block">
|
2021-12-17 03:44:29 +00:00
|
|
|
Edit
|
|
|
|
{{singularize this.itemType}}
|
2022-03-18 15:38:54 +00:00
|
|
|
</LinkTo>
|
2019-07-01 20:35:18 +00:00
|
|
|
</li>
|
|
|
|
<li>
|
2019-10-17 23:19:14 +00:00
|
|
|
<Menu.Message
|
|
|
|
@id={{list.item.id}}
|
|
|
|
@buttonClasses="link is-destroy"
|
|
|
|
@onConfirm={{action
|
|
|
|
(perform
|
|
|
|
Item.callMethod
|
|
|
|
"destroyRecord"
|
|
|
|
list.item
|
2021-12-17 03:44:29 +00:00
|
|
|
(concat "Successfully deleted " (singularize this.itemType) " " list.item.id ".")
|
|
|
|
(concat "There was an error deleting this " (singularize this.itemType))
|
2019-10-17 23:19:14 +00:00
|
|
|
(action "refreshItemList")
|
|
|
|
)
|
|
|
|
}}
|
2021-12-17 03:44:29 +00:00
|
|
|
@message={{concat "Are you sure you want to delete " (singularize this.itemType) " " list.item.id "?"}}
|
2019-10-17 23:19:14 +00:00
|
|
|
data-test-secret-delete="true"
|
2021-12-17 03:44:29 +00:00
|
|
|
@triggerText={{concat "Delete " (singularize this.itemType)}}
|
|
|
|
/>
|
2019-07-01 20:35:18 +00:00
|
|
|
</li>
|
|
|
|
</Item.menu>
|
|
|
|
</ListItem>
|
|
|
|
{{/if}}
|
2021-12-17 03:44:29 +00:00
|
|
|
</ListView>
|