Files
threshold-ui/ui/admin/app/templates/scopes/scope/credential-stores/index.hbs
T
Amy Lam aa5b813791 Ran a find and replace
New namespacing. `flight-icons/` replace with `flight-icons/svg/`
2021-09-16 14:24:38 -07:00

121 lines
3.8 KiB
Handlebars

<Rose::Layout::Page as |page|>
<page.breadcrumbs>
<BreadCrumbs />
</page.breadcrumbs>
<page.header>
<h2>
{{t 'resources.credential-store.title_plural'}}
<DocLink @doc='credential-store' @iconSize='large' />
</h2>
{{#if @model}}
<p>{{t 'resources.credential-store.description'}}</p>
{{/if}}
</page.header>
<page.actions>
{{#if (can 'create collection' this.scope collection='credential-stores')}}
{{#if @model}}
<Rose::LinkButton
@route='scopes.scope.credential-stores.new'
@style='primary'
>
{{t 'titles.new'}}
</Rose::LinkButton>
{{/if}}
{{/if}}
</page.actions>
<page.body>
{{#if @model}}
<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>
</header.row>
</table.header>
<table.body as |body|>
{{#each @model as |credentialStore|}}
<body.row as |row|>
<row.headerCell>
{{#if (can 'read model' credentialStore)}}
<LinkTo
@route='scopes.scope.credential-stores.credential-store'
@model={{credentialStore.id}}
>
{{credentialStore.displayName}}
</LinkTo>
{{else}}
{{credentialStore.displayName}}
{{/if}}
<p>{{credentialStore.description}}</p>
</row.headerCell>
<row.cell>
<Rose::Badge>{{t
(concat
'resources.credential-store.types.' credentialStore.type
)
}}</Rose::Badge>
</row.cell>
<row.cell>
<Copyable
@text={{credentialStore.id}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<code>{{credentialStore.id}}</code>
</Copyable>
</row.cell>
</body.row>
{{/each}}
</table.body>
</Rose::Table>
{{else}}
<Rose::Layout::Centered>
<Rose::Message
@title={{t 'resources.credential-store.messages.welcome.title'}}
as |message|
>
<message.description>
{{#if
(can 'list collection' this.scope collection='credential-stores')
}}
{{! can list (at least): show default welcome message}}
{{t 'resources.credential-store.description'}}
{{else if (can
'create collection' this.scope collection='credential-stores'
)}}
{{! can create (only): show create-but-not-list welcome message}}
{{t
'descriptions.create-but-not-list'
resource=(t 'resources.credential-store.title_plural')
}}
{{else}}
{{! can neither list nor create }}
{{t
'descriptions.neither-list-nor-create'
resource=(t 'resources.user.title_plural')
}}
{{/if}}
</message.description>
{{#if
(can 'create collection' this.scope collection='credential-stores')
}}
<message.link @route='scopes.scope.credential-stores.new'>
<Rose::Icon @name='flight-icons/svg/plus-circle-16' />
{{t 'titles.new'}}
</message.link>
{{/if}}
</Rose::Message>
</Rose::Layout::Centered>
{{/if}}
</page.body>
</Rose::Layout::Page>