Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { EuiText } from '@elastic/eui';
import { EuiCallOut } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import { FocusedTraceWaterfall } from '../../components/shared/focused_trace_waterfall';
Expand Down Expand Up @@ -35,12 +35,14 @@ export function FocusedTraceWaterfallEmbeddable({

if (data === undefined) {
return (
<EuiText>
{i18n.translate(
'xpack.apm.focusedTraceWaterfallEmbeddable.traceWaterfallCouldNotTextLabel',
{ defaultMessage: 'Trace waterfall could not be loaded' }
)}
</EuiText>
<EuiCallOut
data-test-subj="FocusedTraceWaterfallEmbeddableNoData"
color="danger"
size="s"
title={i18n.translate('xpack.apm.focusedTraceWaterfallEmbeddable.noDataCalloutLabel', {
defaultMessage: 'Trace waterfall could not be loaded.',
})}
/>
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
*/
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui';
import React from 'react';
import { WaterfallLegends } from '../../components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends';
import { EuiCallOut } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { isPending, useFetcher } from '../../hooks/use_fetcher';
import { Loading } from './loading';
import type { ApmTraceWaterfallEmbeddableEntryProps } from './react_embeddable_factory';
import { TraceWaterfall } from '../../components/shared/trace_waterfall';
import { getServiceLegends } from '../../components/shared/trace_waterfall/use_trace_waterfall';
import { WaterfallLegendType } from '../../components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall/waterfall_helpers/waterfall_helpers';
import { WaterfallLegends } from '../../components/app/transaction_details/waterfall_with_summary/waterfall_container/waterfall_legends';

export function TraceWaterfallEmbeddable({
serviceName,
Expand Down Expand Up @@ -43,6 +45,19 @@ export function TraceWaterfallEmbeddable({
return <Loading />;
}

if (data === undefined) {
return (
<EuiCallOut
data-test-subj="TraceWaterfallEmbeddableNoData"
color="danger"
size="s"
title={i18n.translate('xpack.apm.traceWaterfallEmbeddable.noDataCalloutLabel', {
defaultMessage: 'Trace waterfall could not be loaded.',
})}
/>
);
}

return (
<EuiFlexGroup direction="column">
<EuiFlexItem>
Expand Down