* refactor: 💡 update _typography stylesheet ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 update header margin styles into single rule ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 add remove-header-margin class ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 remove 'header' class ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * test: 💍 fix failing tests for branded-card in desktop ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 update style rule to use :where() ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 rename remove-header-margin to remove-margin ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937 * refactor: 💡 update style comment ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-11937
123 lines
3.5 KiB
Handlebars
123 lines
3.5 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{page-title (t 'resources.role.principal.title_plural')}}
|
|
<Breadcrumbs::Item
|
|
@text={{t 'resources.role.principal.title_plural'}}
|
|
@route='scopes.scope.roles.role.principals'
|
|
/>
|
|
|
|
<Rose::Layout::Page as |page|>
|
|
|
|
<page.breadcrumbs>
|
|
<Breadcrumbs::Container />
|
|
</page.breadcrumbs>
|
|
|
|
<page.header>
|
|
<Hds::Text::Display @tag='h2' @size='400' @weight='bold'>
|
|
{{t 'resources.role.title'}}
|
|
<DocLink @doc='role' />
|
|
</Hds::Text::Display>
|
|
<Hds::Text::Body @tag='p' @size='300' class='p'>
|
|
{{t 'resources.role.principal.description'}}
|
|
</Hds::Text::Body>
|
|
<Hds::Copy::Snippet @textToCopy={{@model.role.id}} @color='secondary' />
|
|
</page.header>
|
|
|
|
<page.actions>
|
|
<Roles::Role::Actions
|
|
@model={{@model.role}}
|
|
@delete={{this.roles.delete}}
|
|
/>
|
|
</page.actions>
|
|
|
|
<page.navigation>
|
|
<Roles::Role::Nav @model={{@model.role}} />
|
|
</page.navigation>
|
|
|
|
<page.body>
|
|
{{#if @model.principals}}
|
|
|
|
<Hds::Table
|
|
@model={{@model.principals}}
|
|
@columns={{array
|
|
(hash label=(t 'form.name.label'))
|
|
(hash label=(t 'form.id.label'))
|
|
(hash label=(t 'form.type.label'))
|
|
(hash label=(t 'resources.scope.title'))
|
|
(hash label=(t 'titles.actions'))
|
|
}}
|
|
@valign='middle'
|
|
>
|
|
<:body as |B|>
|
|
<B.Tr>
|
|
<B.Td>
|
|
{{#if (can 'readPrincipal role' B.data)}}
|
|
<LinkToPrincipal @model={{B.data}} />
|
|
{{else}}
|
|
{{B.data.displayName}}
|
|
{{/if}}
|
|
{{#if B.data.accountName}}
|
|
<br /><Hds::Badge @text={{B.data.accountName}} />
|
|
{{/if}}
|
|
</B.Td>
|
|
<B.Td>
|
|
<Hds::Copy::Snippet
|
|
@textToCopy={{B.data.id}}
|
|
@color='secondary'
|
|
/>
|
|
</B.Td>
|
|
<B.Td>
|
|
<PrincipalTypeBadge @model={{B.data}} />
|
|
</B.Td>
|
|
<B.Td>
|
|
<ScopeBadge @scope={{B.data.scopeModel}} />
|
|
</B.Td>
|
|
<B.Td>
|
|
{{#if (can 'removePrincipals role' @model.role)}}
|
|
<Hds::Dropdown as |dd|>
|
|
<dd.ToggleIcon
|
|
@icon='more-horizontal'
|
|
@text={{t 'actions.manage'}}
|
|
@hasChevron={{false}}
|
|
/>
|
|
<dd.Interactive
|
|
@color='critical'
|
|
{{on
|
|
'click'
|
|
(fn this.roles.removePrincipal @model.role B.data)
|
|
}}
|
|
>{{t 'actions.remove'}}</dd.Interactive>
|
|
</Hds::Dropdown>
|
|
{{/if}}
|
|
</B.Td>
|
|
</B.Tr>
|
|
</:body>
|
|
</Hds::Table>
|
|
|
|
{{else}}
|
|
|
|
<Rose::Layout::Centered>
|
|
<Hds::ApplicationState as |A|>
|
|
<A.Header
|
|
@title={{t 'resources.role.principal.messages.welcome.title'}}
|
|
/>
|
|
<A.Body
|
|
@text={{t 'resources.role.principal.messages.welcome.description'}}
|
|
/>
|
|
<A.Footer as |F|>
|
|
<F.LinkStandalone
|
|
@icon='plus-circle'
|
|
@text={{t 'resources.role.principal.actions.add-principals'}}
|
|
@route='scopes.scope.roles.role.add-principals'
|
|
/>
|
|
</A.Footer>
|
|
</Hds::ApplicationState>
|
|
</Rose::Layout::Centered>
|
|
|
|
{{/if}}
|
|
</page.body>
|
|
|
|
</Rose::Layout::Page> |