Skip to content

Commit 6a077d3

Browse files
committed
Merge branch 'master' of github.com:elastic/kibana into telemetry/server_fetcher
2 parents d88e765 + 59e0a1c commit 6a077d3

File tree

107 files changed

+5009
-923
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+5009
-923
lines changed

src/legacy/core_plugins/telemetry/common/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const LOCALSTORAGE_KEY = 'telemetry.data';
5151
/**
5252
* Link to the Elastic Telemetry privacy statement.
5353
*/
54-
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/telemetry-privacy-statement`;
54+
export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/privacy-statement`;
5555

5656
/**
5757
* The type name used within the Monitoring index to publish localization stats.

src/legacy/core_plugins/telemetry/public/components/__snapshots__/opt_in_message.test.tsx.snap

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/legacy/core_plugins/telemetry/public/components/__snapshots__/telemetry_form.test.js.snap

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/legacy/core_plugins/telemetry/public/components/opt_in_banner_component.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class OptInBanner extends React.PureComponent<Props> {
3535
const title = (
3636
<FormattedMessage
3737
id="telemetry.welcomeBanner.title"
38-
defaultMessage="Help us improve the Elastic Stack!"
38+
defaultMessage="Help us improve the Elastic Stack"
3939
/>
4040
);
4141
return (
@@ -45,12 +45,18 @@ export class OptInBanner extends React.PureComponent<Props> {
4545
<EuiFlexGroup gutterSize="s" alignItems="center">
4646
<EuiFlexItem grow={false}>
4747
<EuiButton size="s" onClick={() => this.props.optInClick(true)}>
48-
<FormattedMessage id="telemetry.welcomeBanner.yesButtonLabel" defaultMessage="Yes" />
48+
<FormattedMessage
49+
id="telemetry.welcomeBanner.enableButtonLabel"
50+
defaultMessage="Enable"
51+
/>
4952
</EuiButton>
5053
</EuiFlexItem>
5154
<EuiFlexItem grow={false}>
5255
<EuiButton size="s" onClick={() => this.props.optInClick(false)}>
53-
<FormattedMessage id="telemetry.welcomeBanner.noButtonLabel" defaultMessage="No" />
56+
<FormattedMessage
57+
id="telemetry.welcomeBanner.disableButtonLabel"
58+
defaultMessage="Disable"
59+
/>
5460
</EuiButton>
5561
</EuiFlexItem>
5662
</EuiFlexGroup>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
import React from 'react';
20+
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
21+
import { OptInMessage } from './opt_in_message';
22+
23+
describe('OptInMessage', () => {
24+
it('renders as expected', () => {
25+
expect(
26+
shallowWithIntl(<OptInMessage fetchTelemetry={jest.fn(async () => [])} />)
27+
).toMatchSnapshot();
28+
});
29+
});

src/legacy/core_plugins/telemetry/public/components/opt_in_message.tsx

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ import * as React from 'react';
2121
import { EuiLink } from '@elastic/eui';
2222
import { FormattedMessage } from '@kbn/i18n/react';
2323

24-
import { getConfigTelemetryDesc, PRIVACY_STATEMENT_URL } from '../../common/constants';
25-
import { OptInExampleFlyout } from './opt_in_details_component';
24+
import { PRIVACY_STATEMENT_URL } from '../../common/constants';
2625

2726
interface Props {
2827
fetchTelemetry: () => Promise<any[]>;
@@ -46,60 +45,22 @@ export class OptInMessage extends React.PureComponent<Props, State> {
4645
};
4746

4847
render() {
49-
const { showDetails, showExample } = this.state;
50-
51-
const getDetails = () => (
52-
<FormattedMessage
53-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription"
54-
defaultMessage="No information about the data you process or store will be sent. This feature
55-
will periodically send basic feature usage statistics. See an {exampleLink} or read our {telemetryPrivacyStatementLink}.
56-
You can disable this feature at any time."
57-
values={{
58-
exampleLink: (
59-
<EuiLink onClick={this.toggleShowExample}>
60-
<FormattedMessage
61-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.exampleLinkText"
62-
defaultMessage="example"
63-
/>
64-
</EuiLink>
65-
),
66-
telemetryPrivacyStatementLink: (
67-
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
68-
<FormattedMessage
69-
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
70-
defaultMessage="telemetry privacy statement"
71-
/>
72-
</EuiLink>
73-
),
74-
}}
75-
/>
76-
);
77-
78-
const getFlyoutDetails = () => (
79-
<OptInExampleFlyout
80-
onClose={() => this.setState({ showExample: false })}
81-
fetchTelemetry={this.props.fetchTelemetry}
82-
/>
83-
);
84-
85-
const getReadMore = () => (
86-
<EuiLink onClick={() => this.setState({ showDetails: true })}>
87-
<FormattedMessage
88-
id="telemetry.welcomeBanner.telemetryConfigDescription.readMoreLinkText"
89-
defaultMessage="Read more"
90-
/>
91-
</EuiLink>
92-
);
93-
9448
return (
9549
<React.Fragment>
96-
{getConfigTelemetryDesc()} {!showDetails && getReadMore()}
97-
{showDetails && (
98-
<span style={{ display: 'block', paddingTop: '10px' }}>
99-
{getDetails()}
100-
{showExample && getFlyoutDetails()}
101-
</span>
102-
)}
50+
<FormattedMessage
51+
id="telemetry.telemetryBannerDescription"
52+
defaultMessage="Want to help us improve the Elastic Stack? Data usage collection is currently disabled. Enabling data usage collection helps us manage and improve our products and services. See our {privacyStatementLink} for more details."
53+
values={{
54+
privacyStatementLink: (
55+
<EuiLink href={PRIVACY_STATEMENT_URL} target="_blank">
56+
<FormattedMessage
57+
id="telemetry.welcomeBanner.telemetryConfigDetailsDescription.telemetryPrivacyStatementLinkText"
58+
defaultMessage="Privacy Statement"
59+
/>
60+
</EuiLink>
61+
),
62+
}}
63+
/>
10364
</React.Fragment>
10465
);
10566
}

x-pack/legacy/plugins/license_management/__jest__/__snapshots__/telemetry_opt_in.test.js.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/siem/cypress/integration/lib/navigation/selectors.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
*/
66

