Revert "Revert "Revert "feat(PIT): Point In Time Revamp"""

This commit is contained in:
Maidul Islam
2025-06-08 21:20:37 -04:00
committed by GitHub
parent 210ddf506a
commit 9c6b300ad4
114 changed files with 130 additions and 10782 deletions
@@ -12,7 +12,6 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { createNotification } from "@app/components/notifications";
import { ProjectPermissionCan } from "@app/components/permissions";
import { Button, ContentLoader, Input, Tag, Tooltip } from "@app/components/v2";
import { NoticeBannerV2 } from "@app/components/v2/NoticeBannerV2/NoticeBannerV2";
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
import { useGetSnapshotSecrets, usePerformSecretRollback } from "@app/hooks/api";
import { SecretV3RawSanitized, TSecretFolder } from "@app/hooks/api/types";
@@ -61,7 +60,6 @@ export const SnapshotView = ({
const rollingFolder = snapshotData?.folders || [];
const rollingSecrets = snapshotData?.secrets || [];
const isAllowedRollback = false;
const folderDiffView = useMemo(() => {
const folderGroupById = folders.reduce<Record<string, TSecretFolder>>(
@@ -159,20 +157,6 @@ export const SnapshotView = ({
<h6 className="text-2xl">Snapshot</h6>
<Tag colorSchema="green">{new Date(snapshotData?.createdAt || "").toLocaleString()}</Tag>
</div>
<NoticeBannerV2 title="Snapshots are being deprecated" className="my-2">
<p className="my-1 text-sm text-mineshaft-300">
Snapshots are being deprecated in favor of{" "}
<a
target="_blank"
href="https://infisical.com/docs/documentation/platform/pit-recovery"
rel="noopener noreferrer"
className="underline decoration-primary underline-offset-2 hover:text-mineshaft-200"
>
Commits
</a>
. This feature will be officially removed in November 2025.
</p>
</NoticeBannerV2>
<div className="mt-4 flex items-center space-x-2">
<div className="w-2/5">
<Input
@@ -184,19 +168,17 @@ export const SnapshotView = ({
/>
</div>
<div className="flex-grow" />
{isAllowedRollback && (
<div>
<Button
variant="outline_bg"
onClick={onClickListSnapshot}
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
className="h-10"
isDisabled={isRollingBack}
>
{snapshotCount} Commits
</Button>
</div>
)}
<div>
<Button
variant="outline_bg"
onClick={onClickListSnapshot}
leftIcon={<FontAwesomeIcon icon={faCodeCommit} />}
className="h-10"
isDisabled={isRollingBack}
>
{snapshotCount} Commits
</Button>
</div>
<div>
<Button
onClick={onGoBack}
@@ -216,7 +198,7 @@ export const SnapshotView = ({
{(isAllowed) => (
<Button
onClick={handleClickRollback}
isDisabled={isRollingBack || !isAllowed || !isAllowedRollback}
isDisabled={isRollingBack || !isAllowed}
isLoading={isRollingBack}
leftIcon={<FontAwesomeIcon icon={faUndo} />}
className="h-10"