diff --git a/public/app/features/correlations/CorrelationsPageWrapper.tsx b/public/app/features/correlations/CorrelationsPageWrapper.tsx
index 079dcd8554f..60095110f58 100644
--- a/public/app/features/correlations/CorrelationsPageWrapper.tsx
+++ b/public/app/features/correlations/CorrelationsPageWrapper.tsx
@@ -6,46 +6,52 @@ import { GetCorrelationsParams } from './types';
import { useCorrelations } from './useCorrelations';
import { toEnrichedCorrelationDataK8s } from './useCorrelationsK8s';
-export default function CorrelationsPageWrapper() {
- // I cannot use these conditionally, is this okay?
+function CorrelationsPageLegacy() {
const { remove, get } = useCorrelations();
+ return (
+
+ );
+}
+
+function CorrelationsPageAppPlatform() {
+ // todo remove fake limit
const { currentData, isLoading, error } = useListCorrelationQuery({ limit: 10 });
- if (config.featureToggles.kubernetesCorrelations) {
- const enrichedCorrelations = (correlations?: CorrelationList) => {
- return correlations !== undefined
- ? correlations.items.map((item) => toEnrichedCorrelationDataK8s(item)).filter((i) => i !== undefined)
- : [];
- };
+ const enrichedCorrelations = (correlations?: CorrelationList) => {
+ return correlations !== undefined
+ ? correlations.items.map((item) => toEnrichedCorrelationDataK8s(item)).filter((i) => i !== undefined)
+ : [];
+ };
- console.log(currentData?.metadata.remainingItemCount);
+ // we cant do a straight refetch, we have to pass in new pages if necessary
+ const enhRefetch = (params: GetCorrelationsParams): Promise => {
+ return new Promise(() => enrichedCorrelations(currentData));
+ };
- // we cant do a straight refetch, we have to pass in new pages if necessary
- const enhRefetch = (params: GetCorrelationsParams): Promise => {
- return new Promise(() => enrichedCorrelations(currentData));
- };
+ return (
+
+ );
+}
- return (
-
- );
- } else {
- return (
-
- );
+export default function CorrelationsPageWrapper() {
+ if (config.featureToggles.kubernetesCorrelations) {
+ return ;
}
+
+ return ;
}