[Telemetry] Highlight status in notices (#159144)

This commit is contained in:
Alejandro Fernández Haro 2023-06-09 12:19:52 +02:00 committed by GitHub
parent a8671f81c4
commit 2877a16091
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 12 deletions

View file

@ -37,7 +37,7 @@ describe('OptInMessage', () => {
});
it('claims that telemetry is enabled', () => {
expect(dom.text()).toContain('Usage collection (also known as Telemetry) is enabled.');
expect(dom.text()).toContain('Usage collection is enabled.');
});
it('offers the link to disable it', () => {
@ -65,7 +65,7 @@ describe('OptInMessage', () => {
});
it('claims that telemetry is disabled', () => {
expect(dom.text()).toContain('Usage collection (also known as Telemetry) is disabled.');
expect(dom.text()).toContain('Usage collection is disabled.');
});
it('offers the link to enable it', () => {
@ -93,7 +93,7 @@ describe('OptInMessage', () => {
});
it('claims that telemetry is disabled', () => {
expect(dom.text()).toContain('Usage collection (also known as Telemetry) is disabled.');
expect(dom.text()).toContain('Usage collection is disabled.');
});
it('offers the link to enable it', () => {

View file

@ -30,18 +30,24 @@ export const OptInMessage: React.FC<OptInMessageProps> = ({
<React.Fragment>
<FormattedMessage
id="telemetry.dataManagementDisclaimerPrivacy"
defaultMessage="Usage collection (also known as Telemetry) is {optInStatus}.
defaultMessage="{optInStatus}
This allows us to learn what our users are most interested in, so we can improve our products and services.
Refer to our {privacyStatementLink}."
values={{
optInStatus: (
<em>
<strong>
{telemetryService.isOptedIn ? (
<FormattedMessage id="telemetry.enabledStatus" defaultMessage="enabled" />
<FormattedMessage
id="telemetry.enabledStatus"
defaultMessage="Usage collection is enabled."
/>
) : (
<FormattedMessage id="telemetry.disabledStatus" defaultMessage="disabled" />
<FormattedMessage
id="telemetry.disabledStatus"
defaultMessage="Usage collection is disabled."
/>
)}
</em>
</strong>
),
privacyStatementLink: (
/* eslint-disable-next-line @elastic/eui/href-or-on-click */

View file

@ -63,7 +63,7 @@ exports[`TelemetryManagementSectionComponent renders as expected 1`] = `
"description": <React.Fragment>
<p>
<FormattedMessage
defaultMessage="Enabling usage collection (also known as Telemetry) allows us to learn what our users are most interested in, so we can improve our products and services. Refer to our {privacyStatementLink}."
defaultMessage="Enabling usage collection allows us to learn what our users are most interested in, so we can improve our products and services. Refer to our {privacyStatementLink}."
id="telemetry.telemetryConfigAndLinkDescription"
values={
Object {
@ -116,7 +116,7 @@ exports[`TelemetryManagementSectionComponent renders as expected 1`] = `
"displayName": "Share usage with Elastic",
"isCustom": true,
"isOverridden": false,
"name": "telemetry:enabled",
"name": "Usage collection",
"requiresPageReload": false,
"type": "boolean",
"value": true,

View file

@ -141,7 +141,7 @@ export class TelemetryManagementSection extends Component<Props, State> {
<LazyField
setting={{
type: 'boolean',
name: 'telemetry:enabled',
name: 'Usage collection',
displayName: i18n.translate('telemetry.provideUsageDataTitle', {
defaultMessage: 'Share usage with Elastic',
}),
@ -221,7 +221,7 @@ export class TelemetryManagementSection extends Component<Props, State> {
<p>
<FormattedMessage
id="telemetry.telemetryConfigAndLinkDescription"
defaultMessage="Enabling usage collection (also known as Telemetry) allows us to learn
defaultMessage="Enabling usage collection allows us to learn
what our users are most interested in, so we can improve our products and services.
Refer to our {privacyStatementLink}."
values={{