2023-03-01 09:39:41 -06:00
|
|
|
{{!
|
|
|
|
|
Copyright (c) HashiCorp, Inc.
|
|
|
|
|
SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
}}
|
|
|
|
|
|
2020-10-28 14:17:55 -04:00
|
|
|
{{#if this.hasAvailableHostSets}}
|
|
|
|
|
<Rose::Form
|
2021-05-11 14:13:24 -04:00
|
|
|
class='full-width'
|
2023-01-17 15:00:43 -05:00
|
|
|
@onSubmit={{this.submit}}
|
2020-10-28 14:17:55 -04:00
|
|
|
@cancel={{@cancel}}
|
|
|
|
|
@disabled={{@model.isSaving}}
|
|
|
|
|
as |form|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<form.actions
|
2021-09-21 14:32:39 -04:00
|
|
|
@submitText={{t 'resources.target.actions.add-host-sources'}}
|
2021-05-11 14:13:24 -04:00
|
|
|
@cancelText={{t 'actions.cancel'}}
|
|
|
|
|
/>
|
2020-10-28 14:17:55 -04:00
|
|
|
|
|
|
|
|
<Rose::Table as |table|>
|
|
|
|
|
<table.header as |header|>
|
|
|
|
|
<header.row as |row|>
|
|
|
|
|
<row.headerCell>{{t 'form.id.label'}}</row.headerCell>
|
|
|
|
|
<row.headerCell>{{t 'form.name.label'}}</row.headerCell>
|
|
|
|
|
<row.headerCell>{{t 'form.type.label'}}</row.headerCell>
|
|
|
|
|
<row.headerCell>{{t 'resources.host-catalog.title'}}</row.headerCell>
|
|
|
|
|
</header.row>
|
|
|
|
|
</table.header>
|
|
|
|
|
<table.body as |body|>
|
|
|
|
|
{{#each this.filteredHostSets as |hostSet|}}
|
|
|
|
|
<body.row as |row|>
|
|
|
|
|
<row.cell>
|
|
|
|
|
<form.checkbox
|
|
|
|
|
@label={{hostSet.id}}
|
|
|
|
|
@description={{hostSet.description}}
|
2021-10-22 18:06:32 -04:00
|
|
|
@onChange={{fn this.toggleHostSet hostSet}}
|
2021-05-11 14:13:24 -04:00
|
|
|
/>
|
2020-10-28 14:17:55 -04:00
|
|
|
</row.cell>
|
|
|
|
|
<row.cell>{{hostSet.name}}</row.cell>
|
|
|
|
|
<row.cell>
|
2022-02-14 15:37:12 -08:00
|
|
|
<HostCatalogTypeBadge @model={{hostSet}} />
|
2020-10-28 14:17:55 -04:00
|
|
|
</row.cell>
|
|
|
|
|
<row.cell>
|
|
|
|
|
<code>{{hostSet.host_catalog_id}}</code>
|
|
|
|
|
</row.cell>
|
|
|
|
|
</body.row>
|
|
|
|
|
{{/each}}
|
|
|
|
|
</table.body>
|
|
|
|
|
</Rose::Table>
|
|
|
|
|
|
|
|
|
|
</Rose::Form>
|
|
|
|
|
{{/if}}
|
|
|
|
|
|
|
|
|
|
{{#unless this.hasAvailableHostSets}}
|
|
|
|
|
<Rose::Layout::Centered>
|
2021-05-11 14:13:24 -04:00
|
|
|
<Rose::Message
|
2021-09-21 10:57:01 -04:00
|
|
|
@title={{t 'resources.target.host-source.messages.none.title'}}
|
2021-05-11 14:13:24 -04:00
|
|
|
as |message|
|
|
|
|
|
>
|
2020-10-28 14:17:55 -04:00
|
|
|
<message.description>
|
2021-09-21 10:57:01 -04:00
|
|
|
{{t 'resources.target.host-source.messages.none.description'}}
|
2020-10-28 14:17:55 -04:00
|
|
|
</message.description>
|
2021-09-21 14:32:39 -04:00
|
|
|
<message.link @route='scopes.scope.targets.target.host-sources'>
|
2021-09-16 14:03:26 -07:00
|
|
|
<Rose::Icon @name='flight-icons/svg/chevron-left-16' />
|
2021-05-11 14:13:24 -04:00
|
|
|
{{t 'actions.back'}}
|
2020-10-28 14:17:55 -04:00
|
|
|
</message.link>
|
|
|
|
|
</Rose::Message>
|
|
|
|
|
</Rose::Layout::Centered>
|
2022-10-06 11:41:12 -04:00
|
|
|
{{/unless}}
|