Files
threshold-ui/ui/desktop/app/templates/scopes/scope/authenticate.hbs
T
2024-12-04 14:16:05 -08:00

72 lines
1.9 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
{{page-title (t 'actions.authenticate')}}
<main>
<BrandedCard
@title={{t 'actions.authenticate'}}
@description={{t
'auth.descriptions.authenticating-with-org'
name=@model.scope.displayName
}}
>
<Rose::Dropdown
@text={{t 'actions.choose-different-org'}}
@icon='flight-icons/svg/org-16'
as |dropdown|
>
<dropdown.link @route='scopes.scope.authenticate' @model='global'>
{{t 'titles.global'}}
</dropdown.link>
{{#each this.sortedScopes as |scope|}}
<dropdown.link @route='scopes.scope.authenticate' @model={{scope.id}}>
{{scope.displayName}}
</dropdown.link>
{{/each}}
</Rose::Dropdown>
<Rose::Nav::Tabs as |nav|>
{{#each @model.authMethods as |authMethod|}}
<nav.link
@route='scopes.scope.authenticate.method'
@model={{authMethod.id}}
>
{{#if authMethod.name}}
{{authMethod.name}}
{{else}}
{{t (concat 'resources.auth-method.types.' authMethod.type)}}
{{/if}}
</nav.link>
{{/each}}
</Rose::Nav::Tabs>
{{#if @model.authMethods}}
{{outlet}}
{{/if}}
{{#unless @model.authMethods}}
<Rose::Layout::Centered>
<Hds::ApplicationState data-test-no-auth-methods as |A|>
<A.Header
@icon='alert-circle'
@title={{t 'resources.auth-method.messages.none.title'}}
/>
<A.Body
@text={{t 'resources.auth-method.messages.none.description'}}
/>
</Hds::ApplicationState>
</Rose::Layout::Centered>
{{/unless}}
<p class='change-origin'>
{{t 'cluster-url.connected-to'}}:
<code>{{this.clusterUrl}}</code>
<br />
<LinkTo @route='cluster-url'>
{{t 'actions.change-cluster-url'}}
</LinkTo>
</p>
</BrandedCard>
</main>