Files
threshold-ui/ui/admin/app/templates/scopes/scope/targets/target/injected-application-credential-sources.hbs
T
hashicorp-copywrite[bot]andCameron Perera 3d610427d0 [COMPLIANCE] Add Copyright and License Headers (#1617)
* [COMPLIANCE] Add Copyright and License Headers

* chore: 🤖 update Copyright headers to satisfy our lint rules

---------

Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
Co-authored-by: Cameron Perera <cameron.perera@hashicorp.com>
2023-03-01 09:39:41 -06:00

148 lines
5.0 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{page-title
(t 'resources.target.injected-application-credential-source.title_plural')
}}
<Rose::Layout::Page as |page|>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.header>
<Targets::Target::Header @model={{@model}} />
</page.header>
<page.navigation>
<Targets::Target::Nav @model={{@model}} />
</page.navigation>
<page.actions>
<Targets::Target::Actions @model={{@model}} />
</page.actions>
<page.body>
{{#if @model.injectedApplicationCredentialSources}}
<Rose::Table as |table|>
<table.header as |header|>
<header.row as |row|>
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
<row.headerCell>{{t 'form.type.label'}}</row.headerCell>
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
<row.headerCell>{{t 'titles.actions'}}</row.headerCell>
</header.row>
</table.header>
<table.body as |body|>
{{#each
@model.injectedApplicationCredentialSources
as |injectedApplicationCredentialSource|
}}
<body.row as |row|>
<row.headerCell>
{{#if injectedApplicationCredentialSource.isUnknown}}
{{injectedApplicationCredentialSource.displayName}}
{{else}}
{{#if injectedApplicationCredentialSource.isStatic}}
<LinkTo
@route='scopes.scope.credential-stores.credential-store.credentials.credential'
@models={{array
injectedApplicationCredentialSource.credential_store_id
injectedApplicationCredentialSource.id
}}
>
{{injectedApplicationCredentialSource.displayName}}
</LinkTo>
{{else}}
<LinkTo
@route='scopes.scope.credential-stores.credential-store.credential-libraries.credential-library'
@models={{array
injectedApplicationCredentialSource.credential_store_id
injectedApplicationCredentialSource.id
}}
>
{{injectedApplicationCredentialSource.displayName}}
</LinkTo>
{{/if}}
{{/if}}
<p>{{injectedApplicationCredentialSource.description}}</p>
</row.headerCell>
<row.cell>
<CredSourceTypeBadge
@model={{injectedApplicationCredentialSource}}
/>
</row.cell>
<row.cell>
<Copyable
@text={{injectedApplicationCredentialSource.id}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<code>{{injectedApplicationCredentialSource.id}}</code>
</Copyable>
</row.cell>
<row.cell>
{{#if (can 'removeCredentialSources target' @model)}}
<Rose::Dropdown
@icon='flight-icons/svg/more-horizontal-16'
@iconOnly={{true}}
@showCaret={{false}}
@dropdownRight={{true}}
@text={{t 'actions.manage'}}
as |dropdown|
>
<dropdown.button
@style='danger'
{{on
'click'
(route-action
'removeInjectedApplicationCredentialSource'
@model
injectedApplicationCredentialSource
)
}}
>
{{t 'actions.remove'}}
</dropdown.button>
</Rose::Dropdown>
{{/if}}
</row.cell>
</body.row>
{{/each}}
</table.body>
</Rose::Table>
{{else}}
<Rose::Layout::Centered>
<Rose::Message
@title={{t
'resources.target.injected-application-credential-source.messages.welcome.title'
}}
as |message|
>
<message.description>
{{t
'resources.target.injected-application-credential-source.messages.welcome.description'
}}
</message.description>
<message.link
@route='scopes.scope.targets.target.add-injected-application-credential-sources'
>
<Rose::Icon @name='flight-icons/svg/plus-circle-16' />
{{t
'resources.target.actions.add-injected-application-credential-sources'
}}
</message.link>
</Rose::Message>
</Rose::Layout::Centered>
{{/if}}
</page.body>
</Rose::Layout::Page>