mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 20:26:44 +00:00
improvements: ui improvements & add users to org from project member invite modal
This commit is contained in:
@@ -222,10 +222,10 @@
|
|||||||
"org-members-description": "Manage members of your organization. These users could afterwards be formed into projects.",
|
"org-members-description": "Manage members of your organization. These users could afterwards be formed into projects.",
|
||||||
"search-members": "Search members...",
|
"search-members": "Search members...",
|
||||||
"add-dialog": {
|
"add-dialog": {
|
||||||
"add-member-to-project": "Add a member to your project",
|
"add-member-to-project": "Add users to your project",
|
||||||
"already-all-invited": "All the users in your organization are already invited.",
|
"already-all-invited": "All the users in your organization are already invited.",
|
||||||
"add-user-org-first": "Add more users to the organization first.",
|
"add-user-org-first": "Add more users to the organization first.",
|
||||||
"user-will-email": "The user will receive an email with the instructions.",
|
"user-will-email": "Users will receive an email with instructions to gain access.",
|
||||||
"looking-add": "<0>If you are looking to add users to your org,</0><1>click here</1>",
|
"looking-add": "<0>If you are looking to add users to your org,</0><1>click here</1>",
|
||||||
"add-user-to-org": "Add Users to Organization"
|
"add-user-to-org": "Add Users to Organization"
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -18,7 +18,7 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
|
|||||||
|
|
||||||
if (!secretSync) return null;
|
if (!secretSync) return null;
|
||||||
|
|
||||||
const { id: syncId, name, destination } = secretSync;
|
const { id: syncId, name, destination, projectId } = secretSync;
|
||||||
|
|
||||||
const handleDeleteSecretSync = async () => {
|
const handleDeleteSecretSync = async () => {
|
||||||
const destinationName = SECRET_SYNC_MAP[destination].name;
|
const destinationName = SECRET_SYNC_MAP[destination].name;
|
||||||
@@ -27,7 +27,8 @@ export const DeleteSecretSyncModal = ({ isOpen, onOpenChange, secretSync, onComp
|
|||||||
await deleteSync.mutateAsync({
|
await deleteSync.mutateAsync({
|
||||||
syncId,
|
syncId,
|
||||||
destination,
|
destination,
|
||||||
removeSecrets
|
removeSecrets,
|
||||||
|
projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const FormSchema = z.object({
|
|||||||
type TFormData = z.infer<typeof FormSchema>;
|
type TFormData = z.infer<typeof FormSchema>;
|
||||||
|
|
||||||
const Content = ({ secretSync, onComplete }: ContentProps) => {
|
const Content = ({ secretSync, onComplete }: ContentProps) => {
|
||||||
const { id: syncId, destination } = secretSync;
|
const { id: syncId, destination, projectId } = secretSync;
|
||||||
const destinationName = SECRET_SYNC_MAP[destination].name;
|
const destinationName = SECRET_SYNC_MAP[destination].name;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -53,7 +53,8 @@ const Content = ({ secretSync, onComplete }: ContentProps) => {
|
|||||||
await triggerImportSecrets.mutateAsync({
|
await triggerImportSecrets.mutateAsync({
|
||||||
syncId,
|
syncId,
|
||||||
destination,
|
destination,
|
||||||
importBehavior
|
importBehavior,
|
||||||
|
projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ type ContentProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const Content = ({ secretSync, onComplete }: ContentProps) => {
|
const Content = ({ secretSync, onComplete }: ContentProps) => {
|
||||||
const { id: syncId, destination } = secretSync;
|
const { id: syncId, destination, projectId } = secretSync;
|
||||||
const destinationName = SECRET_SYNC_MAP[destination].name;
|
const destinationName = SECRET_SYNC_MAP[destination].name;
|
||||||
|
|
||||||
const triggerSyncImport = useTriggerSecretSyncRemoveSecrets();
|
const triggerSyncImport = useTriggerSecretSyncRemoveSecrets();
|
||||||
@@ -24,7 +24,8 @@ const Content = ({ secretSync, onComplete }: ContentProps) => {
|
|||||||
try {
|
try {
|
||||||
await triggerSyncImport.mutateAsync({
|
await triggerSyncImport.mutateAsync({
|
||||||
syncId,
|
syncId,
|
||||||
destination
|
destination,
|
||||||
|
projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ export const EditSecretSyncForm = ({ secretSync, fields, onComplete }: Props) =>
|
|||||||
syncId: secretSync.id,
|
syncId: secretSync.id,
|
||||||
...formData,
|
...formData,
|
||||||
environment: environment?.slug,
|
environment: environment?.slug,
|
||||||
connectionId: connection.id
|
connectionId: connection.id,
|
||||||
|
projectId: secretSync.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -71,12 +71,8 @@ export const SecretSyncConnectionField = ({ onChange: callback }: Props) => {
|
|||||||
{canCreateConnection ? (
|
{canCreateConnection ? (
|
||||||
<>
|
<>
|
||||||
You do not have access to any {appName} Connections. Create one from the{" "}
|
You do not have access to any {appName} Connections. Create one from the{" "}
|
||||||
<Link
|
<Link to="/organization/app-connections" className="underline">
|
||||||
to="/organization/settings"
|
App Connections
|
||||||
className="underline"
|
|
||||||
search={{ selectedTab: "app-connections" }}
|
|
||||||
>
|
|
||||||
Organization Settings
|
|
||||||
</Link>{" "}
|
</Link>{" "}
|
||||||
page.
|
page.
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,15 +1,17 @@
|
|||||||
import { ReactNode } from "@tanstack/react-router";
|
import { ReactNode } from "@tanstack/react-router";
|
||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
title: ReactNode;
|
title: ReactNode;
|
||||||
description?: ReactNode;
|
description?: ReactNode;
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
|
className?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PageHeader = ({ title, description, children }: Props) => (
|
export const PageHeader = ({ title, description, children, className }: Props) => (
|
||||||
<div className="mb-4">
|
<div className={twMerge("mb-4", className)}>
|
||||||
<div className="flex w-full justify-between">
|
<div className="flex w-full justify-between">
|
||||||
<div>
|
<div className="w-full">
|
||||||
<h1 className="mr-4 text-3xl font-semibold capitalize text-white">{title}</h1>
|
<h1 className="mr-4 text-3xl font-semibold capitalize text-white">{title}</h1>
|
||||||
</div>
|
</div>
|
||||||
<div>{children}</div>
|
<div>{children}</div>
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ export const useCreateSecretSync = () => {
|
|||||||
|
|
||||||
return data.secretSync;
|
return data.secretSync;
|
||||||
},
|
},
|
||||||
onSuccess: () => queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() })
|
onSuccess: (_, { projectId }) =>
|
||||||
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) })
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -38,8 +39,8 @@ export const useUpdateSecretSync = () => {
|
|||||||
|
|
||||||
return data.secretSync;
|
return data.secretSync;
|
||||||
},
|
},
|
||||||
onSuccess: (_, { syncId, destination }) => {
|
onSuccess: (_, { syncId, destination, projectId }) => {
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) });
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -55,8 +56,8 @@ export const useDeleteSecretSync = () => {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
onSuccess: (_, { syncId, destination }) => {
|
onSuccess: (_, { syncId, destination, projectId }) => {
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) });
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -72,8 +73,8 @@ export const useTriggerSecretSyncSyncSecrets = () => {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
onSuccess: (_, { syncId, destination }) => {
|
onSuccess: (_, { syncId, destination, projectId }) => {
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) });
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -93,8 +94,8 @@ export const useTriggerSecretSyncImportSecrets = () => {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
onSuccess: (_, { syncId, destination }) => {
|
onSuccess: (_, { syncId, destination, projectId }) => {
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) });
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -110,8 +111,8 @@ export const useTriggerSecretSyncRemoveSecrets = () => {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
},
|
},
|
||||||
onSuccess: (_, { syncId, destination }) => {
|
onSuccess: (_, { syncId, destination, projectId }) => {
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list() });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.list(projectId) });
|
||||||
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
queryClient.invalidateQueries({ queryKey: secretSyncKeys.byId(destination, syncId) });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
export const secretSyncKeys = {
|
export const secretSyncKeys = {
|
||||||
all: ["secret-sync"] as const,
|
all: ["secret-sync"] as const,
|
||||||
options: () => [...secretSyncKeys.all, "options"] as const,
|
options: () => [...secretSyncKeys.all, "options"] as const,
|
||||||
list: () => [...secretSyncKeys.all, "list"] as const,
|
list: (projectId: string) => [...secretSyncKeys.all, "list", projectId] as const,
|
||||||
byId: (destination: SecretSync, syncId: string) =>
|
byId: (destination: SecretSync, syncId: string) =>
|
||||||
[...secretSyncKeys.all, destination, "by-id", syncId] as const
|
[...secretSyncKeys.all, destination, "by-id", syncId] as const
|
||||||
};
|
};
|
||||||
@@ -46,6 +46,14 @@ export const useSecretSyncOption = (destination: SecretSync) => {
|
|||||||
return { syncOption, isPending };
|
return { syncOption, isPending };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const fetchSecretSyncsByProjectId = async (projectId: string) => {
|
||||||
|
const { data } = await apiRequest.get<TListSecretSyncs>("/api/v1/secret-syncs", {
|
||||||
|
params: { projectId }
|
||||||
|
});
|
||||||
|
|
||||||
|
return data.secretSyncs;
|
||||||
|
};
|
||||||
|
|
||||||
export const useListSecretSyncs = (
|
export const useListSecretSyncs = (
|
||||||
projectId: string,
|
projectId: string,
|
||||||
options?: Omit<
|
options?: Omit<
|
||||||
@@ -54,14 +62,8 @@ export const useListSecretSyncs = (
|
|||||||
>
|
>
|
||||||
) => {
|
) => {
|
||||||
return useQuery({
|
return useQuery({
|
||||||
queryKey: secretSyncKeys.list(),
|
queryKey: secretSyncKeys.list(projectId),
|
||||||
queryFn: async () => {
|
queryFn: () => fetchSecretSyncsByProjectId(projectId),
|
||||||
const { data } = await apiRequest.get<TListSecretSyncs>("/api/v1/secret-syncs", {
|
|
||||||
params: { projectId }
|
|
||||||
});
|
|
||||||
|
|
||||||
return data.secretSyncs;
|
|
||||||
},
|
|
||||||
...options
|
...options
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,26 +43,31 @@ export type TUpdateSecretSyncDTO = Partial<
|
|||||||
> & {
|
> & {
|
||||||
destination: SecretSync;
|
destination: SecretSync;
|
||||||
syncId: string;
|
syncId: string;
|
||||||
|
projectId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TDeleteSecretSyncDTO = {
|
export type TDeleteSecretSyncDTO = {
|
||||||
destination: SecretSync;
|
destination: SecretSync;
|
||||||
syncId: string;
|
syncId: string;
|
||||||
removeSecrets: boolean;
|
removeSecrets: boolean;
|
||||||
|
projectId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TTriggerSecretSyncSyncSecretsDTO = {
|
export type TTriggerSecretSyncSyncSecretsDTO = {
|
||||||
destination: SecretSync;
|
destination: SecretSync;
|
||||||
syncId: string;
|
syncId: string;
|
||||||
|
projectId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TTriggerSecretSyncImportSecretsDTO = {
|
export type TTriggerSecretSyncImportSecretsDTO = {
|
||||||
destination: SecretSync;
|
destination: SecretSync;
|
||||||
syncId: string;
|
syncId: string;
|
||||||
importBehavior: SecretSyncImportBehavior;
|
importBehavior: SecretSyncImportBehavior;
|
||||||
|
projectId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TTriggerSecretSyncRemoveSecretsDTO = {
|
export type TTriggerSecretSyncRemoveSecretsDTO = {
|
||||||
destination: SecretSync;
|
destination: SecretSync;
|
||||||
syncId: string;
|
syncId: string;
|
||||||
|
projectId: string;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ export const useGetWorkspaceAuthorizations = <TData = IntegrationAuth[],>(
|
|||||||
select
|
select
|
||||||
});
|
});
|
||||||
|
|
||||||
const fetchWorkspaceIntegrations = async (workspaceId: string) => {
|
export const fetchWorkspaceIntegrations = async (workspaceId: string) => {
|
||||||
const { data } = await apiRequest.get<{ integrations: TIntegration[] }>(
|
const { data } = await apiRequest.get<{ integrations: TIntegration[] }>(
|
||||||
`/api/v1/workspace/${workspaceId}/integrations`
|
`/api/v1/workspace/${workspaceId}/integrations`
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -94,6 +94,13 @@ export const OrganizationLayout = () => {
|
|||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
|
<Link to="/organization/app-connections">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<MenuItem isSelected={isActive} icon="jigsaw-puzzle">
|
||||||
|
App Connections
|
||||||
|
</MenuItem>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
<Link to="/organization/settings">
|
<Link to="/organization/settings">
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem isSelected={isActive} icon="toggle-settings">
|
<MenuItem isSelected={isActive} icon="toggle-settings">
|
||||||
|
|||||||
+9
-2
@@ -10,6 +10,7 @@ import {
|
|||||||
faInfo,
|
faInfo,
|
||||||
faInfoCircle,
|
faInfoCircle,
|
||||||
faMoneyBill,
|
faMoneyBill,
|
||||||
|
faPlug,
|
||||||
faSignOut,
|
faSignOut,
|
||||||
faUser,
|
faUser,
|
||||||
faUsers
|
faUsers
|
||||||
@@ -100,6 +101,7 @@ export const MinimizedOrgSidebar = () => {
|
|||||||
const isMoreSelected = (
|
const isMoreSelected = (
|
||||||
[
|
[
|
||||||
linkOptions({ to: "/organization/access-management" }).to,
|
linkOptions({ to: "/organization/access-management" }).to,
|
||||||
|
linkOptions({ to: "/organization/app-connections" }).to,
|
||||||
linkOptions({ to: "/organization/settings" }).to,
|
linkOptions({ to: "/organization/settings" }).to,
|
||||||
linkOptions({ to: "/organization/audit-logs" }).to
|
linkOptions({ to: "/organization/audit-logs" }).to
|
||||||
] as string[]
|
] as string[]
|
||||||
@@ -311,10 +313,10 @@ export const MinimizedOrgSidebar = () => {
|
|||||||
<div className="w-full">
|
<div className="w-full">
|
||||||
<MenuIconButton
|
<MenuIconButton
|
||||||
lottieIconMode="reverse"
|
lottieIconMode="reverse"
|
||||||
icon="three-ellipsis"
|
icon="settings-cog"
|
||||||
isSelected={isMoreSelected}
|
isSelected={isMoreSelected}
|
||||||
>
|
>
|
||||||
More
|
Org Controls
|
||||||
</MenuIconButton>
|
</MenuIconButton>
|
||||||
</div>
|
</div>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
@@ -325,6 +327,11 @@ export const MinimizedOrgSidebar = () => {
|
|||||||
Access Control
|
Access Control
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</Link>
|
</Link>
|
||||||
|
<Link to="/organization/app-connections">
|
||||||
|
<DropdownMenuItem icon={<FontAwesomeIcon icon={faPlug} />}>
|
||||||
|
App Connections
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</Link>
|
||||||
{(window.location.origin.includes("https://app.infisical.com") ||
|
{(window.location.origin.includes("https://app.infisical.com") ||
|
||||||
window.location.origin.includes("https://eu.infisical.com") ||
|
window.location.origin.includes("https://eu.infisical.com") ||
|
||||||
window.location.origin.includes("https://gamma.infisical.com")) && (
|
window.location.origin.includes("https://gamma.infisical.com")) && (
|
||||||
|
|||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
import { Helmet } from "react-helmet";
|
||||||
|
import { faArrowUpRightFromSquare, faBookOpen, faPlus } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
|
import { Button, PageHeader } from "@app/components/v2";
|
||||||
|
import {
|
||||||
|
OrgPermissionAppConnectionActions,
|
||||||
|
OrgPermissionSubjects
|
||||||
|
} from "@app/context/OrgPermissionContext/types";
|
||||||
|
import { withPermission } from "@app/hoc";
|
||||||
|
import { usePopUp } from "@app/hooks";
|
||||||
|
import {
|
||||||
|
AddAppConnectionModal,
|
||||||
|
AppConnectionsTable
|
||||||
|
} from "@app/pages/organization/AppConnections/AppConnectionsPage/components";
|
||||||
|
|
||||||
|
export const AppConnectionsPage = withPermission(
|
||||||
|
() => {
|
||||||
|
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["addConnection"] as const);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="bg-bunker-800">
|
||||||
|
<Helmet>
|
||||||
|
<title>Infisical | App Connections</title>
|
||||||
|
<link rel="icon" href="/infisical.ico" />
|
||||||
|
<meta property="og:image" content="/images/message.png" />
|
||||||
|
</Helmet>
|
||||||
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
|
<div className="w-full max-w-7xl">
|
||||||
|
<PageHeader
|
||||||
|
className="w-full"
|
||||||
|
title={
|
||||||
|
<div className="flex w-full items-center">
|
||||||
|
<span>App Connections</span>
|
||||||
|
<a
|
||||||
|
className="-mt-1.5"
|
||||||
|
href="https://infisical.com/docs/integrations/app-connections/overview"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<div className="ml-2 inline-block rounded-md bg-yellow/20 px-1.5 text-sm font-normal text-yellow opacity-80 hover:opacity-100">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
|
||||||
|
<span>Docs</span>
|
||||||
|
<FontAwesomeIcon
|
||||||
|
icon={faArrowUpRightFromSquare}
|
||||||
|
className="mb-[0.07rem] ml-1.5 text-[10px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<OrgPermissionCan
|
||||||
|
I={OrgPermissionAppConnectionActions.Create}
|
||||||
|
a={OrgPermissionSubjects.AppConnections}
|
||||||
|
>
|
||||||
|
{(isAllowed) => (
|
||||||
|
<Button
|
||||||
|
colorSchema="secondary"
|
||||||
|
type="submit"
|
||||||
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
|
onClick={() => {
|
||||||
|
handlePopUpOpen("addConnection");
|
||||||
|
}}
|
||||||
|
isDisabled={!isAllowed}
|
||||||
|
className="ml-auto"
|
||||||
|
>
|
||||||
|
Add Connection
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</OrgPermissionCan>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
description="Create and configure connections with third-party apps for re-use across Infisical projects"
|
||||||
|
/>
|
||||||
|
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
|
<AppConnectionsTable />
|
||||||
|
<AddAppConnectionModal
|
||||||
|
isOpen={popUp.addConnection.isOpen}
|
||||||
|
onOpenChange={(isOpen) => handlePopUpToggle("addConnection", isOpen)}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: OrgPermissionAppConnectionActions.Read,
|
||||||
|
subject: OrgPermissionSubjects.AppConnections
|
||||||
|
}
|
||||||
|
);
|
||||||
+1
-1
@@ -159,7 +159,7 @@ export const AppConnectionsTable = () => {
|
|||||||
value={search}
|
value={search}
|
||||||
onChange={(e) => setSearch(e.target.value)}
|
onChange={(e) => setSearch(e.target.value)}
|
||||||
leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
|
leftIcon={<FontAwesomeIcon icon={faMagnifyingGlass} />}
|
||||||
placeholder="Search integrations..."
|
placeholder="Search connections..."
|
||||||
className="flex-1"
|
className="flex-1"
|
||||||
/>
|
/>
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { faHome } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { AppConnectionsPage } from "./AppConnectionsPage";
|
||||||
|
|
||||||
|
export const Route = createFileRoute(
|
||||||
|
"/_authenticate/_inject-org-details/_org-layout/organization/app-connections/"
|
||||||
|
)({
|
||||||
|
component: AppConnectionsPage,
|
||||||
|
context: () => ({
|
||||||
|
breadcrumbs: [
|
||||||
|
{
|
||||||
|
label: "Home",
|
||||||
|
icon: () => <FontAwesomeIcon icon={faHome} />,
|
||||||
|
link: linkOptions({ to: "/organization/secret-manager/overview" })
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "App Connections"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
});
|
||||||
+4
-4
@@ -135,7 +135,7 @@ export const OAuthCallbackPage = () => {
|
|||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: returnUrl ?? "/organization/settings?selectedTab=app-connections"
|
to: returnUrl ?? "/organization/app-connections"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ export const OAuthCallbackPage = () => {
|
|||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: returnUrl ?? "/organization/settings?selectedTab=app-connections"
|
to: returnUrl ?? "/organization/app-connections"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ export const OAuthCallbackPage = () => {
|
|||||||
type: "error"
|
type: "error"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: returnUrl ?? "/organization/settings?selectedTab=app-connections"
|
to: returnUrl ?? "/organization/app-connections"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ export const OAuthCallbackPage = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
await navigate({
|
await navigate({
|
||||||
to: data?.returnUrl ?? "/organization/settings?selectedTab=app-connections"
|
to: data?.returnUrl ?? "/organization/app-connections"
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
}, [isReady]);
|
}, [isReady]);
|
||||||
|
|||||||
-77
@@ -1,77 +0,0 @@
|
|||||||
import { faArrowUpRightFromSquare, faBookOpen, faPlus } from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
|
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
|
||||||
import { Button } from "@app/components/v2";
|
|
||||||
import { OrgPermissionSubjects } from "@app/context";
|
|
||||||
import { OrgPermissionAppConnectionActions } from "@app/context/OrgPermissionContext/types";
|
|
||||||
import { withPermission } from "@app/hoc";
|
|
||||||
import { usePopUp } from "@app/hooks";
|
|
||||||
|
|
||||||
import { AddAppConnectionModal, AppConnectionsTable } from "./components";
|
|
||||||
|
|
||||||
export const AppConnectionsTab = withPermission(
|
|
||||||
() => {
|
|
||||||
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["addConnection"] as const);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
|
||||||
<div className="mb-4 flex items-center">
|
|
||||||
<div>
|
|
||||||
<div className="flex items-start gap-1">
|
|
||||||
<p className="text-xl font-semibold text-mineshaft-100">App Connections</p>
|
|
||||||
<a
|
|
||||||
href="https://infisical.com/docs/integrations/app-connections/overview"
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
>
|
|
||||||
<div className="ml-1 mt-[0.32rem] inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
|
||||||
<FontAwesomeIcon icon={faBookOpen} className="mr-1.5" />
|
|
||||||
<span>Docs</span>
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faArrowUpRightFromSquare}
|
|
||||||
className="mb-[0.07rem] ml-1.5 text-[10px]"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<p className="text-sm text-bunker-300">
|
|
||||||
Create and configure connections with third-party apps for re-use across Infisical
|
|
||||||
projects
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<OrgPermissionCan
|
|
||||||
I={OrgPermissionAppConnectionActions.Create}
|
|
||||||
a={OrgPermissionSubjects.AppConnections}
|
|
||||||
>
|
|
||||||
{(isAllowed) => (
|
|
||||||
<Button
|
|
||||||
colorSchema="secondary"
|
|
||||||
type="submit"
|
|
||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
|
||||||
onClick={() => {
|
|
||||||
handlePopUpOpen("addConnection");
|
|
||||||
}}
|
|
||||||
isDisabled={!isAllowed}
|
|
||||||
className="ml-auto"
|
|
||||||
>
|
|
||||||
Add Connection
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</OrgPermissionCan>
|
|
||||||
</div>
|
|
||||||
<AppConnectionsTable />
|
|
||||||
<AddAppConnectionModal
|
|
||||||
isOpen={popUp.addConnection.isOpen}
|
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("addConnection", isOpen)}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
{
|
|
||||||
action: OrgPermissionAppConnectionActions.Read,
|
|
||||||
subject: OrgPermissionSubjects.AppConnections
|
|
||||||
}
|
|
||||||
);
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { AppConnectionsTab } from "./AppConnectionsTab";
|
|
||||||
@@ -4,7 +4,6 @@ import { useSearch } from "@tanstack/react-router";
|
|||||||
import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
|
|
||||||
import { AppConnectionsTab } from "../AppConnectionsTab";
|
|
||||||
import { AuditLogStreamsTab } from "../AuditLogStreamTab";
|
import { AuditLogStreamsTab } from "../AuditLogStreamTab";
|
||||||
import { ImportTab } from "../ImportTab";
|
import { ImportTab } from "../ImportTab";
|
||||||
import { OrgAuthTab } from "../OrgAuthTab";
|
import { OrgAuthTab } from "../OrgAuthTab";
|
||||||
@@ -26,7 +25,6 @@ export const OrgTabGroup = () => {
|
|||||||
key: "workflow-integrations",
|
key: "workflow-integrations",
|
||||||
component: OrgWorkflowIntegrationTab
|
component: OrgWorkflowIntegrationTab
|
||||||
},
|
},
|
||||||
{ name: "App Connections", key: "app-connections", component: AppConnectionsTab },
|
|
||||||
{ name: "Audit Log Streams", key: "tag-audit-log-streams", component: AuditLogStreamsTab },
|
{ name: "Audit Log Streams", key: "tag-audit-log-streams", component: AuditLogStreamsTab },
|
||||||
{ name: "Import", key: "tab-import", component: ImportTab },
|
{ name: "Import", key: "tab-import", component: ImportTab },
|
||||||
{ name: "Project Templates", key: "project-templates", component: ProjectTemplatesTab }
|
{ name: "Project Templates", key: "project-templates", component: ProjectTemplatesTab }
|
||||||
|
|||||||
+125
-85
@@ -1,12 +1,12 @@
|
|||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { Controller, useForm } from "react-hook-form";
|
import { Controller, useFieldArray, useForm } from "react-hook-form";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { zodResolver } from "@hookform/resolvers/zod";
|
import { zodResolver } from "@hookform/resolvers/zod";
|
||||||
import { Link } from "@tanstack/react-router";
|
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { Button, FilterableSelect, FormControl, Modal, ModalContent } from "@app/components/v2";
|
import { Button, FilterableSelect, FormControl, Modal, ModalContent } from "@app/components/v2";
|
||||||
|
import { CreatableSelect } from "@app/components/v2/CreatableSelect";
|
||||||
import { useOrganization, useWorkspace } from "@app/context";
|
import { useOrganization, useWorkspace } from "@app/context";
|
||||||
import {
|
import {
|
||||||
useAddUsersToOrg,
|
useAddUsersToOrg,
|
||||||
@@ -19,7 +19,15 @@ import { ProjectVersion } from "@app/hooks/api/workspace/types";
|
|||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
const addMemberFormSchema = z.object({
|
const addMemberFormSchema = z.object({
|
||||||
orgMemberships: z.array(z.object({ label: z.string().trim(), value: z.string().trim() })).min(1),
|
orgMemberships: z
|
||||||
|
.array(
|
||||||
|
z.object({
|
||||||
|
label: z.string().trim(),
|
||||||
|
value: z.string().trim(),
|
||||||
|
isNewInvitee: z.boolean().optional()
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.min(1),
|
||||||
projectRoleSlugs: z.array(z.object({ slug: z.string().trim(), name: z.string().trim() })).min(1)
|
projectRoleSlugs: z.array(z.object({ slug: z.string().trim(), name: z.string().trim() })).min(1)
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -60,7 +68,12 @@ export const AddMemberModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
if (!currentWorkspace) return;
|
if (!currentWorkspace) return;
|
||||||
if (!currentOrg?.id) return;
|
if (!currentOrg?.id) return;
|
||||||
|
|
||||||
const selectedMembers = orgMemberships.map((orgMembership) =>
|
const existingMembers = orgMemberships.filter((membership) => !membership.isNewInvitee);
|
||||||
|
const newInvitees = orgMemberships
|
||||||
|
.filter((membership) => membership.isNewInvitee)
|
||||||
|
.map((membership) => membership.value);
|
||||||
|
|
||||||
|
const selectedMembers = existingMembers.map((orgMembership) =>
|
||||||
orgUsers?.find((orgUser) => orgUser.id === orgMembership.value)
|
orgUsers?.find((orgUser) => orgUser.id === orgMembership.value)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -76,11 +89,11 @@ export const AddMemberModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
const inviteeEmails = selectedMembers
|
const inviteeEmails = selectedMembers
|
||||||
.map((member) => member?.user.username as string)
|
.map((member) => member?.user.username as string)
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
if (inviteeEmails.length) {
|
if (inviteeEmails.length || newInvitees.length) {
|
||||||
await addMembersToProject({
|
await addMembersToProject({
|
||||||
inviteeEmails,
|
inviteeEmails: [...inviteeEmails, ...newInvitees],
|
||||||
organizationId: orgId,
|
organizationId: orgId,
|
||||||
organizationRoleSlug: ProjectMembershipRole.Member, // ? This doesn't apply in this case, because we know the users being added are already part of the organization
|
organizationRoleSlug: ProjectMembershipRole.Member, // only applies to new invites
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
slug: currentWorkspace.slug,
|
slug: currentWorkspace.slug,
|
||||||
@@ -125,6 +138,8 @@ export const AddMemberModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
const selectedOrgMemberships = watch("orgMemberships");
|
const selectedOrgMemberships = watch("orgMemberships");
|
||||||
const selectedRoleSlugs = watch("projectRoleSlugs");
|
const selectedRoleSlugs = watch("projectRoleSlugs");
|
||||||
|
|
||||||
|
const { append } = useFieldArray<TAddMemberForm>({ control, name: "orgMemberships" });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={popUp?.addMember?.isOpen}
|
isOpen={popUp?.addMember?.isOpen}
|
||||||
@@ -135,87 +150,112 @@ export const AddMemberModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
title={t("section.members.add-dialog.add-member-to-project") as string}
|
title={t("section.members.add-dialog.add-member-to-project") as string}
|
||||||
subTitle={t("section.members.add-dialog.user-will-email")}
|
subTitle={t("section.members.add-dialog.user-will-email")}
|
||||||
>
|
>
|
||||||
{filteredOrgUsers.length ? (
|
<form onSubmit={handleSubmit(onAddMembers)}>
|
||||||
<form onSubmit={handleSubmit(onAddMembers)}>
|
<div className="flex w-full flex-col items-start gap-2">
|
||||||
<div className="flex w-full flex-col items-start gap-2">
|
<Controller
|
||||||
<Controller
|
control={control}
|
||||||
control={control}
|
name="orgMemberships"
|
||||||
name="orgMemberships"
|
render={({ field }) => (
|
||||||
render={({ field }) => (
|
<FormControl
|
||||||
<FormControl
|
className="w-full"
|
||||||
className="w-full"
|
isError={!!errors.orgMemberships?.length}
|
||||||
isError={!!errors.orgMemberships?.length}
|
errorText={errors.orgMemberships?.[0]?.message}
|
||||||
errorText={errors.orgMemberships?.[0]?.message}
|
label="Invite users to project"
|
||||||
label="Invite users to project"
|
helperText="You can invite new users to your organzation by typing out their email address"
|
||||||
>
|
>
|
||||||
<FilterableSelect
|
<CreatableSelect
|
||||||
className="w-full"
|
noOptionsMessage={() => (
|
||||||
placeholder="Add one or more users..."
|
<>
|
||||||
isMulti
|
<p>
|
||||||
name="members"
|
{!filteredOrgUsers.length && (
|
||||||
options={filteredOrgUsers}
|
<p>All organization members are already assigned to this project.</p>
|
||||||
value={field.value}
|
)}
|
||||||
onChange={field.onChange}
|
</p>
|
||||||
/>
|
<p>Add new users to your organization by typing out their email address.</p>
|
||||||
</FormControl>
|
</>
|
||||||
)}
|
)}
|
||||||
/>
|
onCreateOption={(inputValue) =>
|
||||||
|
append({ label: inputValue, value: inputValue, isNewInvitee: true })
|
||||||
|
}
|
||||||
|
formatCreateLabel={(inputValue) => `Invite "${inputValue}"`}
|
||||||
|
isValidNewOption={(input) =>
|
||||||
|
Boolean(input) &&
|
||||||
|
z.string().email().safeParse(input).success &&
|
||||||
|
!orgUsers
|
||||||
|
?.flatMap(({ user }) => {
|
||||||
|
const emails: string[] = [];
|
||||||
|
|
||||||
<Controller
|
if (user.email) {
|
||||||
control={control}
|
emails.push(user.email);
|
||||||
name="projectRoleSlugs"
|
}
|
||||||
render={({ field: { onChange, value }, fieldState: { error } }) => (
|
|
||||||
<FormControl
|
if (user.username) {
|
||||||
|
emails.push(user.username);
|
||||||
|
}
|
||||||
|
|
||||||
|
return emails;
|
||||||
|
})
|
||||||
|
.includes(input)
|
||||||
|
}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
label="Select roles"
|
placeholder="Add one or more users..."
|
||||||
tooltipText="Select the roles that you wish to assign to the users"
|
isMulti
|
||||||
errorText={error?.message}
|
name="members"
|
||||||
isError={Boolean(error)}
|
options={filteredOrgUsers}
|
||||||
>
|
value={field.value}
|
||||||
<FilterableSelect
|
onChange={field.onChange}
|
||||||
options={roles}
|
/>
|
||||||
placeholder="Select roles..."
|
</FormControl>
|
||||||
value={value}
|
)}
|
||||||
onChange={onChange}
|
/>
|
||||||
isMulti
|
|
||||||
getOptionValue={(option) => option.slug}
|
<Controller
|
||||||
getOptionLabel={(option) => option.name}
|
control={control}
|
||||||
/>
|
name="projectRoleSlugs"
|
||||||
</FormControl>
|
render={({ field: { onChange, value }, fieldState: { error } }) => (
|
||||||
)}
|
<FormControl
|
||||||
/>
|
className="w-full"
|
||||||
</div>
|
label="Select roles"
|
||||||
<div className="mt-8 flex items-center">
|
tooltipText="Select the roles that you wish to assign to the users"
|
||||||
<Button
|
errorText={error?.message}
|
||||||
className="mr-4"
|
isError={Boolean(error)}
|
||||||
size="sm"
|
>
|
||||||
type="submit"
|
<FilterableSelect
|
||||||
isLoading={isSubmitting}
|
options={roles}
|
||||||
isDisabled={
|
placeholder="Select roles..."
|
||||||
isSubmitting ||
|
value={value}
|
||||||
selectedOrgMemberships.length === 0 ||
|
onChange={onChange}
|
||||||
selectedRoleSlugs.length === 0
|
isMulti
|
||||||
}
|
getOptionValue={(option) => option.slug}
|
||||||
>
|
getOptionLabel={(option) => option.name}
|
||||||
Add Members
|
/>
|
||||||
</Button>
|
</FormControl>
|
||||||
<Button
|
)}
|
||||||
colorSchema="secondary"
|
/>
|
||||||
variant="plain"
|
|
||||||
onClick={() => handlePopUpToggle("addMember", false)}
|
|
||||||
>
|
|
||||||
Cancel
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
) : (
|
|
||||||
<div className="flex flex-col space-y-4">
|
|
||||||
<div>All the users in your organization are already invited.</div>
|
|
||||||
<Link to={"/organization/access-management" as const}>
|
|
||||||
<Button variant="outline_bg">Add users to organization</Button>
|
|
||||||
</Link>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
<div className="mt-8 flex items-center">
|
||||||
|
<Button
|
||||||
|
className="mr-4"
|
||||||
|
size="sm"
|
||||||
|
type="submit"
|
||||||
|
isLoading={isSubmitting}
|
||||||
|
isDisabled={
|
||||||
|
isSubmitting ||
|
||||||
|
selectedOrgMemberships.length === 0 ||
|
||||||
|
selectedRoleSlugs.length === 0
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Add Members
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
colorSchema="secondary"
|
||||||
|
variant="plain"
|
||||||
|
onClick={() => handlePopUpToggle("addMember", false)}
|
||||||
|
>
|
||||||
|
Cancel
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { IntegrationDetailsByIDPage } from "./IntegrationsDetailsByIDPage";
|
import { IntegrationDetailsByIDPage } from "./IntegrationsDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export const IntegrationsListPage = () => {
|
|||||||
const updateSelectedTab = (tab: string) => {
|
const updateSelectedTab = (tab: string) => {
|
||||||
navigate({
|
navigate({
|
||||||
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
to: ROUTE_PATHS.SecretManager.IntegrationsListPage.path,
|
||||||
search: (prev) => ({ ...prev, selectedTab: tab }),
|
search: (prev) => ({ ...prev, selectedTab: tab as IntegrationsListPageTabs }),
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -227,7 +227,8 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => {
|
|||||||
await updateSync.mutateAsync({
|
await updateSync.mutateAsync({
|
||||||
syncId: secretSync.id,
|
syncId: secretSync.id,
|
||||||
destination: secretSync.destination,
|
destination: secretSync.destination,
|
||||||
isAutoSyncEnabled
|
isAutoSyncEnabled,
|
||||||
|
projectId: secretSync.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
@@ -248,7 +249,8 @@ export const SecretSyncsTable = ({ secretSyncs }: Props) => {
|
|||||||
try {
|
try {
|
||||||
await triggerSync.mutateAsync({
|
await triggerSync.mutateAsync({
|
||||||
syncId: secretSync.id,
|
syncId: secretSync.id,
|
||||||
destination: secretSync.destination
|
destination: secretSync.destination,
|
||||||
|
projectId: secretSync.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute, redirect } from "@tanstack/react-router";
|
||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { workspaceKeys } from "@app/hooks/api";
|
||||||
|
import { fetchSecretSyncsByProjectId, secretSyncKeys } from "@app/hooks/api/secretSyncs";
|
||||||
|
import { fetchWorkspaceIntegrations } from "@app/hooks/api/workspace/queries";
|
||||||
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { IntegrationsListPage } from "./IntegrationsListPage";
|
import { IntegrationsListPage } from "./IntegrationsListPage";
|
||||||
|
|
||||||
const IntegrationsListPageQuerySchema = z.object({
|
const IntegrationsListPageQuerySchema = z.object({
|
||||||
selectedTab: z
|
selectedTab: z.nativeEnum(IntegrationsListPageTabs).optional()
|
||||||
.nativeEnum(IntegrationsListPageTabs)
|
|
||||||
.catch(IntegrationsListPageTabs.NativeIntegrations)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -17,7 +18,47 @@ export const Route = createFileRoute(
|
|||||||
)({
|
)({
|
||||||
component: IntegrationsListPage,
|
component: IntegrationsListPage,
|
||||||
validateSearch: zodValidator(IntegrationsListPageQuerySchema),
|
validateSearch: zodValidator(IntegrationsListPageQuerySchema),
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: async ({ context, search, params: { projectId } }) => {
|
||||||
|
if (!search.selectedTab) {
|
||||||
|
const secretSyncs = await context.queryClient.ensureQueryData({
|
||||||
|
queryKey: secretSyncKeys.list(projectId),
|
||||||
|
queryFn: () => fetchSecretSyncsByProjectId(projectId)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (secretSyncs.length) {
|
||||||
|
throw redirect({
|
||||||
|
to: "/secret-manager/$projectId/integrations",
|
||||||
|
params: {
|
||||||
|
projectId
|
||||||
|
},
|
||||||
|
search: { selectedTab: IntegrationsListPageTabs.SecretSyncs }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const integrations = await context.queryClient.ensureQueryData({
|
||||||
|
queryKey: workspaceKeys.getWorkspaceIntegrations(projectId),
|
||||||
|
queryFn: () => fetchWorkspaceIntegrations(projectId)
|
||||||
|
});
|
||||||
|
|
||||||
|
if (integrations.length) {
|
||||||
|
throw redirect({
|
||||||
|
to: "/secret-manager/$projectId/integrations",
|
||||||
|
params: {
|
||||||
|
projectId
|
||||||
|
},
|
||||||
|
search: { selectedTab: IntegrationsListPageTabs.NativeIntegrations }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
throw redirect({
|
||||||
|
to: "/secret-manager/$projectId/integrations",
|
||||||
|
params: {
|
||||||
|
projectId
|
||||||
|
},
|
||||||
|
search: { selectedTab: IntegrationsListPageTabs.SecretSyncs }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
|
|||||||
+4
-2
@@ -92,7 +92,8 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {
|
|||||||
await updateSync.mutateAsync({
|
await updateSync.mutateAsync({
|
||||||
syncId: secretSync.id,
|
syncId: secretSync.id,
|
||||||
destination: secretSync.destination,
|
destination: secretSync.destination,
|
||||||
isAutoSyncEnabled
|
isAutoSyncEnabled,
|
||||||
|
projectId: secretSync.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
@@ -111,7 +112,8 @@ export const SecretSyncActionTriggers = ({ secretSync }: Props) => {
|
|||||||
try {
|
try {
|
||||||
await triggerSyncSecrets.mutateAsync({
|
await triggerSyncSecrets.mutateAsync({
|
||||||
syncId: secretSync.id,
|
syncId: secretSync.id,
|
||||||
destination: secretSync.destination
|
destination: secretSync.destination,
|
||||||
|
projectId: secretSync.projectId
|
||||||
});
|
});
|
||||||
|
|
||||||
createNotification({
|
createNotification({
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { SecretSyncDetailsByIDPage } from "./SecretSyncDetailsByIDPage";
|
import { SecretSyncDetailsByIDPage } from "./SecretSyncDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.SecretSyncs
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AWSParameterStoreAuthorizeIntegrationPage } from "./AwsParameterStoreAuthorizePage";
|
import { AWSParameterStoreAuthorizeIntegrationPage } from "./AwsParameterStoreAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -30,6 +30,7 @@ import { useWorkspace } from "@app/context";
|
|||||||
import { useCreateIntegration } from "@app/hooks/api";
|
import { useCreateIntegration } from "@app/hooks/api";
|
||||||
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
||||||
import { useGetIntegrationAuthAwsKmsKeys } from "@app/hooks/api/integrationAuth/queries";
|
import { useGetIntegrationAuthAwsKmsKeys } from "@app/hooks/api/integrationAuth/queries";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum TabSections {
|
enum TabSections {
|
||||||
Connection = "connection",
|
Connection = "connection",
|
||||||
@@ -158,6 +159,9 @@ export const AWSParameterStoreConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AWSParameterStoreConfigurePage } from "./AwsParamterStoreConfigurePage";
|
import { AWSParameterStoreConfigurePage } from "./AwsParamterStoreConfigurePage";
|
||||||
|
|
||||||
const AwsParameterStoreConfigurePageQueryParamsSchema = z.object({
|
const AwsParameterStoreConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AWSSecretManagerAuthorizePage } from "./AwsSecretManagerAuthorizePage";
|
import { AWSSecretManagerAuthorizePage } from "./AwsSecretManagerAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -38,6 +38,7 @@ import {
|
|||||||
IntegrationMappingBehavior,
|
IntegrationMappingBehavior,
|
||||||
IntegrationMetadataSyncMode
|
IntegrationMetadataSyncMode
|
||||||
} from "@app/hooks/api/integrations/types";
|
} from "@app/hooks/api/integrations/types";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum TabSections {
|
enum TabSections {
|
||||||
Connection = "connection",
|
Connection = "connection",
|
||||||
@@ -206,6 +207,9 @@ export const AwsSecretManagerConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AwsSecretManagerConfigurePage } from "./AwsSecretManagerConfigurePage";
|
import { AwsSecretManagerConfigurePage } from "./AwsSecretManagerConfigurePage";
|
||||||
|
|
||||||
const AwsSecretManagerConfigurePageQueryParamsSchema = z.object({
|
const AwsSecretManagerConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -26,6 +26,7 @@ import { useCreateIntegration } from "@app/hooks/api";
|
|||||||
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
||||||
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
||||||
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
const schema = z.object({
|
const schema = z.object({
|
||||||
baseUrl: z
|
baseUrl: z
|
||||||
@@ -133,6 +134,9 @@ export const AzureAppConfigurationConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureAppConfigurationConfigurePage } from "./AzureAppConfigurationConfigurePage";
|
import { AzureAppConfigurationConfigurePage } from "./AzureAppConfigurationConfigurePage";
|
||||||
|
|
||||||
const AzureAppConfigurationPageQueryParamsSchema = z.object({
|
const AzureAppConfigurationPageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureAppConfigurationOauthCallbackPage } from "./AzureAppConfigurationOauthCallbackPage";
|
import { AzureAppConfigurationOauthCallbackPage } from "./AzureAppConfigurationOauthCallbackPage";
|
||||||
|
|
||||||
export const AzureAppConfigurationOauthCallbackPageQueryParamsSchema = z.object({
|
export const AzureAppConfigurationOauthCallbackPageQueryParamsSchema = z.object({
|
||||||
@@ -22,7 +24,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureDevopsAuthorizePage } from "./AzureDevopsAuthorizePage";
|
import { AzureDevopsAuthorizePage } from "./AzureDevopsAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -21,6 +21,7 @@ import {
|
|||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const AzureDevopsConfigurePage = () => {
|
export const AzureDevopsConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -82,6 +83,9 @@ export const AzureDevopsConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureDevopsConfigurePage } from "./AzureDevopsConfigurePage";
|
import { AzureDevopsConfigurePage } from "./AzureDevopsConfigurePage";
|
||||||
|
|
||||||
const AzureDevopsConfigurePageQueryParamsSchema = z.object({
|
const AzureDevopsConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
import z from "zod";
|
import z from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureKeyVaultAuthorizePage } from "./AzureKeyVaultAuthorizePage";
|
import { AzureKeyVaultAuthorizePage } from "./AzureKeyVaultAuthorizePage";
|
||||||
|
|
||||||
const PageQueryParamsSchema = z.object({
|
const PageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -16,6 +16,7 @@ import { useCreateIntegration } from "@app/hooks/api";
|
|||||||
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
import { useGetIntegrationAuthById } from "@app/hooks/api/integrationAuth";
|
||||||
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
||||||
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
const initialSyncBehaviors = [
|
const initialSyncBehaviors = [
|
||||||
{
|
{
|
||||||
@@ -90,6 +91,9 @@ export const AzureKeyVaultConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureKeyVaultConfigurePage } from "./AzureKeyVaultConfigurePage";
|
import { AzureKeyVaultConfigurePage } from "./AzureKeyVaultConfigurePage";
|
||||||
|
|
||||||
const AzureKeyVaultConfigurePageQueryParamsSchema = z.object({
|
const AzureKeyVaultConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { AzureKeyVaultOauthCallbackPage } from "./AzureKeyVaultOauthCallback";
|
import { AzureKeyVaultOauthCallbackPage } from "./AzureKeyVaultOauthCallback";
|
||||||
|
|
||||||
export const AzureKeyVaultOauthCallbackQueryParamsSchema = z.object({
|
export const AzureKeyVaultOauthCallbackQueryParamsSchema = z.object({
|
||||||
@@ -22,7 +24,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -23,6 +23,7 @@ import {
|
|||||||
useGetIntegrationAuthBitBucketWorkspaces
|
useGetIntegrationAuthBitBucketWorkspaces
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { useGetIntegrationAuthBitBucketEnvironments } from "@app/hooks/api/integrationAuth/queries";
|
import { useGetIntegrationAuthBitBucketEnvironments } from "@app/hooks/api/integrationAuth/queries";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum BitbucketScope {
|
enum BitbucketScope {
|
||||||
Repo = "repo",
|
Repo = "repo",
|
||||||
@@ -131,6 +132,9 @@ export const BitbucketConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { BitbucketConfigurePage } from "./BitbucketConfigurePage";
|
import { BitbucketConfigurePage } from "./BitbucketConfigurePage";
|
||||||
|
|
||||||
const BitbucketConfigurePageQueryParamsSchema = z.object({
|
const BitbucketConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { BitbucketOauthCallbackPage } from "./BitbucketOauthCallbackPage";
|
import { BitbucketOauthCallbackPage } from "./BitbucketOauthCallbackPage";
|
||||||
|
|
||||||
export const BitbucketOauthCallbackQueryParamsSchema = z.object({
|
export const BitbucketOauthCallbackQueryParamsSchema = z.object({
|
||||||
@@ -22,7 +24,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { ChecklyAuthorizePage } from "./ChecklyAuthorizePage";
|
import { ChecklyAuthorizePage } from "./ChecklyAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -27,6 +27,7 @@ import {
|
|||||||
useGetIntegrationAuthChecklyGroups
|
useGetIntegrationAuthChecklyGroups
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
import { useGetWorkspaceById } from "@app/hooks/api/workspace";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum TabSections {
|
enum TabSections {
|
||||||
Connection = "connection",
|
Connection = "connection",
|
||||||
@@ -115,6 +116,9 @@ export const ChecklyConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { ChecklyConfigurePage } from "./ChecklyConfigurePage";
|
import { ChecklyConfigurePage } from "./ChecklyConfigurePage";
|
||||||
|
|
||||||
const ChecklyConfigurePageQueryParamsSchema = z.object({
|
const ChecklyConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CircleCIAuthorizePage } from "./CircleCIAuthorizePage";
|
import { CircleCIAuthorizePage } from "./CircleCIAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -21,6 +21,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
|
|||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
import { useCreateIntegration, useGetIntegrationAuthCircleCIOrganizations } from "@app/hooks/api";
|
import { useCreateIntegration, useGetIntegrationAuthCircleCIOrganizations } from "@app/hooks/api";
|
||||||
import { CircleCiScope } from "@app/hooks/api/integrationAuth/types";
|
import { CircleCiScope } from "@app/hooks/api/integrationAuth/types";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
const formSchema = z.discriminatedUnion("scope", [
|
const formSchema = z.discriminatedUnion("scope", [
|
||||||
z.object({
|
z.object({
|
||||||
@@ -105,6 +106,9 @@ export const CircleCIConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CircleCIConfigurePage } from "./CircleCIConfigurePage";
|
import { CircleCIConfigurePage } from "./CircleCIConfigurePage";
|
||||||
|
|
||||||
const CircleCIConfigurePageQueryParamsSchema = z.object({
|
const CircleCIConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { Cloud66AuthorizePage } from "./Cloud66AuthorizePage";
|
import { Cloud66AuthorizePage } from "./Cloud66AuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -17,6 +17,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const Cloud66ConfigurePage = () => {
|
export const Cloud66ConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -77,6 +78,9 @@ export const Cloud66ConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { Cloud66ConfigurePage } from "./Cloud66ConfigurePage";
|
import { Cloud66ConfigurePage } from "./Cloud66ConfigurePage";
|
||||||
|
|
||||||
const Cloud66ConfigurePageQueryParamsSchema = z.object({
|
const Cloud66ConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CloudflarePagesAuthorizePage } from "./CloudflarePagesAuthorizePage";
|
import { CloudflarePagesAuthorizePage } from "./CloudflarePagesAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -20,6 +20,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
const cloudflareEnvironments = [
|
const cloudflareEnvironments = [
|
||||||
{ name: "Production", slug: "production" },
|
{ name: "Production", slug: "production" },
|
||||||
@@ -96,6 +97,9 @@ export const CloudflarePagesConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CloudflarePagesConfigurePage } from "./CloudflarePagesConfigurePage";
|
import { CloudflarePagesConfigurePage } from "./CloudflarePagesConfigurePage";
|
||||||
|
|
||||||
const CloudflarePagesConfigurePageQueryParamsSchema = z.object({
|
const CloudflarePagesConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CloudflareWorkersAuthorizePage } from "./CloudflareWorkersAuthorizePage";
|
import { CloudflareWorkersAuthorizePage } from "./CloudflareWorkersAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -12,6 +12,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const CloudflareWorkersConfigurePage = () => {
|
export const CloudflareWorkersConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -69,6 +70,9 @@ export const CloudflareWorkersConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CloudflareWorkersConfigurePage } from "./CloudflareWorkersConfigurePage";
|
import { CloudflareWorkersConfigurePage } from "./CloudflareWorkersConfigurePage";
|
||||||
|
|
||||||
const CloudflareWorkersConfigurePageQueryParamsSchema = z.object({
|
const CloudflareWorkersConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CodefreshAuthorizePage } from "./CodefreshAuthorizePage";
|
import { CodefreshAuthorizePage } from "./CodefreshAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -17,6 +17,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const CodefreshConfigurePage = () => {
|
export const CodefreshConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -73,6 +74,9 @@ export const CodefreshConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { CodefreshConfigurePage } from "./CodefreshConfigurePage";
|
import { CodefreshConfigurePage } from "./CodefreshConfigurePage";
|
||||||
|
|
||||||
const CodefreshConfigurePageQueryParamsSchema = z.object({
|
const CodefreshConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { DatabricksAuthorizePage } from "./DatabricksAuthorizePage";
|
import { DatabricksAuthorizePage } from "./DatabricksAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -26,6 +26,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const DatabricksConfigurePage = () => {
|
export const DatabricksConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -89,6 +90,9 @@ export const DatabricksConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { DatabricksConfigurePage } from "./DatabricksConfigurePage";
|
import { DatabricksConfigurePage } from "./DatabricksConfigurePage";
|
||||||
|
|
||||||
const DatabricksConfigurePageQueryParamsSchema = z.object({
|
const DatabricksConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { DigitalOceanAppPlatformAuthorizePage } from "./DigitalOceanAppPlatformAuthorizePage";
|
import { DigitalOceanAppPlatformAuthorizePage } from "./DigitalOceanAppPlatformAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -17,6 +17,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const DigitalOceanAppPlatformConfigurePage = () => {
|
export const DigitalOceanAppPlatformConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -74,6 +75,9 @@ export const DigitalOceanAppPlatformConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { DigitalOceanAppPlatformConfigurePage } from "./DigitalOceanAppPlatformConfigurePage";
|
import { DigitalOceanAppPlatformConfigurePage } from "./DigitalOceanAppPlatformConfigurePage";
|
||||||
|
|
||||||
const DigitalOceanAppPlatformConfigurePageQueryParamsSchema = z.object({
|
const DigitalOceanAppPlatformConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { FlyioAuthorizePage } from "./FlyioAuthorizePage";
|
import { FlyioAuthorizePage } from "./FlyioAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -27,6 +27,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
export const FlyioConfigurePage = () => {
|
export const FlyioConfigurePage = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -88,6 +89,9 @@ export const FlyioConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { FlyioConfigurePage } from "./FlyioConfigurePage";
|
import { FlyioConfigurePage } from "./FlyioConfigurePage";
|
||||||
|
|
||||||
const FlyioConfigurePageQueryParamsSchema = z.object({
|
const FlyioConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GcpSecretManagerAuthorizePage } from "./GcpSecretManagerAuthorizePage";
|
import { GcpSecretManagerAuthorizePage } from "./GcpSecretManagerAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -33,6 +33,7 @@ import {
|
|||||||
useGetIntegrationAuthApps,
|
useGetIntegrationAuthApps,
|
||||||
useGetIntegrationAuthById
|
useGetIntegrationAuthById
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum TabSections {
|
enum TabSections {
|
||||||
Connection = "connection",
|
Connection = "connection",
|
||||||
@@ -153,6 +154,9 @@ export const GcpSecretManagerConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GcpSecretManagerConfigurePage } from "./GcpSecretManagerConfigurePage";
|
import { GcpSecretManagerConfigurePage } from "./GcpSecretManagerConfigurePage";
|
||||||
|
|
||||||
const GcpConfigurePageQueryParamsSchema = z.object({
|
const GcpConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-1
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GcpSecretManagerOauthCallbackPage } from "./GcpSecretManagerOauthCallbackPage";
|
import { GcpSecretManagerOauthCallbackPage } from "./GcpSecretManagerOauthCallbackPage";
|
||||||
|
|
||||||
export const GcpSecretManagerOAuthCallbackPageQueryParamsSchema = z.object({
|
export const GcpSecretManagerOAuthCallbackPageQueryParamsSchema = z.object({
|
||||||
@@ -22,7 +24,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GithubAuthorizePage } from "./GithubAuthorizePage";
|
import { GithubAuthorizePage } from "./GithubAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -45,6 +45,7 @@ import {
|
|||||||
useGetIntegrationAuthGithubEnvs,
|
useGetIntegrationAuthGithubEnvs,
|
||||||
useGetIntegrationAuthGithubOrgs
|
useGetIntegrationAuthGithubOrgs
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
enum TabSections {
|
enum TabSections {
|
||||||
Connection = "connection",
|
Connection = "connection",
|
||||||
@@ -269,6 +270,9 @@ export const GithubConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GithubConfigurePage } from "./GithubConfigurePage";
|
import { GithubConfigurePage } from "./GithubConfigurePage";
|
||||||
|
|
||||||
const GithubConfigurePageQueryParamsSchema = z.object({
|
const GithubConfigurePageQueryParamsSchema = z.object({
|
||||||
@@ -21,7 +23,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GithubOauthCallbackPage } from "./GithubOauthCallbackPage";
|
import { GithubOauthCallbackPage } from "./GithubOauthCallbackPage";
|
||||||
|
|
||||||
export const GithubOAuthCallbackPageQueryParamsSchema = z.object({
|
export const GithubOAuthCallbackPageQueryParamsSchema = z.object({
|
||||||
@@ -23,7 +25,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { GitlabAuthorizePage } from "./GitlabAuthorizePage";
|
import { GitlabAuthorizePage } from "./GitlabAuthorizePage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
@@ -14,7 +16,10 @@ export const Route = createFileRoute(
|
|||||||
label: "Integrations",
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params
|
params,
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
+4
@@ -35,6 +35,7 @@ import {
|
|||||||
useGetIntegrationAuthTeams
|
useGetIntegrationAuthTeams
|
||||||
} from "@app/hooks/api/integrationAuth";
|
} from "@app/hooks/api/integrationAuth";
|
||||||
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
import { IntegrationSyncBehavior } from "@app/hooks/api/integrations/types";
|
||||||
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
const gitLabEntities = [
|
const gitLabEntities = [
|
||||||
{ name: "Individual", value: "individual" },
|
{ name: "Individual", value: "individual" },
|
||||||
@@ -177,6 +178,9 @@ export const GitlabConfigurePage = () => {
|
|||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/secret-manager/$projectId/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user