Files
threshold-ui/ui/desktop/app/components/target/host-modal/index.hbs
T
Zack Moore 6eb83b2a25 Upgrade HDS dependency to 4.13 & migrate FlightIcon to Hds::Icon (#2540)
* updated hds and replaced deprecated flight-icon

* removed code trying to import from ember-flight-icons

* fixing linting issue

* fixing linting issue

* fixing dropdown test selectors

* updated dropdown selectors

* updated dropdown selectors

* updated dropdown selectors

* addressing pr feedback

* fixing linting error

* updating dropdown selectors
2024-11-04 11:29:56 -06:00

77 lines
2.4 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
{{#if @showModal}}
<Hds::Modal data-test-host-modal @onClose={{fn @toggleModal false}} as |M|>
<M.Header @tagline={{@target.displayName}}>
{{t 'resources.session.actions.host'}}
</M.Header>
<M.Body>
<ul class='host-list-container'>
{{#each @hosts as |host|}}
<li class='host-container'>
<button
data-test-host-connect
type='button'
{{on 'click' (fn @connect @target host)}}
>
<div class='host-info-container'>
<Hds::IconTile
@color='boundary'
@icon='network-alt'
@size='small'
/>
<div class='host-info'>
<p
class='hds-typography-body-200 hds-font-weight-semibold hds-foreground-primary'
>
{{host.displayName}}
</p>
{{#if host.isStatic}}
<p class='hds-typography-body-100 hds-foreground-faint'>
{{host.address}}
</p>
{{/if}}
{{#if host.isPlugin}}
{{#if host.isUnknown}}
<Hds::Badge
@text={{t 'resources.host-catalog.types.unknown'}}
/>
{{else}}
<Hds::Badge
@text={{t 'resources.host-catalog.types.plugin'}}
@icon={{host.plugin.name}}
/>
{{/if}}
{{/if}}
{{#if host.description}}
<p class='hds-typography-body-100 hds-foreground-faint'>
{{host.description}}
</p>
{{/if}}
</div>
</div>
<Hds::Icon
class='host-arrow'
@name='arrow-right'
@isInline={{true}}
/>
</button>
</li>
{{/each}}
</ul>
</M.Body>
<M.Footer>
<Hds::Button
data-test-host-quick-connect
type='button'
@icon='entry-point'
@iconPosition='trailing'
@text={{t 'resources.session.actions.quick-connect'}}
{{on 'click' (fn @connect @target)}}
/>
</M.Footer>
</Hds::Modal>
{{/if}}