Skip to content

Commit

Permalink
[User Experience] fix javascript errors href (#130280)
Browse files Browse the repository at this point in the history
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
dominiqueclarke and kibanamachine authored Apr 18, 2022
1 parent 3803209 commit 968dffa
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { FETCH_STATUS } from '@kbn/observability-plugin/public';
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';

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 968dffa

Please sign in to comment.