Skip to content

Commit

Permalink
ux - fix javascript errors href
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiqueclarke committed Apr 14, 2022
1 parent 07341a5 commit 22860c8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n-react';
import { useLegacyUrlParams } from '../../../../context/url_params_context/use_url_params';
import { useFetcher } from '../../../../hooks/use_fetcher';
import { useKibanaServices } from '../../../../hooks/use_kibana_services';
import { I18LABELS } from '../translations';
import { CsmSharedContext } from '../csm_shared_context';
import { FETCH_STATUS } from '../../../../../../observability/public';
Expand All @@ -32,6 +33,8 @@ interface JSErrorItem {
}

export function JSErrors() {
const { http } = useKibanaServices();
const basePath = http.basePath.get();
const { rangeId, urlParams, uxUiFilters } = useLegacyUrlParams();

const { start, end, serviceName, searchTerm } = urlParams;
Expand Down Expand Up @@ -70,7 +73,9 @@ export function JSErrors() {
field: 'errorMessage',
name: I18LABELS.errorMessage,
render: (errorMessage: string, item: JSErrorItem) => (
<EuiLink href={`/services/${serviceName}/errors/${item.errorGroupId}`}>
<EuiLink
href={`${basePath}/app/apm/services/${serviceName}/errors/${item.errorGroupId}`}
>
{errorMessage}
</EuiLink>
),
Expand Down

0 comments on commit 22860c8

Please sign in to comment.