diff --git a/addons/api/mirage/factories/host.js b/addons/api/mirage/factories/host.js index 93323e965..3bf07f11a 100644 --- a/addons/api/mirage/factories/host.js +++ b/addons/api/mirage/factories/host.js @@ -2,32 +2,6 @@ import factory from '../generated/factories/host'; import permissions from '../helpers/permissions'; import { internet, datatype } from 'faker'; -/** - * Returns an array of strings with IP addresses. - * @returns {array} - */ -const returnIpAddressesArray = () => { - const addressesAmount = Math.floor(Math.random() * 6) + 1; - let result = []; - for (let i = 0; i < addressesAmount; ++i) { - result.push(internet.ip()); - } - return result; -}; - -/** - * Returns an array of strings with DNS names. - * @param {string} hostType - */ -const returnDnsNames = () => { - const dnsNamesAmount = Math.floor(Math.random() * 6) + 1; - let result = []; - for (let i = 0; i < dnsNamesAmount; i++) { - result.push(internet.domainName()); - } - return result; -}; - export default factory.extend({ id: (i) => `host-id-${i}`, type() { @@ -45,13 +19,26 @@ export default factory.extend({ return this.hostCatalog.plugin; } }, - attributes() { - return { - address: internet.ipv6(), - ip_addresses: returnIpAddressesArray(), - external_id: datatype.uuid(), - // Only aws plugins have dns_names - dns_names: this.plugin?.name === 'aws' ? returnDnsNames() : undefined, - }; + ip_addresses() { + const addressesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < addressesAmount; ++i) { + result.push(internet.ip()); + } + return result; + }, + external_id() { + return datatype.uuid(); + }, + // Only aws plugins have dns_names + dns_names() { + if (this.plugin?.name === 'aws') { + const dnsNamesAmount = Math.floor(Math.random() * 6) + 1; + let result = []; + for (let i = 0; i < dnsNamesAmount; i++) { + result.push(internet.domainName()); + } + return result; + } }, }); diff --git a/addons/api/mirage/generated/factories/host.js b/addons/api/mirage/generated/factories/host.js index 658c334bf..6b26bab0b 100644 --- a/addons/api/mirage/generated/factories/host.js +++ b/addons/api/mirage/generated/factories/host.js @@ -1,5 +1,5 @@ import { Factory } from 'ember-cli-mirage'; -import { random, date, datatype } from 'faker'; +import { random, date, datatype, internet } from 'faker'; /** * GeneratedHostModelFactory @@ -11,4 +11,7 @@ export default Factory.extend({ created_time: () => date.recent(), updated_time: () => date.recent(), version: () => datatype.number(), + attributes: () => { + return { address: internet.ipv6() }; + }, }); diff --git a/addons/core/translations/form/en-us.yaml b/addons/core/translations/form/en-us.yaml index a13b995f2..8204dce5d 100644 --- a/addons/core/translations/form/en-us.yaml +++ b/addons/core/translations/form/en-us.yaml @@ -118,7 +118,7 @@ callback_url: filter: label: Filter help: A boolean expression defining a filter run against the provided information. -tenant_id: +tenant_id: label: Tenant ID help: The tenant (directory) ID for your Azure Active Directory application. link-text: Learn more @@ -134,20 +134,22 @@ secret_access_key: label: Secret Access Key help: The subscription ID for the subscription with read access. link-text: Learn more -region: +region: label: Region provider: label: Provider Details description: This is the provider for this host catalog. The format of the host set filters are specific to each provider. - help: - client: + help: + client: label: Client ID help: The client ID for the client you want Boundary to use. link-text : Learn more - choose_a_provider: - label: Choose a provider + choose_a_provider: + label: Choose a provider description: There are several built-in plugins for the most common providers. You can choose from on of the included plugins or use a custom plugin. - filter: + filter: label: Filter help: Create a filter to select resources using values such as tag name or tag value. Filter format is specific to each provider. - link-text: Learn more about using filters for Azure resources. \ No newline at end of file + link-text: Learn more about using filters for Azure resources. +disable_credential_rotation: + label: Disable credential rotation diff --git a/ui/admin/app/components/form/host-catalog/aws/index.hbs b/ui/admin/app/components/form/host-catalog/aws/index.hbs index 71568288b..a73aea7af 100644 --- a/ui/admin/app/components/form/host-catalog/aws/index.hbs +++ b/ui/admin/app/components/form/host-catalog/aws/index.hbs @@ -13,7 +13,6 @@ @label={{t 'form.name.label'}} @helperText={{t 'form.name.help'}} @error={{@model.errors.name}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -33,7 +32,6 @@ @label={{t 'form.description.label'}} @helperText={{t 'form.description.help'}} @error={{@model.errors.description}} - disabled={{@model.isSaving}} readonly={{false}} as |field| > @@ -156,6 +154,16 @@ @link='https://learn.hashicorp.com/tutorials/boundary/cloud-host-catalogs#set-up-cloud-hosts' readonly={{false}} /> + +