77
/** Top-level (global) navigation link to the `Hosts` page */
8-
export const NAVIGATION_HOSTS = '[data-test-subj="navigation-link-hosts"]';
8+
export const NAVIGATION_HOSTS = '[data-test-subj="navigation-hosts"]';
99

1010
/** Top-level (global) navigation link to the `Network` page */
11-
export const NAVIGATION_NETWORK = '[data-test-subj="navigation-link-network"]';
11+
export const NAVIGATION_NETWORK = '[data-test-subj="navigation-network"]';
1212

1313
/** Top-level (global) navigation link to the `Overview` page */
14-
export const NAVIGATION_OVERVIEW = '[data-test-subj="navigation-link-overview"]';
14+
export const NAVIGATION_OVERVIEW = '[data-test-subj="navigation-overview"]';
1515

1616
/** Top-level (global) navigation link to the `Timelines` page */
17-
export const NAVIGATION_TIMELINES = '[data-test-subj="navigation-link-timelines"]';
17+
export const NAVIGATION_TIMELINES = '[data-test-subj="navigation-timelines"]';
1818

1919
export const HOSTS_PAGE_TABS = {
2020
allHosts: '[data-test-subj="navigation-allHosts"]',

x-pack/legacy/plugins/siem/public/components/detection_engine/utility_bar/__snapshots__/utility_bar.test.tsx.snap

Lines changed: 36 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/siem/public/components/detection_engine/utility_bar/__snapshots__/utility_bar_action.test.tsx.snap

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)