mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 15:43:12 +00:00
Add PKI Syncs docs and a few improvements on the router
This commit is contained in:
@@ -23,7 +23,8 @@ export const DeletePkiSyncModal = ({ isOpen, onOpenChange, pkiSync, onComplete }
|
||||
try {
|
||||
await deleteSync.mutateAsync({
|
||||
syncId,
|
||||
projectId
|
||||
projectId,
|
||||
destination
|
||||
});
|
||||
|
||||
createNotification({
|
||||
|
||||
@@ -24,7 +24,8 @@ const Content = ({ pkiSync, onComplete }: ContentProps) => {
|
||||
try {
|
||||
await triggerImportCertificates.mutateAsync({
|
||||
syncId,
|
||||
projectId
|
||||
projectId,
|
||||
destination
|
||||
});
|
||||
|
||||
createNotification({
|
||||
|
||||
@@ -24,7 +24,8 @@ const Content = ({ pkiSync, onComplete }: ContentProps) => {
|
||||
try {
|
||||
await triggerRemoveCertificates.mutateAsync({
|
||||
syncId,
|
||||
projectId
|
||||
projectId,
|
||||
destination
|
||||
});
|
||||
|
||||
createNotification({
|
||||
|
||||
@@ -10,13 +10,7 @@ import { createNotification } from "@app/components/notifications";
|
||||
import { Button, FormControl, Switch } from "@app/components/v2";
|
||||
import { useProject } from "@app/context";
|
||||
import { PKI_SYNC_MAP } from "@app/helpers/pkiSyncs";
|
||||
import {
|
||||
PkiSync,
|
||||
TCreatePkiSyncDTO,
|
||||
TPkiSync,
|
||||
useCreatePkiSync,
|
||||
usePkiSyncOption
|
||||
} from "@app/hooks/api/pkiSyncs";
|
||||
import { PkiSync, TPkiSync, useCreatePkiSync, usePkiSyncOption } from "@app/hooks/api/pkiSyncs";
|
||||
|
||||
import { PkiSyncDestinationFields } from "./PkiSyncDestinationFields";
|
||||
import { PkiSyncDetailsFields } from "./PkiSyncDetailsFields";
|
||||
@@ -69,10 +63,7 @@ export const CreatePkiSyncForm = ({ destination, onComplete, onCancel }: Props)
|
||||
...formData,
|
||||
connectionId: connection.id,
|
||||
projectId: currentProject.id,
|
||||
destinationConfig: {
|
||||
destination,
|
||||
config: destinationConfig
|
||||
} as unknown as TCreatePkiSyncDTO["destinationConfig"]
|
||||
destinationConfig
|
||||
});
|
||||
|
||||
createNotification({
|
||||
|
||||
@@ -43,7 +43,8 @@ export const EditPkiSyncForm = ({ pkiSync, fields, onComplete }: Props) => {
|
||||
syncId: pkiSync.id,
|
||||
...formData,
|
||||
connectionId: connection.id,
|
||||
projectId: pkiSync.projectId
|
||||
projectId: pkiSync.projectId,
|
||||
destination: pkiSync.destination
|
||||
});
|
||||
|
||||
createNotification({
|
||||
|
||||
@@ -12,6 +12,8 @@ export const PkiSyncOptionsFields = () => {
|
||||
return (
|
||||
<>
|
||||
<p className="mb-4 text-sm text-bunker-300">Configure how certificates should be synced.</p>
|
||||
{/*
|
||||
TODO: Re-enable this when we have a way to import certificates
|
||||
<Controller
|
||||
control={control}
|
||||
name="syncOptions.canImportCertificates"
|
||||
@@ -48,6 +50,7 @@ export const PkiSyncOptionsFields = () => {
|
||||
</FormControl>
|
||||
)}
|
||||
/>
|
||||
*/}
|
||||
<Controller
|
||||
control={control}
|
||||
name="syncOptions.canRemoveCertificates"
|
||||
|
||||
@@ -70,6 +70,7 @@ export const PkiSyncReviewFields = () => {
|
||||
<GenericFieldLabel label="Upload Certificates">
|
||||
<Badge variant="success">Always Enabled</Badge>
|
||||
</GenericFieldLabel>
|
||||
{/* Hidden for now - Import certificates functionality disabled
|
||||
{syncOptions?.canImportCertificates !== undefined && (
|
||||
<GenericFieldLabel label="Import Certificates">
|
||||
<Badge variant={syncOptions.canImportCertificates ? "success" : "danger"}>
|
||||
@@ -77,6 +78,7 @@ export const PkiSyncReviewFields = () => {
|
||||
</Badge>
|
||||
</GenericFieldLabel>
|
||||
)}
|
||||
*/}
|
||||
{syncOptions?.canRemoveCertificates !== undefined && (
|
||||
<GenericFieldLabel label="Remove Certificates">
|
||||
<Badge variant={syncOptions.canRemoveCertificates ? "success" : "danger"}>
|
||||
|
||||
@@ -20,7 +20,7 @@ export const PkiSyncFormSchema = z.object({
|
||||
vaultBaseUrl: z.string().url("Valid URL is required")
|
||||
}),
|
||||
syncOptions: z.object({
|
||||
canImportCertificates: z.boolean().default(true),
|
||||
canImportCertificates: z.boolean().default(false),
|
||||
canRemoveCertificates: z.boolean().default(true)
|
||||
})
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user