Secret sync modal language and link change (#25849)

* change link and language on opt-in modal

* use inline link

* move to finally in case of failure

* change to Secrets sync

* amend title

* one last
This commit is contained in:
Angel Garbarino 2024-03-08 10:35:50 -07:00 committed by GitHub
parent dbca3a00fb
commit 79c8ec4f1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View File

@ -5,7 +5,7 @@
{{#unless this.isActivated}}
<Hds::Alert @type="inline" @color="warning" data-test-secrets-sync-opt-in-banner as |A|>
<A.Title>Enable secrets sync feature</A.Title>
<A.Title>Enable Secrets Sync feature</A.Title>
<A.Description>To use this feature, specific activation is required. Please review the feature documentation and enable
it. If you're upgrading from beta, your previous data will be accessible after activation.</A.Description>
<A.Button
@ -63,7 +63,7 @@
<Hds::Link::Standalone
@icon="docs-link"
@iconPosition="trailing"
@text="Secrets sync association API docs"
@text="Secrets Sync association API docs"
@href={{doc-link "/vault/api-docs/system/secrets-sync#read-associations"}}
/>
</EmptyState>
@ -180,13 +180,16 @@
{{#if this.showActivateSecretsSyncModal}}
<Hds::Modal @onClose={{fn (mut this.showActivateSecretsSyncModal) false}} data-test-secrets-sync-opt-in-modal as |M|>
<M.Header @icon="alert-triangle">
Enable secrets sync feature
Enable Secrets Sync feature
</M.Header>
<M.Body>
<p class="has-bottom-margin-m">
Before using this feature, we want to make sure youve carefully read the document around the billing and client
count impact.
<DocLink @path="/vault/docs/sync">Docs here.</DocLink>
By enabling the Secrets Sync feature you may incur additional costs. Please review our
<Hds::Link::Inline
@isHrefExternal={{true}}
@href={{doc-link "/hcp/docs/vault/client"}}
>documentation</Hds::Link::Inline>
to learn more.
</p>
<Hds::Form::Checkbox::Field {{on "change" this.onDocsConfirmChange}} data-test-opt-in-check as |F|>
<F.Label>I've read the above linked document</F.Label>

View File

@ -79,10 +79,11 @@ export default class SyncSecretsDestinationsPageComponent extends Component<Args
yield this.store
.adapterFor('application')
.ajax('/v1/sys/activation-flags/secrets-sync/activate', 'POST');
this.showActivateSecretsSyncModal = false;
this.router.transitionTo('vault.cluster.sync.secrets.overview');
} catch (error) {
this.flashMessages.danger(`Error enabling feature \n ${errorMessage(error)}`);
} finally {
this.showActivateSecretsSyncModal = false;
}
}
}