diff --git a/addons/api/mirage/generated/factories/account.js b/addons/api/mirage/generated/factories/account.js index 55bd0df37..d5fc37352 100644 --- a/addons/api/mirage/generated/factories/account.js +++ b/addons/api/mirage/generated/factories/account.js @@ -12,6 +12,7 @@ import { TYPE_AUTH_METHOD_PASSWORD } from 'api/models/auth-method'; */ export default Factory.extend({ type: TYPE_AUTH_METHOD_PASSWORD, + description: () => faker.random.words(), created_time: () => faker.date.recent(), updated_time: () => faker.date.recent(), version: () => faker.datatype.number(), diff --git a/addons/api/mirage/scenarios/ipc.js b/addons/api/mirage/scenarios/ipc.js index f9510141f..64895210e 100644 --- a/addons/api/mirage/scenarios/ipc.js +++ b/addons/api/mirage/scenarios/ipc.js @@ -172,10 +172,12 @@ export default function initializeMockIPC(server, config) { /** * Do nothing when attempting to minimize, toggle fullscreen, * and close a browser window + * * Do nothing when canceling a session invokes the stop method */ minimizeWindow() {} closeWindow() {} toggleFullscreenWindow() {} + stop() {} } /** diff --git a/ui/admin/app/components/form/auth-method/oidc/index.hbs b/ui/admin/app/components/form/auth-method/oidc/index.hbs index 1a089a85d..b4ce7cdee 100644 --- a/ui/admin/app/components/form/auth-method/oidc/index.hbs +++ b/ui/admin/app/components/form/auth-method/oidc/index.hbs @@ -81,15 +81,24 @@ {{/if}} - + as |F| + > + {{t 'form.disable_discovered_config_validation.label'}} + + {{t 'form.disable_discovered_config_validation.help'}} + + - + {{t + 'resources.credential-store.form.tls_skip_verify.label' + }} + {{t + 'resources.credential-store.form.tls_skip_verify.help' + }} {{#if @model.errors.tls_skip_verify}} - + {{#each @model.errors.tls_skip_verify as |error|}} - {{error.message}} + {{error.message}} {{/each}} - + {{/if}} - + - + + {{t 'form.disable_credential_rotation.label'}} +   diff --git a/ui/admin/app/components/form/host-catalog/azure/index.hbs b/ui/admin/app/components/form/host-catalog/azure/index.hbs index 697a7b385..41dc5a79c 100644 --- a/ui/admin/app/components/form/host-catalog/azure/index.hbs +++ b/ui/admin/app/components/form/host-catalog/azure/index.hbs @@ -147,13 +147,15 @@ readonly={{false}} /> - + + {{t 'form.disable_credential_rotation.label'}} + {{t 'form.disable_credential_rotation.help'}} + {{#if (can 'save model' @model)}} - - - - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'form.id.label'}} - - - - {{#each this.filteredHosts as |host|}} - - - - - {{host.name}} - - - - - {{/each}} - - - + + <:body as |B|> + + + + {{B.data.id}} + {{B.data.description}} + + + {{B.data.name}} + + + + {{/if}} diff --git a/ui/admin/app/components/form/host-set/add-hosts/index.js b/ui/admin/app/components/form/host-set/add-hosts/index.js index 9ae92afa4..485d74c1c 100644 --- a/ui/admin/app/components/form/host-set/add-hosts/index.js +++ b/ui/admin/app/components/form/host-set/add-hosts/index.js @@ -41,14 +41,14 @@ export default class FormHostSetAddHostsIndexComponent extends Component { /** * Toggle host selection - * @param {HostModel} host + * @param {string} hostId */ @action - toggleHost(host) { - if (!this.selectedHostIDs.includes(host.id)) { - this.selectedHostIDs.addObject(host.id); + toggleHost(hostId) { + if (!this.selectedHostIDs.includes(hostId)) { + this.selectedHostIDs.addObject(hostId); } else { - this.selectedHostIDs.removeObject(host.id); + this.selectedHostIDs.removeObject(hostId); } } diff --git a/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs index 12df09c5d..7d660564b 100644 --- a/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs +++ b/ui/admin/app/components/form/target/add-brokered-credential-sources/index.hbs @@ -15,30 +15,29 @@ @cancelText={{t 'actions.cancel'}} /> - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - - - - {{#each @filteredCredentialSources as |credentialSource|}} - - - - - {{credentialSource.name}} - - - - - {{/each}} - - + + <:body as |B|> + + + + {{B.data.id}} + {{B.data.description}} + + + {{B.data.name}} + + + + \ No newline at end of file diff --git a/ui/admin/app/components/form/target/add-host-sets/index.hbs b/ui/admin/app/components/form/target/add-host-sets/index.hbs index 5fbb56402..1d50ae146 100644 --- a/ui/admin/app/components/form/target/add-host-sets/index.hbs +++ b/ui/admin/app/components/form/target/add-host-sets/index.hbs @@ -17,37 +17,33 @@ @cancelText={{t 'actions.cancel'}} /> - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'resources.host-catalog.title'}} - - - - {{#each this.filteredHostSets as |hostSet|}} - - - - - {{hostSet.name}} - - - - - {{hostSet.host_catalog_id}} - - - {{/each}} - - - + + <:body as |B|> + + + + {{B.data.id}} + {{B.data.description}} + + + {{B.data.name}} + + {{B.data.host_catalog_id}} + + + {{/if}} diff --git a/ui/admin/app/components/form/target/add-host-sets/index.js b/ui/admin/app/components/form/target/add-host-sets/index.js index d8d2ced62..181d5012b 100644 --- a/ui/admin/app/components/form/target/add-host-sets/index.js +++ b/ui/admin/app/components/form/target/add-host-sets/index.js @@ -52,12 +52,16 @@ export default class FormTargetAddHostSetsComponent extends Component { // =actions + /** + * Add/Remove host set to current selection + * @param {string} hostSetId + */ @action - toggleHostSet(hostSet) { - if (!this.selectedHostSetIDs.includes(hostSet.id)) { - this.selectedHostSetIDs.addObject(hostSet.id); + toggleHostSet(hostSetId) { + if (!this.selectedHostSetIDs.includes(hostSetId)) { + this.selectedHostSetIDs.addObject(hostSetId); } else { - this.selectedHostSetIDs.removeObject(hostSet.id); + this.selectedHostSetIDs.removeObject(hostSetId); } } diff --git a/ui/admin/app/components/form/target/add-injected-application-credential-sources/index.hbs b/ui/admin/app/components/form/target/add-injected-application-credential-sources/index.hbs index f3f16d8b6..20c9e5fdd 100644 --- a/ui/admin/app/components/form/target/add-injected-application-credential-sources/index.hbs +++ b/ui/admin/app/components/form/target/add-injected-application-credential-sources/index.hbs @@ -17,30 +17,29 @@ @cancelText={{t 'actions.cancel'}} /> - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - - - - {{#each @filteredCredentialSources as |credentialSource|}} - - - - - {{credentialSource.name}} - - - - - {{/each}} - - + + <:body as |B|> + + + + {{B.data.id}} + {{B.data.description}} + + + {{B.data.name}} + + + + \ No newline at end of file diff --git a/ui/admin/app/components/form/user/add-accounts/index.hbs b/ui/admin/app/components/form/user/add-accounts/index.hbs index 8c9c852cc..cab52b23e 100644 --- a/ui/admin/app/components/form/user/add-accounts/index.hbs +++ b/ui/admin/app/components/form/user/add-accounts/index.hbs @@ -17,41 +17,37 @@ @cancelText={{t 'actions.cancel'}} /> - - - - {{t 'form.id.label'}} - {{t 'form.name.label'}} - {{t 'form.type.label'}} - {{t 'resources.auth-method.title'}} - - - - {{#each this.filteredAccounts as |account|}} - - - - {{account.id}} - {{account.description}} - - - {{account.accountName}} - - - - - {{account.auth_method_id}} - - - {{/each}} - - - + + <:body as |B|> + + + + {{B.data.id}} + {{B.data.description}} + + + {{B.data.accountName}} + + + + {{B.data.auth_method_id}} + + + {{/if}} diff --git a/ui/admin/app/components/form/user/add-accounts/index.js b/ui/admin/app/components/form/user/add-accounts/index.js index a111f71d2..1a53d0d11 100644 --- a/ui/admin/app/components/form/user/add-accounts/index.js +++ b/ui/admin/app/components/form/user/add-accounts/index.js @@ -43,12 +43,16 @@ export default class FormUserAddAccountsComponent extends Component { // =actions + /** + * Toggle account selection + * @param {string} accountId + */ @action - toggleAccount(account) { - if (!this.selectedAccountIDs.includes(account.id)) { - this.selectedAccountIDs.addObject(account.id); + toggleAccount(accountId) { + if (!this.selectedAccountIDs.includes(accountId)) { + this.selectedAccountIDs.addObject(accountId); } else { - this.selectedAccountIDs.removeObject(account.id); + this.selectedAccountIDs.removeObject(accountId); } } diff --git a/ui/desktop/app/routes/scopes/scope/projects/sessions.js b/ui/desktop/app/routes/scopes/scope/projects/sessions.js index a9e0032d7..fda44b87c 100644 --- a/ui/desktop/app/routes/scopes/scope/projects/sessions.js +++ b/ui/desktop/app/routes/scopes/scope/projects/sessions.js @@ -8,6 +8,7 @@ import { inject as service } from '@ember/service'; import { action } from '@ember/object'; import { notifySuccess, notifyError } from 'core/decorators/notify'; import { resourceFilter } from 'core/decorators/resource-filter'; +import { A } from '@ember/array'; export default class ScopesScopeProjectsSessionsRoute extends Route { // =services @@ -78,7 +79,7 @@ export default class ScopesScopeProjectsSessionsRoute extends Route { sessions = sessions.filter((s) => this.status.includes(s?.status)); } - return sessions; + return A(sessions); } // =actions