* refactor: 💡 use hds::applicationstate instead of rose::message ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-15639
68 lines
1.8 KiB
Handlebars
68 lines
1.8 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{#if this.hasAvailableHostSets}}
|
|
<Rose::Form
|
|
class='full-width'
|
|
@onSubmit={{this.submit}}
|
|
@cancel={{@cancel}}
|
|
@disabled={{@model.isSaving}}
|
|
as |form|
|
|
>
|
|
|
|
<form.actions
|
|
@submitText={{t 'resources.target.actions.add-host-sources'}}
|
|
@cancelText={{t 'actions.cancel'}}
|
|
/>
|
|
|
|
<Hds::Table
|
|
@model={{this.filteredHostSets}}
|
|
@columns={{array
|
|
(hash label=(t 'form.id.label'))
|
|
(hash label=(t 'form.name.label'))
|
|
(hash label=(t 'form.type.label'))
|
|
(hash label=(t 'resources.host-catalog.title'))
|
|
}}
|
|
@valign='middle'
|
|
>
|
|
<:body as |B|>
|
|
<B.Tr>
|
|
<B.Td>
|
|
<Hds::Form::Checkbox::Field
|
|
{{on 'change' (fn this.toggleHostSet B.data.id)}}
|
|
as |F|
|
|
>
|
|
<F.Label>{{B.data.id}}</F.Label>
|
|
<F.HelperText>{{B.data.description}}</F.HelperText>
|
|
</Hds::Form::Checkbox::Field>
|
|
</B.Td>
|
|
<B.Td>{{B.data.name}}</B.Td>
|
|
<B.Td><HostCatalogTypeBadge @model={{B.data}} /></B.Td>
|
|
<B.Td><code>{{B.data.host_catalog_id}}</code></B.Td>
|
|
</B.Tr>
|
|
</:body>
|
|
</Hds::Table>
|
|
</Rose::Form>
|
|
{{/if}}
|
|
|
|
{{#unless this.hasAvailableHostSets}}
|
|
<Rose::Layout::Centered>
|
|
<Hds::ApplicationState as |A|>
|
|
<A.Header
|
|
@title={{t 'resources.target.host-source.messages.none.title'}}
|
|
/>
|
|
<A.Body
|
|
@text={{t 'resources.target.host-source.messages.none.description'}}
|
|
/>
|
|
<A.Footer as |F|>
|
|
<F.LinkStandalone
|
|
@icon='arrow-left'
|
|
@text={{t 'actions.back'}}
|
|
@route='scopes.scope.targets.target.host-sources'
|
|
/>
|
|
</A.Footer>
|
|
</Hds::ApplicationState>
|
|
</Rose::Layout::Centered>
|
|
{{/unless}} |