716f25162a
* add initial Confirm component to secrets list page * use ember-wormholes to render confirmation message * use maybe-in-element instead of ember-wormhole * hide overlay initially * animate confirm overlay left and right on click * hide overlay in the DOM to properly set height * adjust height when showing/hiding confirm-overlay * disable confirmation buttons until trigger has been rendered * adjust height of confirm-wrapper instead of confirm * move Confirm/ to core * only add style attribute when a height property exists * fix indentation * wip - use new Confirm inside status menu * add Confirm to Storybook * ensure confirm links have proper styling in Storybook and outside popup-menu * fix height transition * disable no-inline-styles * add test selector * remove comment * consolidate Message into Trigger to make Confirm easier to use * use new Trigger API in status menu * remove height transition * fix binding inline style warning * rename confirmMessage to message * update Confirm for Storybook * fix indentation * do not pass in onCancel from outer template because it is static * add jsdoc comments to Trigger * wip - add trigger and confirm to storybook * fix status menu styling * fix styling of confirm stories * use new Confirm on secrets engine list * use bulma speed variable * fix indentation * re-renable eslint no-inline-styles * showConfirm when rendered trigger matches id * fix background color on namespace picker * do not expose onTrigger * Revert "re-renable eslint no-inline-styles" This reverts commit c7b2a9097f177a2876afaaec6020f73b07bad3c7. * rename Confirm Trigger to Message * add tests * update JSDocs * focus trigger after cancelling the confirm message * update Confirm JSDocs * differentiate between ConfirmAction and Confirm * add Message to Storybook * re-enable eslint import/extensions * update confirmButtonText to Revoke token * remove linebreak and extra whitespace * fix typo * add loading to empty button * fix more typos * only show Message contents when showConfirm is true * no need to disable the confirm buttons since they only render in the DOM when showConfirm is true * use Confirm to delete aws roles * use Confirm to delete pki roles * use Confirm to delete ssh roles * add Confirm to entity alias page * fix confirm button text on Revoke token in status menu * ensure you can use tab to revoke a token from status menu * reset the open trigger after the confirm has been confirmed * use Confirm on identity list pages * fix Disable engine confirmation text * use <PopupMenu /> angle brack syntax * use Confirm on policies list page * use Confirm for namespaces * use Confirm for kmip scopes * use Confirm for deleting kmip roles * use Confirm for revoking KMIP credentials * fix Revoke token triggerText
94 lines
3.3 KiB
Handlebars
94 lines
3.3 KiB
Handlebars
<HeaderScope />
|
|
<Toolbar>
|
|
{{#if model.meta.total}}
|
|
<ToolbarFilters>
|
|
<NavigateInput
|
|
@filterFocusDidChange={{action "setFilterFocus" }}
|
|
@filterDidChange={{action "setFilter"}}
|
|
@filter={{this.filter}}
|
|
@filterMatchesKey={{filterMatchesKey}}
|
|
@firstPartialMatch={{firstPartialMatch}}
|
|
@placeholder="Filter scopes by name"
|
|
@urls={{hash
|
|
create="vault.cluster.secrets.backend.kmip.scopes.create"
|
|
list="vault.cluster.secrets.backend.kmip.scopes.index"
|
|
show="vault.cluster.secrets.backend.kmip.scope.roles"
|
|
}}
|
|
/>
|
|
{{#if filterFocused}}
|
|
{{#if filterMatchesKey}}
|
|
<p class="input-hint">
|
|
<kbd>ENTER</kbd> to go to <code>{{this.filter}}</code>
|
|
</p>
|
|
{{/if}}
|
|
{{#if firstPartialMatch}}
|
|
<p class="input-hint">
|
|
<kbd>TAB</kbd> to complete <code>{{firstPartialMatch.id}}</code>
|
|
</p>
|
|
{{/if}}
|
|
{{/if}}
|
|
</ToolbarFilters>
|
|
{{/if}}
|
|
<ToolbarActions>
|
|
<ToolbarLink
|
|
@type="add"
|
|
@params={{array "scopes.create"}}
|
|
data-test-scope-create
|
|
>
|
|
Create scope
|
|
</ToolbarLink>
|
|
</ToolbarActions>
|
|
</Toolbar>
|
|
<ListView @items={{model}} @itemNoun="scope" @paginationRouteName="scopes.index" as |list|>
|
|
{{#if list.empty}}
|
|
<list.empty
|
|
@title="KMIP Secrets Engine"
|
|
@message="First, let's create a scope that our roles and credentials will belong to. A client can only access objects within their role's scope."
|
|
>
|
|
{{#link-to "scopes.create"}}
|
|
Create a scope
|
|
{{/link-to}}
|
|
</list.empty>
|
|
{{else if list.item}}
|
|
<ListItem @linkPrefix={{this.mountPoint}} @linkParams={{array "scope.roles" list.item.id}} as |Item|>
|
|
<Item.content>
|
|
<Icon @glyph="folder-outline" class="has-text-grey-light" @size="l" />{{list.item.id}}
|
|
</Item.content>
|
|
<Item.menu as |m|>
|
|
<li class="action">
|
|
{{#link-to "scope" list.item.id class="is-block"}}
|
|
View scope
|
|
{{/link-to}}
|
|
</li>
|
|
{{#if list.item.updatePath.canDelete}}
|
|
<MenuLoader @loadingParam={{list.item.updatePath.isPending}}>
|
|
<m.Message
|
|
@id={{list.item.id}}
|
|
@triggerText='Delete scope'
|
|
@title={{concat "Delete scope " list.item.id "?"}}
|
|
@message="This will permanently delete this scope and all roles and credentials contained within"
|
|
@cancelButtonText="Cancel"
|
|
@onConfirm={{action
|
|
(perform
|
|
Item.callMethod
|
|
"destroyRecord"
|
|
list.item
|
|
(concat "Successfully deleted scope " list.item.id)
|
|
(concat "There was an error deleting the scope " list.item.id)
|
|
(action "refresh")
|
|
)
|
|
}}
|
|
data-test-scope-delete="true" />
|
|
</MenuLoader>
|
|
{{/if}}
|
|
</Item.menu>
|
|
</ListItem>
|
|
{{else}}
|
|
<ListItem as |Item|>
|
|
<Item.content>
|
|
There are no scopes that match {{this.filter}}, press <kbd>ENTER</kbd> to add one.
|
|
</Item.content>
|
|
</ListItem>
|
|
{{/if}}
|
|
</ListView>
|