diff --git a/public/containers/ClearCacheModal/ClearCacheModal.tsx b/public/containers/ClearCacheModal/ClearCacheModal.tsx index 0855da739..6597c0d52 100644 --- a/public/containers/ClearCacheModal/ClearCacheModal.tsx +++ b/public/containers/ClearCacheModal/ClearCacheModal.tsx @@ -113,7 +113,7 @@ export default function ClearCacheModal(props: ClearCacheModalProps) { const result = await services.commonService.apiCaller({ endpoint: "indices.clearCache", data: { - index: unBlockedItems.join(","), + index: unBlockedItems.join(",") || "_all", }, }); if (result && result.ok) { diff --git a/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx b/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx index 2df5691b3..5af156c85 100644 --- a/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx +++ b/public/pages/Indices/containers/IndicesActions/IndicesActions.test.tsx @@ -185,7 +185,7 @@ describe(" spec", () => { expect(browserServicesMock.commonService.apiCaller).toHaveBeenCalledWith({ endpoint: "indices.clearCache", data: { - index: "", + index: "_all", }, }); expect(coreServicesMock.notifications.toasts.addSuccess).toHaveBeenCalledTimes(1); @@ -238,7 +238,7 @@ describe(" spec", () => { expect(browserServicesMock.commonService.apiCaller).toHaveBeenCalledWith({ endpoint: "indices.clearCache", data: { - index: "", + index: "_all", }, }); expect(coreServicesMock.notifications.toasts.addError).toHaveBeenCalledTimes(1);