Skip to content

Commit

Permalink
Updated links
Browse files Browse the repository at this point in the history
  • Loading branch information
formgeist committed Jun 15, 2020
1 parent d556957 commit cfecae6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
12 changes: 8 additions & 4 deletions x-pack/plugins/infra/public/pages/logs/page_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export const LogsPageContent: React.FunctionComponent = () => {

const { initialize } = useLogSourceContext();

const ADD_DATA_LABEL = i18n.translate('xpack.logs.addDataButtonLabel', {
defaultMessage: 'Add data',
});
const kibana = useKibana();

useMount(() => {
initialize();
Expand Down Expand Up @@ -94,7 +92,9 @@ export const LogsPageContent: React.FunctionComponent = () => {
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
href="/app/home#/tutorial_directory/logging"
href={kibana.services?.application?.getUrlForApp(
'/app/home#/tutorial_directory/logging'
)}
size="s"
color="primary"
iconType="plusInCircle"
Expand Down Expand Up @@ -137,3 +137,7 @@ const settingsTabTitle = i18n.translate('xpack.infra.logs.index.settingsTabTitle
});

const feedbackLinkUrl = 'https://discuss.elastic.co/c/logs';

const ADD_DATA_LABEL = i18n.translate('xpack.logs.addDataButtonLabel', {
defaultMessage: 'Add data',
});
6 changes: 5 additions & 1 deletion x-pack/plugins/infra/public/pages/metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const ADD_DATA_LABEL = i18n.translate('xpack.metrics.addDataButtonLabel', {
export const InfrastructurePage = ({ match }: RouteComponentProps) => {
const uiCapabilities = useKibana().services.application?.capabilities;

const kibana = useKibana();

return (
<EuiErrorBoundary>
<Source.Provider sourceId="default">
Expand Down Expand Up @@ -108,7 +110,9 @@ export const InfrastructurePage = ({ match }: RouteComponentProps) => {
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
href="/app/home#/tutorial_directory/metrics"
href={kibana.services?.application?.getUrlForApp(
'/app/home#/tutorial_directory/metrics'
)}
size="s"
color="primary"
iconType="plusInCircle"
Expand Down
5 changes: 4 additions & 1 deletion x-pack/plugins/uptime/public/pages/page_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import styled from 'styled-components';
import { UptimeDatePicker } from '../components/common/uptime_date_picker';
import { SETTINGS_ROUTE } from '../../common/constants';
import { ToggleAlertFlyoutButton } from '../components/overview/alerts/alerts_containers';
import { useKibana } from '../../../../../src/plugins/kibana_react/public';

interface PageHeaderProps {
headingText: string | JSX.Element;
Expand Down Expand Up @@ -51,6 +52,8 @@ export const PageHeader = React.memo(
</StyledPicker>
) : null;

const kibana = useKibana();

const extraLinkComponents = !extraLinks ? null : (
<EuiFlexGroup alignItems="flexEnd" responsive={false}>
<EuiFlexItem grow={false}>
Expand All @@ -65,7 +68,7 @@ export const PageHeader = React.memo(
</EuiFlexItem>
<EuiFlexItem grow={false}>
<EuiButtonEmpty
href="app/home#/tutorial/uptimeMonitors"
href={kibana.services?.application?.getUrlForApp('/app/home#/tutorial/uptimeMonitors')}
color="primary"
iconType="plusInCircle"
>
Expand Down

0 comments on commit cfecae6

Please sign in to comment.