Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(secret-sync): display sync plaintext and json variables in cloudflare workers sync details (#8884)

Mahmoud Ghazy670d74ac065f
diff --git a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/CloudflareWorkersSyncOptionsSection.tsx b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/CloudflareWorkersSyncOptionsSection.tsx
index 02c3b26f2c..b1fa0a4490 100644
--- a/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/CloudflareWorkersSyncOptionsSection.tsx
+++ b/frontend/src/pages/secret-manager/SecretSyncDetailsByIDPage/components/SecretSyncOptionsSection/CloudflareWorkersSyncOptionsSection.tsx
@@ -1,4 +1,4 @@
-import { Detail, DetailLabel, DetailValue } from "@app/components/v3";
+import { Badge, Detail, DetailLabel, DetailValue } from "@app/components/v3";
import { CLOUDFLARE_WORKERS_VARIABLE_TYPE_LABELS } from "@app/helpers/secretSyncs";
import {
CloudflareWorkersVariableType,
@@ -11,13 +11,26 @@ type Props = {
export const CloudflareWorkersSyncOptionsSection = ({ secretSync }: Props) => {
const {
- destinationConfig: { variableType = CloudflareWorkersVariableType.Secret }
+ destinationConfig: { variableType = CloudflareWorkersVariableType.Secret },
+ syncOptions: { syncNonSecretBindings = false } = {}
} = secretSync;
return (
- <Detail>
- <DetailLabel>Variable Type</DetailLabel>
- <DetailValue>{CLOUDFLARE_WORKERS_VARIABLE_TYPE_LABELS[variableType]}</DetailValue>
- </Detail>
+ <>
+ <Detail>
+ <DetailLabel>Variable Type</DetailLabel>
+ <DetailValue>{CLOUDFLARE_WORKERS_VARIABLE_TYPE_LABELS[variableType]}</DetailValue>
+ </Detail>
+ {variableType === CloudflareWorkersVariableType.Secret && (
+ <Detail>
+ <DetailLabel>Sync Plaintext and JSON Variables</DetailLabel>
+ <DetailValue>
+ <Badge variant={syncNonSecretBindings ? "success" : "danger"}>
+ {syncNonSecretBindings ? "Enabled" : "Disabled"}
+ </Badge>
+ </DetailValue>
+ </Detail>
+ )}
+ </>
);
};