-
Key
+
+
Key
{secretVersion?.secretKey}
-
-
Value
-
{newVersion?.isRotatedSecret ? (
-
- Rotated Secret value will not be affected
-
- ) : (
-
setIsOldSecretValueVisible(!isOldSecretValueVisible)} className="pl-2 border border-mineshaft-500 bg-mineshaft-900 rounded-md flex flex-row justify-between items-center">
-
{isOldSecretValueVisible ? (secretVersion?.secretValue || "EMPTY") : (secretVersion?.secretValue ? secretVersion?.secretValue?.split('').map((_, index) => "•") : "EMPTY")}
- {secretVersion?.secretValue &&
}
-
- )}
-
-
-
-
Comment
-
{secretVersion?.secretComment || -}
-
-
-
Tags
-
- {secretVersion?.tags?.length ?? 0 ? secretVersion?.tags?.map(({ slug, id: tagId, color }) => (
-
+ Value
+
+ {newVersion?.isRotatedSecret ? (
+
+ Rotated Secret value will not be affected
+
+ ) : (
+
setIsOldSecretValueVisible(!isOldSecretValueVisible)}
+ className="flex flex-row items-center justify-between rounded-md border border-mineshaft-500 bg-mineshaft-900 pl-2"
>
-
{slug}
-
- )) :
-}
+ className={`flex font-mono ${isOldSecretValueVisible || !secretVersion?.secretValue ? "text-md py-[0.55rem]" : "text-lg"}`}
+ >
+ {isOldSecretValueVisible
+ ? secretVersion?.secretValue || "EMPTY"
+ : secretVersion?.secretValue
+ ? secretVersion?.secretValue?.split("").map(() => "•")
+ : "EMPTY"}{" "}
+
+ {secretVersion?.secretValue && (
+
+
+
+ )}
+
+ )}
-
-
Metadata
+
+
Comment
+
+ {secretVersion?.secretComment || (
+ -
+ )}{" "}
+
+
+
+
Tags
+
+ {(secretVersion?.tags?.length ?? 0) ? (
+ secretVersion?.tags?.map(({ slug, id: tagId, color }) => (
+
+
+ {slug}
+
+ ))
+ ) : (
+
-
+ )}
+
+
+
+
Metadata
{secretVersion?.secretMetadata?.length ? (
@@ -153,59 +187,91 @@ export const SecretApprovalRequestChangeItem = ({
-
)}
-
-
)
- :
Secret not existent in the previous version.
}
- {op === CommitType.UPDATE || op === CommitType.CREATE ? (
-
+ ) : (
+
+ {" "}
+ Secret not existent in the previous version.
+
+ )}
+ {op === CommitType.UPDATE || op === CommitType.CREATE ? (
+
+
New Secret
-
-
-
Key
+
+
Key
{newVersion?.secretKey}
-
-
Value
-
{newVersion?.isRotatedSecret ? (
-
- Rotated Secret value will not be affected
-
- ) : (
-
setIsNewSecretValueVisible(!isNewSecretValueVisible)} className="pl-2 border border-mineshaft-500 bg-mineshaft-900 rounded-md flex flex-row justify-between items-center">
-
{isNewSecretValueVisible ? (newVersion?.secretValue || "EMPTY") : (newVersion?.secretValue ? newVersion?.secretValue?.split('').map((_, index) => "•") : "EMPTY")}
- {newVersion?.secretValue &&
}
-
- )}
-
-
-
-
Comment
-
{newVersion?.secretComment || -}
-
-
-
Tags
-
- {newVersion?.tags?.length ?? 0 ? newVersion?.tags?.map(({ slug, id: tagId, color }) => (
-
+ Value
+
+ {newVersion?.isRotatedSecret ? (
+
+ Rotated Secret value will not be affected
+
+ ) : (
+
setIsNewSecretValueVisible(!isNewSecretValueVisible)}
+ className="flex flex-row items-center justify-between rounded-md border border-mineshaft-500 bg-mineshaft-900 pl-2"
>
-
{slug}
-
- )) :
-}
+ className={`flex font-mono ${isNewSecretValueVisible || !newVersion?.secretValue ? "text-md py-[0.55rem]" : "text-lg"}`}
+ >
+ {isNewSecretValueVisible
+ ? newVersion?.secretValue || "EMPTY"
+ : newVersion?.secretValue
+ ? newVersion?.secretValue?.split("").map(() => "•")
+ : "EMPTY"}{" "}
+
+ {newVersion?.secretValue && (
+
+
+
+ )}
+
+ )}
-
-
Metadata
+
+
Comment
+
+ {newVersion?.secretComment || (
+ -
+ )}{" "}
+
+
+
+
Tags
+
+ {(newVersion?.tags?.length ?? 0) ? (
+ newVersion?.tags?.map(({ slug, id: tagId, color }) => (
+
+
+ {slug}
+
+ ))
+ ) : (
+
-
+ )}
+
+
+
+
Metadata
{newVersion?.secretMetadata?.length ? (
{newVersion.secretMetadata?.map((el) => (
@@ -232,9 +298,14 @@ export const SecretApprovalRequestChangeItem = ({
-
)}
-
)
- :
Secret not existent in the new version.
}
-
+
+ ) : (
+
+ {" "}
+ Secret not existent in the new version.
+
+ )}
+
);
diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
index 9e611d3dc..17046450e 100644
--- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
+++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/SecretApprovalRequest/components/SecretApprovalRequestChanges.tsx
@@ -13,6 +13,7 @@ import {
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { zodResolver } from "@hookform/resolvers/zod";
import { RadioGroup, RadioGroupIndicator, RadioGroupItem } from "@radix-ui/react-radio-group";
+import { format } from "date-fns";
import { twMerge } from "tailwind-merge";
import z from "zod";
@@ -40,7 +41,6 @@ import { formatReservedPaths } from "@app/lib/fn/string";
import { SecretApprovalRequestAction } from "./SecretApprovalRequestAction";
import { SecretApprovalRequestChangeItem } from "./SecretApprovalRequestChangeItem";
-import { format } from "date-fns";
export const generateCommitText = (commits: { op: CommitType }[] = []) => {
const score: Record
= {};
@@ -235,14 +235,17 @@ export const SecretApprovalRequestChanges = ({
{secretApprovalRequestDetails?.committerUser?.email}) wants to change{" "}
{secretApprovalRequestDetails.commits.length} secret values in
-
+
{secretApprovalRequestDetails.environment}
-
+
-
+
{formatReservedPaths(secretApprovalRequestDetails.secretPath)}
@@ -256,10 +259,7 @@ export const SecretApprovalRequestChanges = ({
onOpenChange={(isOpen) => handlePopUpToggle("reviewChanges", isOpen)}
>
- }
- >
+ }>
Review
@@ -397,7 +397,8 @@ export const SecretApprovalRequestChanges = ({
>
{reviewer?.status === ApprovalStatus.APPROVED ? "approved" : "rejected"}
{" "}
- the request on {format(new Date(secretApprovalRequestDetails.createdAt), "PPpp zzz")}.
+ the request on{" "}
+ {format(new Date(secretApprovalRequestDetails.createdAt), "PPpp zzz")}.