Skip to content

Commit

Permalink
[ML] Replace failed transaction tab
Browse files Browse the repository at this point in the history
  • Loading branch information
qn895 committed Aug 17, 2021
1 parent fb6bb05 commit caf5c29
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,7 @@ import { useFailedTransactionsCorrelationsFetcher } from '../../../hooks/use_fai
import { SearchServiceParams } from '../../../../common/search_strategies/correlations/types';
import { useApmParams } from '../../../hooks/use_apm_params';

interface Props {
onClose: () => void;
}

export function FailedTransactionsCorrelations({ onClose }: Props) {
export function FailedTransactionsCorrelations() {
const {
core: { notifications, uiSettings },
} = useApmPluginContext();
Expand Down Expand Up @@ -114,7 +110,6 @@ export function FailedTransactionsCorrelations({ onClose }: Props) {
}, [selectedSignificantTerm, result]);

const history = useHistory();
const handleOnFilter = onClose;

const failedTransactionsCorrelationsColumns: Array<
EuiBasicTableColumn<FailedTransactionsCorrelationValue>
Expand Down Expand Up @@ -193,7 +188,6 @@ export function FailedTransactionsCorrelations({ onClose }: Props) {
)}"`,
},
});
handleOnFilter();
trackApmEvent({ metric: 'correlations_term_include_filter' });
},
},
Expand All @@ -216,7 +210,6 @@ export function FailedTransactionsCorrelations({ onClose }: Props) {
)}"`,
},
});
handleOnFilter();
trackApmEvent({ metric: 'correlations_term_exclude_filter' });
},
},
Expand Down Expand Up @@ -256,7 +249,7 @@ export function FailedTransactionsCorrelations({ onClose }: Props) {
},
},
],
[handleOnFilter, history, trackApmEvent]
[history, trackApmEvent]
);

useEffect(() => {
Expand Down Expand Up @@ -348,7 +341,6 @@ export function FailedTransactionsCorrelations({ onClose }: Props) {
status={FETCH_STATUS.SUCCESS}
setSelectedSignificantTerm={setSelectedSignificantTerm}
selectedTerm={selectedTerm}
onFilter={onClose}
/>

{ccsWarning && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useLicenseContext } from '../../../context/license/use_license_context'

import { LicensePrompt } from '../../shared/license_prompt';

import { ErrorCorrelations } from '../correlations/error_correlations';
import { FailedTransactionsCorrelations } from '../correlations/failed_transactions_correlations';

import type { TabContentProps } from './types';

Expand All @@ -42,7 +42,7 @@ function FailedTransactionsCorrelationsTab({}: TabContentProps) {
useTrackMetric({ ...metric, delay: 15000 });

return hasActivePlatinumLicense ? (
<ErrorCorrelations />
<FailedTransactionsCorrelations />
) : (
<LicensePrompt
text={i18n.translate(
Expand Down

0 comments on commit caf5c29

Please sign in to comment.