Skip to content

Commit

Permalink
[Uptime] redirect Uptime tutorials to the Elastic Synthetics Integrat…
Browse files Browse the repository at this point in the history
…ion (elastic#115229) (elastic#115470)

* redirect uptime tutorials

* adjust tests and aria labels

Co-authored-by: Dominique Clarke <[email protected]>
  • Loading branch information
kibanamachine and dominiqueclarke authored Oct 20, 2021
1 parent c6536d4 commit c4da271
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export function SyntheticsAddData() {
return (
<EuiHeaderLink
aria-label={i18n.translate('xpack.observability.page_header.addUptimeDataLink.label', {
defaultMessage: 'Navigate to a tutorial about adding Uptime data',
defaultMessage: 'Navigate to the Elastic Synthetics integration to add Uptime data',
})}
href={kibana.services?.application?.getUrlForApp('/home#/tutorial/uptimeMonitors')}
href={kibana.services?.application?.getUrlForApp('/integrations/detail/synthetics/overview')}
color="primary"
iconType="indexOpen"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const getEmptySections = ({ core }: { core: CoreStart }): ISection[] => {
linkTitle: i18n.translate('xpack.observability.emptySection.apps.uptime.link', {
defaultMessage: 'Install Heartbeat',
}),
href: core.http.basePath.prepend('/app/home#/tutorial/uptimeMonitors'),
href: core.http.basePath.prepend('/app/integrations/detail/synthetics/overview'),
},
{
id: 'ux',
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/uptime/public/apps/use_no_data_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ export function useNoDataConfig(): KibanaPageTemplateProps['noDataConfig'] {
actions: {
beats: {
title: i18n.translate('xpack.uptime.noDataConfig.beatsCard.title', {
defaultMessage: 'Add monitors with Heartbeat',
defaultMessage: 'Add monitors with the Elastic Synthetics integration',
}),
description: i18n.translate('xpack.uptime.noDataConfig.beatsCard.description', {
defaultMessage:
'Proactively monitor the availability of your sites and services. Receive alerts and resolve issues faster to optimize your users experience.',
}),
href: basePath + `/app/home#/tutorial/uptimeMonitors`,
href: basePath + `/app/integrations/detail/synthetics/overview`,
},
},
docsLink: docLinks!.links.observability.guide,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ describe('ActionMenuContent', () => {
it('renders Add Data link', () => {
const { getByLabelText, getByText } = render(<ActionMenuContent />);

const addDataAnchor = getByLabelText('Navigate to a tutorial about adding Uptime data');
const addDataAnchor = getByLabelText(
'Navigate to the Elastic Synthetics integration to add Uptime data'
);

// this href value is mocked, so it doesn't correspond to the real link
// that Kibana core services will provide
expect(addDataAnchor.getAttribute('href')).toBe('/home#/tutorial/uptimeMonitors');
expect(addDataAnchor.getAttribute('href')).toBe('/integrations/detail/synthetics/overview');
expect(getByText('Add data'));
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ export function ActionMenuContent(): React.ReactElement {

<EuiHeaderLink
aria-label={i18n.translate('xpack.uptime.page_header.addDataLink.label', {
defaultMessage: 'Navigate to a tutorial about adding Uptime data',
defaultMessage: 'Navigate to the Elastic Synthetics integration to add Uptime data',
})}
href={kibana.services?.application?.getUrlForApp('/home#/tutorial/uptimeMonitors')}
href={kibana.services?.application?.getUrlForApp(
'/integrations/detail/synthetics/overview'
)}
color="primary"
iconType="indexOpen"
>
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/uptime/public/lib/helper/rtl_helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const createMockStore = () => {
const mockAppUrls: Record<string, string> = {
uptime: '/app/uptime',
observability: '/app/observability',
'/home#/tutorial/uptimeMonitors': '/home#/tutorial/uptimeMonitors',
'/integrations/detail/synthetics/overview': '/integrations/detail/synthetics/overview',
};

/* default mock core */
Expand Down

0 comments on commit c4da271

Please sign in to comment.