@@ -300,88 +330,34 @@ export function LatencyCorrelations({ onFilter }: { onFilter: () => void }) {
-
+
{i18n.translate(
'xpack.apm.correlations.latencyCorrelations.tableTitle',
{
defaultMessage: 'Correlations',
}
)}
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {!isRunning && (
-
-
-
- )}
- {isRunning && (
-
-
-
- )}
-
-
+
+
{ccsWarning && (
<>
-
-
- {i18n.translate(
- 'xpack.apm.correlations.latencyCorrelations.ccsWarningCalloutBody',
- {
- defaultMessage:
- 'Data for the correlation analysis could not be fully retrieved. This feature is supported only for 7.14 and later versions.',
- }
- )}
-
-
+
>
)}
+
+
{(isRunning || histogramTerms.length > 0) && (
@@ -397,70 +373,15 @@ export function LatencyCorrelations({ onFilter }: { onFilter: () => void }) {
}
: undefined
}
+ onTableChange={onTableChange}
+ sorting={sorting}
/>
)}
{histogramTerms.length < 1 && (progress === 1 || !isRunning) && (
- <>
-
-
-
- {i18n.translate(
- 'xpack.apm.correlations.latencyCorrelations.noCorrelationsTitle',
- {
- defaultMessage: 'No significant correlations',
- }
- )}
-
-
- }
- body={
- <>
-
-
-
- {/* Another EuiText element to enforce a line break */}
-
-
-
- >
- }
- />
- >
+
)}
- {log.length > 0 && displayLog && (
-
-
- {log.map((d, i) => {
- const splitItem = d.split(': ');
- return (
-
-
- {splitItem[0]} {splitItem[1]}
-
-
- );
- })}
-
-
- )}
+ {displayLog &&
}
);
}
diff --git a/x-pack/plugins/apm/public/components/app/correlations/progress_controls.tsx b/x-pack/plugins/apm/public/components/app/correlations/progress_controls.tsx
new file mode 100644
index 0000000000000..a581313d6a5d5
--- /dev/null
+++ b/x-pack/plugins/apm/public/components/app/correlations/progress_controls.tsx
@@ -0,0 +1,77 @@
+/*
+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
+ * or more contributor license agreements. Licensed under the Elastic License
+ * 2.0; you may not use this file except in compliance with the Elastic License
+ * 2.0.
+ */
+
+import {
+ EuiButton,
+ EuiFlexGroup,
+ EuiFlexItem,
+ EuiProgress,
+ EuiText,
+} from '@elastic/eui';
+import { i18n } from '@kbn/i18n';
+import { FormattedMessage } from '@kbn/i18n/react';
+import React from 'react';
+
+export function CorrelationsProgressControls({
+ progress,
+ onRefresh,
+ onCancel,
+ isRunning,
+}: {
+ progress: number;
+ onRefresh: () => void;
+ onCancel: () => void;
+ isRunning: boolean;
+}) {
+ return (
+