Files
threshold-ui/ui/admin/app/templates/scopes/scope/targets/target/index.hbs
T
lisbet-alvarez 33af4cd7ea Icu 8801 update settings icon to link in target edit screen (#188)
* refactor: 💡 update settings icon to link in target edit screen

* style: 💄 whitespace

✅ Closes: ICU-8801

* test: 💍 remove unnecessary a11yAudit() check

* test: 💍 fix test

* refactor: 💡 fix translation

* refactor: 💡 settings link shouldn't be visible under button
2023-04-06 10:45:19 -07:00

80 lines
2.2 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
<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>
<Layout::Sidebar as |sb|>
<sb.Body>
<Form::Target
@model={{@model}}
@submit={{route-action 'saveWithAddress' @model}}
@cancel={{route-action 'cancel' @model}}
/>
</sb.Body>
{{#if
(and
(can 'setStorageBucket target' @model)
(feature-flag 'session-recording')
)
}}
<sb.Sidebar>
<div class='target-sidebar'>
<h3>{{t 'resources.target.form.sidebar.label'}}</h3>
<p class='description'>
{{t 'resources.target.form.sidebar.help'}}
</p>
{{#if @model.storage_bucket_id}}
<LinkListPanel as |P|>
<P.Item
@icon='cloud-upload'
@color='boundary'
@text={{this.storage_bucket_name}}
@route='scopes.scope.storage-buckets.storage-bucket'
@model={{@model.storage_bucket_id}}
>
<Hds::Badge
@text={{t 'resources.storage-bucket.types.aws_s3'}}
@icon='aws'
/>
</P.Item>
</LinkListPanel>
<Hds::Link::Standalone
@icon='arrow-right'
@iconPosition='trailing'
@text={{t 'resources.target.form.sidebar.link'}}
@route='scopes.scope.targets.target.enable-session-recording'
/>
{{else}}
<Hds::Button
@text={{t 'resources.target.actions.enable-recording'}}
@color='secondary'
@route='scopes.scope.targets.target.enable-session-recording'
/>
{{/if}}
</div>
</sb.Sidebar>
{{/if}}
</Layout::Sidebar>
</page.body>
</Rose::Layout::Page>