Skip to content

Commit

Permalink
Change telemetry optIn to default to true (#50490)
Browse files Browse the repository at this point in the history
* Change optIn to default to true

* Update snapshot

* Fix eslint errors
  • Loading branch information
mikecote authored Nov 13, 2019
1 parent 9212eb2 commit bff235b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/legacy/core_plugins/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ const telemetry = (kibana: any) => {
allowChangingOptInStatus: Joi.boolean().default(true),
optIn: Joi.when('allowChangingOptInStatus', {
is: false,
then: Joi.valid(true).required(),
otherwise: Joi.boolean()
.allow(null)
.default(null),
then: Joi.valid(true).default(true),
otherwise: Joi.boolean().default(true),
}),

// `config` is used internally and not intended to be set
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class TelemetryForm extends Component {
type: 'boolean',
value: telemetryOptInProvider.getOptIn() || false,
description: this.renderDescription(),
defVal: false,
defVal: true,
ariaName: i18n.translate('telemetry.provideUsageStatisticsLabel', { defaultMessage: 'Provide usage statistics' })
}}
save={this.toggleOptIn}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const getTelemetryOptIn: GetTelemetryOptIn = ({
}

if (telemetrySavedObject === null || typeof telemetrySavedObject.enabled !== 'boolean') {
return null;
return configTelemetryOptIn;
}

const savedOptIn = telemetrySavedObject.enabled;
Expand Down

0 comments on commit bff235b

Please sign in to comment.