353a2bdb58
* add size prop to icon component * use size instead of css classes to adjust Icons * add knobs for icon stories
101 lines
3.3 KiB
Handlebars
101 lines
3.3 KiB
Handlebars
<PageHeader as |p|>
|
|
<p.levelLeft>
|
|
<h1 class="title is-3">
|
|
Authentication Methods
|
|
</h1>
|
|
</p.levelLeft>
|
|
</PageHeader>
|
|
|
|
<Toolbar>
|
|
<ToolbarActions>
|
|
<ToolbarLink
|
|
@type="add"
|
|
@params={{array 'vault.cluster.settings.auth.enable'}}
|
|
>
|
|
Enable new method
|
|
</ToolbarLink>
|
|
</ToolbarActions>
|
|
</Toolbar>
|
|
|
|
{{#each (sort-by "path" model) as |method|}}
|
|
<div
|
|
class="list-item-row"
|
|
data-test-auth-backend-link={{method.id}}
|
|
>
|
|
<div class="level is-mobile">
|
|
<div class="level-left">
|
|
<div>
|
|
<ToolTip @horizontalPosition="left" as |T|>
|
|
<T.trigger>
|
|
<Icon
|
|
@glyph={{if
|
|
(or
|
|
(find-by "type" method.methodType (mountable-auth-methods))
|
|
(eq method.methodType "token")
|
|
)
|
|
method.methodType
|
|
"auth"
|
|
}}
|
|
@size="l"
|
|
class="has-text-grey-light"
|
|
/>
|
|
</T.trigger>
|
|
<T.content @class="tool-tip">
|
|
<div class="box">
|
|
{{method.methodType}}
|
|
</div>
|
|
</T.content>
|
|
</ToolTip>
|
|
<span data-test-path data-test-id={{method.id}} class="has-text-weight-semibold has-text-grey">
|
|
{{method.path}}
|
|
</span>
|
|
<br />
|
|
<code class="has-text-grey is-size-8">
|
|
{{method.accessor}}
|
|
</code>
|
|
</div>
|
|
</div>
|
|
<div class="level-right is-flex is-paddingless is-marginless">
|
|
<div class="level-item">
|
|
{{#popup-menu name="auth-backend-nav"}}
|
|
<nav class="menu">
|
|
<ul class="menu-list">
|
|
<li>
|
|
{{#link-to "vault.cluster.access.method.section" method.id "configuration"}}
|
|
View configuration
|
|
{{/link-to}}
|
|
</li>
|
|
{{#if method.canEdit}}
|
|
<li>
|
|
{{#link-to "vault.cluster.settings.auth.configure" method.id}}
|
|
Edit configuration
|
|
{{/link-to}}
|
|
</li>
|
|
{{/if}}
|
|
|
|
{{#if (and (not-eq method.methodType 'token') method.canDisable)}}
|
|
<li class="action">
|
|
{{#confirm-action
|
|
confirmButtonClasses="button is-primary"
|
|
buttonClasses="link is-destroy"
|
|
onConfirmAction=(perform disableMethod method)
|
|
confirmMessage=(concat "Are you sure you want to disable the " method.id " Auth Method at " method.path "?")
|
|
showConfirm=(get this (concat "shouldDelete-" (dot-to-dash method.id)))
|
|
class=(if (get this (concat "shouldDelete-" (dot-to-dash method.id))) "message is-block is-warning is-outline")
|
|
containerClasses="message-body is-block"
|
|
messageClasses="is-block"
|
|
confirmButtonText="Disable"
|
|
}}
|
|
Disable
|
|
{{/confirm-action}}
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</nav>
|
|
{{/popup-menu}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/each}}
|