Skip to content

Commit

Permalink
Fix home page loading
Browse files Browse the repository at this point in the history
  • Loading branch information
sulemanof committed Jun 17, 2020
1 parent 3ee0bf2 commit 2966bba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/plugins/home/public/application/components/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { METRIC_TYPE } from '@kbn/analytics';
import { FormattedMessage } from '@kbn/i18n/react';
import { getServices } from '../kibana_services';
import { TelemetryPluginStart } from '../../../../telemetry/public';
import { PRIVACY_STATEMENT_URL } from '../../../../telemetry/common/constants';

import { SampleDataCard } from './sample_data';
interface Props {
Expand Down Expand Up @@ -162,7 +161,11 @@ export class Welcome extends React.Component<Props> {
id="home.dataManagementDisclaimerPrivacy"
defaultMessage="To learn about how usage data helps us manage and improve our products and services, see our "
/>
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank" rel="noopener">
<EuiLink
href={telemetry.telemetryConstants.getPrivacyStatementUrl()}
target="_blank"
rel="noopener"
>
<FormattedMessage
id="home.dataManagementDisclaimerPrivacyLink"
defaultMessage="Privacy Statement."
Expand Down
7 changes: 7 additions & 0 deletions src/plugins/telemetry/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import {
getTelemetrySendUsageFrom,
} from '../common/telemetry_config';
import { getNotifyUserAboutOptInDefault } from '../common/telemetry_config/get_telemetry_notify_user_about_optin_default';
import { PRIVACY_STATEMENT_URL } from '../common/constants';

export interface TelemetryPluginSetup {
telemetryService: TelemetryService;
Expand All @@ -46,6 +47,9 @@ export interface TelemetryPluginSetup {
export interface TelemetryPluginStart {
telemetryService: TelemetryService;
telemetryNotifications: TelemetryNotifications;
telemetryConstants: {
getPrivacyStatementUrl: () => string;
};
}

export interface TelemetryPluginConfig {
Expand Down Expand Up @@ -115,6 +119,9 @@ export class TelemetryPlugin implements Plugin<TelemetryPluginSetup, TelemetryPl
return {
telemetryService: this.telemetryService,
telemetryNotifications: this.telemetryNotifications,
telemetryConstants: {
getPrivacyStatementUrl: () => PRIVACY_STATEMENT_URL,
},
};
}

Expand Down

0 comments on commit 2966bba

Please sign in to comment.