mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-16 15:31:19 +00:00
Feat: Import indicator
This commit is contained in:
@@ -17,7 +17,7 @@ import {
|
||||
} from "@app/context";
|
||||
import { usePopUp } from "@app/hooks";
|
||||
import {
|
||||
useGetImportedSecrets,
|
||||
useGetImportedSecretsSingleEnv,
|
||||
useGetProjectFolders,
|
||||
useGetProjectSecrets,
|
||||
useGetSecretApprovalPolicyOfABoard,
|
||||
@@ -124,7 +124,7 @@ export const SecretMainPage = () => {
|
||||
});
|
||||
|
||||
// fetch imported secrets to show user the overriden ones
|
||||
const { data: importedSecrets } = useGetImportedSecrets({
|
||||
const { data: importedSecrets } = useGetImportedSecretsSingleEnv({
|
||||
projectId: workspaceId,
|
||||
environment,
|
||||
decryptFileKey: decryptFileKey!,
|
||||
|
||||
@@ -56,6 +56,7 @@ import {
|
||||
useDeleteSecretV3,
|
||||
useGetFoldersByEnv,
|
||||
useGetImportedFoldersByEnv,
|
||||
useGetImportedSecretsAllEnvs,
|
||||
useGetProjectSecretsAllEnv,
|
||||
useGetUserWsKey,
|
||||
useUpdateSecretV3
|
||||
@@ -134,7 +135,12 @@ export const SecretOverviewPage = () => {
|
||||
|
||||
const { isImportedFolderPresentInEnv } = useGetImportedFoldersByEnv({
|
||||
projectId: workspaceId,
|
||||
path: secretPath,
|
||||
environments: userAvailableEnvs.map(({ slug }) => slug)
|
||||
});
|
||||
|
||||
const { isImportedSecretPresentInEnv } = useGetImportedSecretsAllEnvs({
|
||||
projectId: workspaceId,
|
||||
decryptFileKey: latestFileKey!,
|
||||
environments: userAvailableEnvs.map(({ slug }) => slug)
|
||||
});
|
||||
|
||||
@@ -657,6 +663,7 @@ export const SecretOverviewPage = () => {
|
||||
filteredSecretNames.map((key, index) => (
|
||||
<SecretOverviewTableRow
|
||||
secretPath={secretPath}
|
||||
isImportedSecretPresentInEnv={isImportedSecretPresentInEnv}
|
||||
onSecretCreate={handleSecretCreate}
|
||||
onSecretDelete={handleSecretDelete}
|
||||
onSecretUpdate={handleSecretUpdate}
|
||||
|
||||
+5
-1
@@ -40,7 +40,11 @@ export const SecretOverviewFolderRow = ({
|
||||
isPresent || isImportPresent ? "text-green-600" : "text-red-600"
|
||||
)}
|
||||
>
|
||||
<Tooltip isDisabled={!isImportPresent} content="Folder is imported">
|
||||
<Tooltip
|
||||
center
|
||||
isDisabled={!isImportPresent}
|
||||
content="Folder is imported from another environment"
|
||||
>
|
||||
<div className="flex justify-center">
|
||||
<FontAwesomeIcon
|
||||
// eslint-disable-next-line no-nested-ternary
|
||||
|
||||
Reference in New Issue
Block a user