Skip to content

Commit 3bb48e6

Browse files
Fixes the link to advanced settings in the telemetry opt-in notice banner (#52699)
* Prepends base path to the link to advanced settings in the telemetry opt-in notice banner from all apps
1 parent 711b44b commit 3bb48e6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,8 @@ export const TELEMETRY_STATS_TYPE = 'telemetry';
7070
* @type {string}
7171
*/
7272
export const UI_METRIC_USAGE_TYPE = 'ui_metric';
73+
74+
/**
75+
* Link to Advanced Settings.
76+
*/
77+
export const PATH_TO_ADVANCED_SETTINGS = 'kibana#/management/kibana/settings';

src/legacy/core_plugins/telemetry/public/components/__snapshots__/opted_in_notice_banner.test.tsx.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/opted_in_notice_banner.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
/* eslint @elastic/eui/href-or-on-click:0 */
2121

2222
import * as React from 'react';
23+
import chrome from 'ui/chrome';
2324
import { EuiButton, EuiLink, EuiCallOut, EuiSpacer } from '@elastic/eui';
2425
import { FormattedMessage } from '@kbn/i18n/react';
26+
import { PATH_TO_ADVANCED_SETTINGS } from '../../common/constants';
2527

2628
interface Props {
2729
onSeenBanner: () => any;
@@ -57,7 +59,10 @@ export class OptedInBanner extends React.PureComponent<Props> {
5759
</EuiLink>
5860
),
5961
disableLink: (
60-
<EuiLink href="#/management/kibana/settings" onClick={this.onLinkClick}>
62+
<EuiLink
63+
href={chrome.addBasePath(PATH_TO_ADVANCED_SETTINGS)}
64+
onClick={this.onLinkClick}
65+
>
6166
<FormattedMessage
6267
id="telemetry.telemetryOptedInDisableUsage"
6368
defaultMessage="disable usage data here"

0 commit comments

Comments
 (0)