From e6823c520ea9783ea2232209e5cc62b74122996f Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Wed, 17 Apr 2024 12:50:14 -0600 Subject: [PATCH] fixed import icon in the overview dashboard --- frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx index 03e4f50f6e..692bdcbe35 100644 --- a/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx +++ b/frontend/src/views/SecretOverviewPage/SecretOverviewPage.tsx @@ -138,6 +138,7 @@ export const SecretOverviewPage = () => { const { isImportedSecretPresentInEnv } = useGetImportedSecretsAllEnvs({ projectId: workspaceId, decryptFileKey: latestFileKey!, + path: secretPath, environments: userAvailableEnvs.map(({ slug }) => slug) }); @@ -340,6 +341,8 @@ export const SecretOverviewPage = () => { ); const canViewOverviewPage = Boolean(userAvailableEnvs.length); + // This is needed to also show imports from other paths – right now those are missing. + // const combinedKeys = [...secKeys, ...secretImports.map((impSecrets) => impSecrets?.data?.map((impSec) => impSec.secrets?.map((impSecKey) => impSecKey.key))).flat().flat()]; const filteredSecretNames = secKeys ?.filter((name) => name.toUpperCase().includes(searchFilter.toUpperCase())) .sort((a, b) => (sortDir === "asc" ? a.localeCompare(b) : b.localeCompare(a)));