mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-13 14:51:34 +01:00
* replace confirm-action dropdown with button+modal * add modal frame to sidebar * fix weird paragraph indent * pass button text as arg * add warning color to rotate modals * update seal action and config ssh * cleanup confirm action * edit form * add dropdown arg * put back seal text * put back confirm button text * fix toolbar stylinggp * popup member group * move up title * finish popup- components * keymgmt * fix modal button logic * remaining app template components * add period for angel * vault cluster items * add button text assertion * remaining instances * remove arg for passing confirm text * contextual confirm action components * delete old components * update docs * ammend dropdown loading states, add getter for confirm button color * address feedback * remove @disabled arg and add @disabledMessage * add changelog; * mfa tests * update test selectors * lol cleanup selectors * start confirm action tests WIP * move dropdown class directly to component * add default color of isInDropdown * final cleanup * add tests * remove @buttonColor as arg for dropdown * update confirm action tests * updae modals with disabled message * refactor provider edit test
83 lines
2.5 KiB
Handlebars
83 lines
2.5 KiB
Handlebars
{{!
|
||
Copyright (c) HashiCorp, Inc.
|
||
SPDX-License-Identifier: BUSL-1.1
|
||
~}}
|
||
|
||
<TabPageHeader
|
||
@model={{@backend}}
|
||
@filterRoles={{not @promptConfig}}
|
||
@rolesFilterValue={{@filterValue}}
|
||
@breadcrumbs={{@breadcrumbs}}
|
||
>
|
||
{{#unless @promptConfig}}
|
||
<ToolbarLink @route="roles.create" @type="add" data-test-toolbar-roles-action>
|
||
Create role
|
||
</ToolbarLink>
|
||
{{/unless}}
|
||
</TabPageHeader>
|
||
|
||
{{#if @promptConfig}}
|
||
<ConfigCta />
|
||
{{else if (not @roles)}}
|
||
{{#if @filterValue}}
|
||
<EmptyState @title="There are no roles matching "{{@filterValue}}"" />
|
||
{{else}}
|
||
<EmptyState
|
||
data-test-config-cta
|
||
@title="No roles yet"
|
||
@message="When created, roles will be listed here. Create a role to start generating service account tokens."
|
||
>
|
||
<LinkTo class="has-top-margin-xs" @route="roles.create">
|
||
Create role
|
||
</LinkTo>
|
||
</EmptyState>
|
||
{{/if}}
|
||
{{else}}
|
||
<div class="has-bottom-margin-s">
|
||
{{#each @roles as |role|}}
|
||
<ListItem @linkPrefix={{this.mountPoint}} @linkParams={{array "roles.role.details" role.name}} as |Item|>
|
||
<Item.content>
|
||
<Icon @name="user" />
|
||
<span data-test-role={{role.name}}>{{role.name}}</span>
|
||
</Item.content>
|
||
<Item.menu>
|
||
{{#if role.rolesPath.isLoading}}
|
||
<li class="action">
|
||
<Hds::Button disabled @color="tertiary" @icon="loading" @text="loading" @isIconOnly={{true}} />
|
||
</li>
|
||
{{else}}
|
||
<li class="action">
|
||
<LinkTo
|
||
class="has-text-black has-text-weight-semibold"
|
||
data-test-details
|
||
@route="roles.role.details"
|
||
@model={{role}}
|
||
@disabled={{eq role.canRead false}}
|
||
>
|
||
Details
|
||
</LinkTo>
|
||
</li>
|
||
<li class="action">
|
||
<LinkTo
|
||
class="has-text-black has-text-weight-semibold"
|
||
data-test-edit
|
||
@route="roles.role.edit"
|
||
@model={{role}}
|
||
@disabled={{not role.canEdit}}
|
||
>
|
||
Edit
|
||
</LinkTo>
|
||
</li>
|
||
<ConfirmAction
|
||
data-test-delete
|
||
@isInDropdown={{true}}
|
||
@buttonText="Delete"
|
||
@confirmMessage="Deleting this role means that you’ll need to recreate it in order to generate credentials again."
|
||
@onConfirmAction={{fn this.onDelete role}}
|
||
/>
|
||
{{/if}}
|
||
</Item.menu>
|
||
</ListItem>
|
||
{{/each}}
|
||
</div>
|
||
{{/if}} |