mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 15:27:27 +00:00
feat: fixed all ts url errors
This commit is contained in:
@@ -93,7 +93,7 @@ export default function NavHeader({
|
|||||||
<FontAwesomeIcon icon={faAngleRight} className="ml-3 mr-3 text-sm text-gray-400" />
|
<FontAwesomeIcon icon={faAngleRight} className="ml-3 mr-3 text-sm text-gray-400" />
|
||||||
{pageName === "Secrets" ? (
|
{pageName === "Secrets" ? (
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SecretManager}/$projectId/overview` as const}
|
to="/projects/$projectId/secret-manager/overview"
|
||||||
params={{ projectId: currentWorkspace.id }}
|
params={{ projectId: currentWorkspace.id }}
|
||||||
className="text-sm font-semibold text-primary/80 hover:text-primary"
|
className="text-sm font-semibold text-primary/80 hover:text-primary"
|
||||||
>
|
>
|
||||||
@@ -129,7 +129,7 @@ export default function NavHeader({
|
|||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<FontAwesomeIcon icon={faAngleRight} className="ml-3 mr-1.5 text-xs text-gray-400" />
|
<FontAwesomeIcon icon={faAngleRight} className="ml-3 mr-1.5 text-xs text-gray-400" />
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SecretManager}/$projectId/secrets/$envSlug` as const}
|
to={`/projects/$projectId/${ProjectType.SecretManager}/secrets/$envSlug` as const}
|
||||||
params={{ projectId: currentWorkspace.id, envSlug: routerEnvSlug }}
|
params={{ projectId: currentWorkspace.id, envSlug: routerEnvSlug }}
|
||||||
className="text-sm font-semibold text-primary/80 hover:text-primary"
|
className="text-sm font-semibold text-primary/80 hover:text-primary"
|
||||||
>
|
>
|
||||||
@@ -191,7 +191,7 @@ export default function NavHeader({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SecretManager}/$projectId/secrets/$envSlug` as const}
|
to={`/projects/$projectId/${ProjectType.SecretManager}/secrets/$envSlug` as const}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
envSlug: routerEnvSlug || ""
|
envSlug: routerEnvSlug || ""
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export const SecretDashboardPathBreadcrumb = ({
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SecretManager}/$projectId/secrets/$envSlug` as const}
|
to={`/projects/$projectId/${ProjectType.SecretManager}/secrets/$envSlug` as const}
|
||||||
params={{
|
params={{
|
||||||
projectId,
|
projectId,
|
||||||
envSlug: environmentSlug
|
envSlug: environmentSlug
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import z from "zod";
|
|||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { Button, FormControl, Input, Modal, ModalContent } from "@app/components/v2";
|
import { Button, FormControl, Input, Modal, ModalContent } from "@app/components/v2";
|
||||||
import { useCreateOrg, useSelectOrganization } from "@app/hooks/api";
|
import { useCreateOrg, useSelectOrganization } from "@app/hooks/api";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
import { GenericResourceNameSchema } from "@app/lib/schemas";
|
import { GenericResourceNameSchema } from "@app/lib/schemas";
|
||||||
|
|
||||||
const schema = z
|
const schema = z
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ const NewProjectForm = ({ onOpenChange }: NewProjectFormProps) => {
|
|||||||
createNotification({ text: "Project created", type: "success" });
|
createNotification({ text: "Project created", type: "success" });
|
||||||
reset();
|
reset();
|
||||||
onOpenChange(false);
|
onOpenChange(false);
|
||||||
navigate({ to: getProjectHomePage(project), params: { projectId: project.id } });
|
navigate({ to: getProjectHomePage(project.defaultType), params: { projectId: project.id } });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
createNotification({ text: "Failed to create project", type: "error" });
|
createNotification({ text: "Failed to create project", type: "error" });
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ReactNode, ComponentType } from "react";
|
import { ComponentType, ReactNode } from "react";
|
||||||
|
|
||||||
type ShouldWrapProps<T extends Record<string, any>> = {
|
type ShouldWrapProps<T extends Record<string, any>> = {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ export * from "./Card";
|
|||||||
export * from "./Checkbox";
|
export * from "./Checkbox";
|
||||||
export * from "./ConfirmActionModal";
|
export * from "./ConfirmActionModal";
|
||||||
export * from "./ContentLoader";
|
export * from "./ContentLoader";
|
||||||
export * from "./Divider";
|
|
||||||
export * from "./DatePicker";
|
export * from "./DatePicker";
|
||||||
export * from "./DeleteActionModal";
|
export * from "./DeleteActionModal";
|
||||||
|
export * from "./Divider";
|
||||||
export * from "./Drawer";
|
export * from "./Drawer";
|
||||||
export * from "./Dropdown";
|
export * from "./Dropdown";
|
||||||
export * from "./Editor";
|
export * from "./Editor";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apiRequest } from "@app/config/request";
|
import { apiRequest } from "@app/config/request";
|
||||||
import { createWorkspace } from "@app/hooks/api/workspace/queries";
|
import { createWorkspace } from "@app/hooks/api/workspace/queries";
|
||||||
import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
|
|
||||||
const secretsToBeAdded = [
|
const secretsToBeAdded = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export type IdentityMembershipOrg = {
|
|||||||
export type IdentityMembership = {
|
export type IdentityMembership = {
|
||||||
id: string;
|
id: string;
|
||||||
identity: Identity;
|
identity: Identity;
|
||||||
project: Pick<Workspace, "id" | "name" | "type">;
|
project: Pick<Workspace, "id" | "name" | "defaultType">;
|
||||||
roles: Array<
|
roles: Array<
|
||||||
{
|
{
|
||||||
id: string;
|
id: string;
|
||||||
|
|||||||
@@ -85,9 +85,7 @@ export const AdminSidebar = () => {
|
|||||||
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
||||||
return (
|
return (
|
||||||
<Link key={tab.link} to={tab.link}>
|
<Link key={tab.link} to={tab.link}>
|
||||||
<MenuItem isSelected={Boolean(isActive)} icon={tab.icon}>
|
<MenuItem isSelected={Boolean(isActive)}>{tab.label}</MenuItem>
|
||||||
{tab.label}
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -97,9 +95,7 @@ export const AdminSidebar = () => {
|
|||||||
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
||||||
return (
|
return (
|
||||||
<Link key={tab.link} to={tab.link}>
|
<Link key={tab.link} to={tab.link}>
|
||||||
<MenuItem isSelected={Boolean(isActive)} icon={tab.icon}>
|
<MenuItem isSelected={Boolean(isActive)}>{tab.label}</MenuItem>
|
||||||
{tab.label}
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -59,4 +59,3 @@ export const KmsLayout = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { KmsLayout } from "./KmsLayout";
|
export { KmsLayout } from "./KmsLayout";
|
||||||
|
|||||||
@@ -1,33 +1,25 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { faMobile } from "@fortawesome/free-solid-svg-icons";
|
import { faMobile } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Outlet, useLocation, useParams, useSearch } from "@tanstack/react-router";
|
import { Outlet, useParams } from "@tanstack/react-router";
|
||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
||||||
import { Banner } from "@app/components/page-frames/Banner";
|
import { Banner } from "@app/components/page-frames/Banner";
|
||||||
import { OrgPermissionSubjects, useOrgPermission, useServerConfig } from "@app/context";
|
import { useServerConfig } from "@app/context";
|
||||||
import { OrgPermissionSecretShareAction } from "@app/context/OrgPermissionContext/types";
|
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
|
|
||||||
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
|
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
|
||||||
import { OrgSidebar } from "./components/OrgSidebar";
|
|
||||||
import { Navbar } from "./components/NavBar";
|
import { Navbar } from "./components/NavBar";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { OrgSidebar } from "./components/OrgSidebar";
|
||||||
|
|
||||||
export const OrganizationLayout = () => {
|
export const OrganizationLayout = () => {
|
||||||
const { config } = useServerConfig();
|
const { config } = useServerConfig();
|
||||||
const { permission } = useOrgPermission();
|
|
||||||
const projectId = useParams({
|
const projectId = useParams({
|
||||||
strict: false,
|
strict: false,
|
||||||
select: (el) => el?.projectId
|
select: (el) => el?.projectId
|
||||||
});
|
});
|
||||||
const isInsideProject = Boolean(projectId);
|
const isInsideProject = Boolean(projectId);
|
||||||
console.log(isInsideProject);
|
|
||||||
|
|
||||||
const shouldShowProductsSidebar = permission.can(
|
|
||||||
OrgPermissionSecretShareAction.ManageSettings,
|
|
||||||
OrgPermissionSubjects.SecretShare
|
|
||||||
);
|
|
||||||
|
|
||||||
const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
|
const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
|
||||||
|
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
import { Link } from "@tanstack/react-router";
|
|
||||||
|
|
||||||
import { Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
|
||||||
|
|
||||||
export const DefaultSideBar = () => (
|
|
||||||
<Menu>
|
|
||||||
<MenuGroup title="Organization Control">
|
|
||||||
<Link to="/organization/access-management">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="groups">
|
|
||||||
Access Control
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/app-connections">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="jigsaw-puzzle">
|
|
||||||
App Connections
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/gateways">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="gateway" iconMode="reverse">
|
|
||||||
Gateways
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/sso">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="check">
|
|
||||||
Single Sign-On (SSO)
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Other">
|
|
||||||
<Link to="/organization/audit-logs">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="moving-block">
|
|
||||||
Audit Logs
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/billing">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="spinning-coin">
|
|
||||||
Usage & Billing
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/settings">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="toggle-settings">
|
|
||||||
Organization Settings
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
</Menu>
|
|
||||||
);
|
|
||||||
@@ -1,99 +0,0 @@
|
|||||||
import { faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
import { Link, useMatchRoute } from "@tanstack/react-router";
|
|
||||||
|
|
||||||
import { Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
type TProjectOverviewSideBarProps = {
|
|
||||||
type: ProjectType;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const ProjectOverviewSideBar = ({ type }: TProjectOverviewSideBarProps) => {
|
|
||||||
const matchRoute = useMatchRoute();
|
|
||||||
|
|
||||||
const isOverviewActive = !!matchRoute({
|
|
||||||
to: "/organization/projects",
|
|
||||||
fuzzy: false
|
|
||||||
});
|
|
||||||
|
|
||||||
let label: string;
|
|
||||||
let icon: string;
|
|
||||||
let link: string;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case ProjectType.CertificateManager:
|
|
||||||
label = "Cert Management";
|
|
||||||
icon = "note";
|
|
||||||
link = "https://infisical.com/docs/documentation/platform/pki/overview";
|
|
||||||
break;
|
|
||||||
case ProjectType.SecretManager:
|
|
||||||
label = "Secret Management";
|
|
||||||
icon = "sliding-carousel";
|
|
||||||
link = "https://infisical.com/docs/documentation/getting-started/introduction";
|
|
||||||
break;
|
|
||||||
case ProjectType.KMS:
|
|
||||||
label = "KMS";
|
|
||||||
icon = "unlock";
|
|
||||||
link = "https://infisical.com/docs/documentation/platform/kms/overview";
|
|
||||||
break;
|
|
||||||
case ProjectType.SSH:
|
|
||||||
label = "SSH";
|
|
||||||
icon = "verified";
|
|
||||||
link = "https://infisical.com/docs/documentation/platform/ssh/overview";
|
|
||||||
break;
|
|
||||||
case ProjectType.SecretScanning:
|
|
||||||
label = "Secret Scanning";
|
|
||||||
icon = "secret-scan";
|
|
||||||
link = "https://infisical.com/docs/documentation/platform/secret-scanning/overview";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new Error("Unknown project type");
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className="p-2 pt-3">
|
|
||||||
<a
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
href={link}
|
|
||||||
className="flex w-full items-center rounded-md border border-mineshaft-600 p-2 pl-3 transition-all duration-150 hover:bg-mineshaft-700"
|
|
||||||
>
|
|
||||||
<div className="mr-2 flex h-6 w-6 items-center justify-center rounded-md bg-mineshaft-500 p-4">
|
|
||||||
<FontAwesomeIcon
|
|
||||||
icon={faArrowUpRightFromSquare}
|
|
||||||
className="h-3.5 w-3.5 text-mineshaft-300"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="-mt-1 flex flex-grow flex-col text-white">
|
|
||||||
<div className="max-w-36 truncate text-ellipsis text-sm font-medium capitalize">
|
|
||||||
Infisical Docs
|
|
||||||
</div>
|
|
||||||
<div className="text-xs leading-[10px] text-mineshaft-400">
|
|
||||||
{type === ProjectType.SecretManager ? "Get Started" : `${label} Overview`}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<Menu>
|
|
||||||
<MenuGroup title="Overview">
|
|
||||||
<Link to={`/organization/${type}/overview`}>
|
|
||||||
<MenuItem isSelected={isOverviewActive} icon={icon}>
|
|
||||||
{label}
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Other">
|
|
||||||
<Link to={`/organization/${type}/settings`}>
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="toggle-settings">
|
|
||||||
Settings
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
</Menu>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { Link, useMatchRoute } from "@tanstack/react-router";
|
|
||||||
|
|
||||||
import { Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
|
||||||
|
|
||||||
export const SecretSharingSideBar = () => {
|
|
||||||
const matchRoute = useMatchRoute();
|
|
||||||
const isOverviewActive = !!matchRoute({
|
|
||||||
to: "/organization/secret-sharing",
|
|
||||||
fuzzy: false
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Menu>
|
|
||||||
<MenuGroup title="Overview">
|
|
||||||
<Link to="/organization/secret-sharing">
|
|
||||||
{() => (
|
|
||||||
<MenuItem isSelected={isOverviewActive} icon="lock-closed">
|
|
||||||
Secret Sharing
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Other">
|
|
||||||
<Link to="/organization/secret-sharing/settings">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem isSelected={isActive} icon="toggle-settings">
|
|
||||||
Settings
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
</Menu>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export * from "./DefaultSideBar";
|
|
||||||
export * from "./ProjectOverviewSideBar";
|
|
||||||
export * from "./SecretSharingSideBar";
|
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { faGithub, faSlack } from "@fortawesome/free-brands-svg-icons";
|
import { faGithub, faSlack } from "@fortawesome/free-brands-svg-icons";
|
||||||
|
import { faCircleQuestion } from "@fortawesome/free-regular-svg-icons";
|
||||||
import {
|
import {
|
||||||
faArrowUpRightFromSquare,
|
faArrowUpRightFromSquare,
|
||||||
faBook,
|
faBook,
|
||||||
@@ -13,7 +14,6 @@ import {
|
|||||||
faUser,
|
faUser,
|
||||||
faUsers
|
faUsers
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { faCircleQuestion } from "@fortawesome/free-regular-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useQueryClient } from "@tanstack/react-query";
|
import { useQueryClient } from "@tanstack/react-query";
|
||||||
import { Link, useNavigate, useRouter, useRouterState } from "@tanstack/react-router";
|
import { Link, useNavigate, useRouter, useRouterState } from "@tanstack/react-router";
|
||||||
@@ -29,6 +29,8 @@ import {
|
|||||||
DropdownMenuTrigger,
|
DropdownMenuTrigger,
|
||||||
IconButton,
|
IconButton,
|
||||||
Lottie,
|
Lottie,
|
||||||
|
Modal,
|
||||||
|
ModalContent,
|
||||||
TBreadcrumbFormat
|
TBreadcrumbFormat
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { envConfig } from "@app/config/env";
|
import { envConfig } from "@app/config/env";
|
||||||
@@ -42,6 +44,8 @@ import { SubscriptionPlan } from "@app/hooks/api/types";
|
|||||||
import { AuthMethod } from "@app/hooks/api/users/types";
|
import { AuthMethod } from "@app/hooks/api/users/types";
|
||||||
import { navigateUserToOrg } from "@app/pages/auth/LoginPage/Login.utils";
|
import { navigateUserToOrg } from "@app/pages/auth/LoginPage/Login.utils";
|
||||||
|
|
||||||
|
import { ServerAdminsPanel } from "../ServerAdminsPanel/ServerAdminsPanel";
|
||||||
|
|
||||||
const getPlan = (subscription: SubscriptionPlan) => {
|
const getPlan = (subscription: SubscriptionPlan) => {
|
||||||
if (subscription.groups) return "Enterprise";
|
if (subscription.groups) return "Enterprise";
|
||||||
if (subscription.pitRecovery) return "Pro";
|
if (subscription.pitRecovery) return "Pro";
|
||||||
@@ -82,6 +86,7 @@ export const Navbar = () => {
|
|||||||
const { currentOrg } = useOrganization();
|
const { currentOrg } = useOrganization();
|
||||||
const [openSupport, setOpenSupport] = useState(false);
|
const [openSupport, setOpenSupport] = useState(false);
|
||||||
const [openUser, setOpenUser] = useState(false);
|
const [openUser, setOpenUser] = useState(false);
|
||||||
|
const [showAdminsModal, setShowAdminsModal] = useState(false);
|
||||||
|
|
||||||
const { data: orgs } = useGetOrganizations();
|
const { data: orgs } = useGetOrganizations();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -366,6 +371,13 @@ export const Navbar = () => {
|
|||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
<Modal isOpen={showAdminsModal} onOpenChange={setShowAdminsModal}>
|
||||||
|
<ModalContent title="Server Administrators" subTitle="View all server administrators">
|
||||||
|
<div className="mb-2">
|
||||||
|
<ServerAdminsPanel />
|
||||||
|
</div>
|
||||||
|
</ModalContent>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ export const OrgSidebar = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
{currentOrg.secretsProductEnabled && (
|
{currentOrg.secretsProductEnabled && (
|
||||||
<Link to="/organization/secret-manager/overview">
|
<Link to="/organization/projects">
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuIconButton
|
<MenuIconButton
|
||||||
isSelected={
|
isSelected={
|
||||||
|
|||||||
@@ -1,34 +1,32 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import {
|
import {
|
||||||
faBook,
|
faBook,
|
||||||
faCheckCircle,
|
faCheckCircle,
|
||||||
faCog,
|
faCog,
|
||||||
|
faCubes,
|
||||||
faDoorClosed,
|
faDoorClosed,
|
||||||
faInfinity,
|
faInfinity,
|
||||||
faMoneyBill,
|
faMoneyBill,
|
||||||
faPlug,
|
faPlug,
|
||||||
|
faShare,
|
||||||
faUserCog,
|
faUserCog,
|
||||||
faUsers
|
faUsers
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link } from "@tanstack/react-router";
|
import { Link } from "@tanstack/react-router";
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
||||||
import { Menu, MenuGroup, MenuItem, Modal, ModalContent, Tooltip } from "@app/components/v2";
|
import { Menu, MenuGroup, MenuItem, Tooltip } from "@app/components/v2";
|
||||||
import { useOrganization, useSubscription, useUser } from "@app/context";
|
import { useOrganization, useSubscription, useUser } from "@app/context";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import { useGetOrgTrialUrl } from "@app/hooks/api";
|
import { useGetOrgTrialUrl } from "@app/hooks/api";
|
||||||
|
|
||||||
import { ServerAdminsPanel } from "../ServerAdminsPanel/ServerAdminsPanel";
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isHidden?: boolean;
|
isHidden?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const OrgSidebar = ({ isHidden }: Props) => {
|
export const OrgSidebar = ({ isHidden }: Props) => {
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
const [showAdminsModal, setShowAdminsModal] = useState(false);
|
|
||||||
|
|
||||||
const { user } = useUser();
|
const { user } = useUser();
|
||||||
const { mutateAsync } = useGetOrgTrialUrl();
|
const { mutateAsync } = useGetOrgTrialUrl();
|
||||||
@@ -55,8 +53,11 @@ export const OrgSidebar = ({ isHidden }: Props) => {
|
|||||||
<MenuGroup title="Overview">
|
<MenuGroup title="Overview">
|
||||||
<Link to="/organization/projects">
|
<Link to="/organization/projects">
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem isSelected={isActive} icon="notification-bell">
|
<MenuItem isSelected={isActive}>
|
||||||
Projects
|
<div className="mx-1">
|
||||||
|
<FontAwesomeIcon icon={faCubes} className="mr-4" />
|
||||||
|
Projects
|
||||||
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -136,8 +137,11 @@ export const OrgSidebar = ({ isHidden }: Props) => {
|
|||||||
<MenuGroup title="Others">
|
<MenuGroup title="Others">
|
||||||
<Link to="/organization/secret-sharing">
|
<Link to="/organization/secret-sharing">
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem isSelected={isActive} icon="lock-closed">
|
<MenuItem isSelected={isActive}>
|
||||||
Share Secret
|
<div className="mx-1">
|
||||||
|
<FontAwesomeIcon icon={faShare} className="mr-4" />
|
||||||
|
Share Secret
|
||||||
|
</div>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -208,13 +212,7 @@ export const OrgSidebar = ({ isHidden }: Props) => {
|
|||||||
</motion.aside>
|
</motion.aside>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
</AnimatePresence>
|
||||||
<Modal isOpen={showAdminsModal} onOpenChange={setShowAdminsModal}>
|
|
||||||
<ModalContent title="Server Administrators" subTitle="View all server administrators">
|
|
||||||
<div className="mb-2">
|
|
||||||
<ServerAdminsPanel />
|
|
||||||
</div>
|
|
||||||
</ModalContent>
|
|
||||||
</Modal>
|
|
||||||
<CreateOrgModal
|
<CreateOrgModal
|
||||||
isOpen={popUp?.createOrg?.isOpen}
|
isOpen={popUp?.createOrg?.isOpen}
|
||||||
onClose={() => handlePopUpToggle("createOrg", false)}
|
onClose={() => handlePopUpToggle("createOrg", false)}
|
||||||
|
|||||||
@@ -99,4 +99,3 @@ export const PkiManagerLayout = () => {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { PkiManagerLayout } from "./PkiManagerLayout";
|
export { PkiManagerLayout } from "./PkiManagerLayout";
|
||||||
|
|||||||
@@ -51,4 +51,3 @@ export const ProjectGeneralLayout = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
export { ProjectGeneralLayout } from "./ProjectGeneralLayout";
|
export { ProjectGeneralLayout } from "./ProjectGeneralLayout";
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ export const ProjectLayout = () => {
|
|||||||
{isSSH && (
|
{isSSH && (
|
||||||
<>
|
<>
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SSH}/$projectId/overview` as const}
|
to={`/projects/$projectId/${ProjectType.SSH}/overview` as const}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
@@ -237,7 +237,7 @@ export const ProjectLayout = () => {
|
|||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
{/* <Link
|
{/* <Link
|
||||||
to={`/${ProjectType.SSH}/$projectId/certificates` as const}
|
to={`/projects/$projectId/${ProjectType.SSH}/certificates` as const}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
@@ -255,7 +255,7 @@ export const ProjectLayout = () => {
|
|||||||
{(isAllowed) =>
|
{(isAllowed) =>
|
||||||
isAllowed && (
|
isAllowed && (
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SSH}/$projectId/cas` as const}
|
to={`/projects/$projectId/${ProjectType.SSH}/cas` as const}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|||||||
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { ShouldWrap } from "@app/components/utilities/ShouldWrapComponent";
|
||||||
import {
|
import {
|
||||||
Divider,
|
Divider,
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
@@ -16,12 +17,11 @@ import {
|
|||||||
Tooltip
|
Tooltip
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { useProjectPermission, useWorkspace } from "@app/context";
|
import { useProjectPermission, useWorkspace } from "@app/context";
|
||||||
|
import { getCurrentProductFromUrl } from "@app/helpers/project";
|
||||||
|
import { useLocalStorageState } from "@app/hooks";
|
||||||
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
|
|
||||||
import { AssumePrivilegeModeBanner } from "./components/AssumePrivilegeModeBanner";
|
import { AssumePrivilegeModeBanner } from "./components/AssumePrivilegeModeBanner";
|
||||||
import { useLocalStorageState } from "@app/hooks";
|
|
||||||
import { ShouldWrap } from "@app/components/utilities/ShouldWrapComponent";
|
|
||||||
import { getCurrentProductFromUrl } from "@app/helpers/project";
|
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
enum SidebarStyle {
|
enum SidebarStyle {
|
||||||
Expanded = "expanded",
|
Expanded = "expanded",
|
||||||
|
|||||||
+5
-13
@@ -6,6 +6,7 @@ import { useProjectPermission, useWorkspace } from "@app/context";
|
|||||||
import { useRemoveAssumeProjectPrivilege } from "@app/hooks/api";
|
import { useRemoveAssumeProjectPrivilege } from "@app/hooks/api";
|
||||||
import { ActorType } from "@app/hooks/api/auditLogs/enums";
|
import { ActorType } from "@app/hooks/api/auditLogs/enums";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
|
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||||
|
|
||||||
export const AssumePrivilegeModeBanner = () => {
|
export const AssumePrivilegeModeBanner = () => {
|
||||||
const { currentWorkspace } = useWorkspace();
|
const { currentWorkspace } = useWorkspace();
|
||||||
@@ -36,20 +37,11 @@ export const AssumePrivilegeModeBanner = () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
let page: string;
|
const url = getProjectHomePage(
|
||||||
|
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
|
||||||
|
);
|
||||||
|
|
||||||
switch (currentWorkspace.type) {
|
window.location.href = url.replace("$projectId", currentWorkspace.id);
|
||||||
case ProjectType.SecretScanning:
|
|
||||||
page = "data-sources";
|
|
||||||
break;
|
|
||||||
case ProjectType.CertificateManager:
|
|
||||||
page = "subscribers";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
page = "overview";
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.href = `/${currentWorkspace.type}/${currentWorkspace.id}/${page}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,17 +4,17 @@ import {
|
|||||||
faCheck,
|
faCheck,
|
||||||
faCube,
|
faCube,
|
||||||
faPlus,
|
faPlus,
|
||||||
faStar as faSolidStar,
|
faSort,
|
||||||
faSort
|
faStar as faSolidStar
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
import { NewProjectModal } from "@app/components/projects";
|
import { NewProjectModal } from "@app/components/projects";
|
||||||
import {
|
import {
|
||||||
Button,
|
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
DropdownMenuItem,
|
DropdownMenuItem,
|
||||||
@@ -28,13 +28,12 @@ import {
|
|||||||
useSubscription,
|
useSubscription,
|
||||||
useWorkspace
|
useWorkspace
|
||||||
} from "@app/context";
|
} from "@app/context";
|
||||||
|
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import { useGetUserWorkspaces } from "@app/hooks/api";
|
import { useGetUserWorkspaces } from "@app/hooks/api";
|
||||||
import { useUpdateUserProjectFavorites } from "@app/hooks/api/users/mutation";
|
import { useUpdateUserProjectFavorites } from "@app/hooks/api/users/mutation";
|
||||||
import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
|
import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
|
||||||
import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
|
import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
|
||||||
import { Link, linkOptions } from "@tanstack/react-router";
|
|
||||||
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
|
||||||
|
|
||||||
// TODO(pta): add search to project select
|
// TODO(pta): add search to project select
|
||||||
export const ProjectSelect = () => {
|
export const ProjectSelect = () => {
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export const SecretManagerLayout = () => {
|
|||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to={`/${currentWorkspace.type}/$projectId/settings` as const}
|
to="/projects/$projectId/secret-manager/settings"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -59,4 +59,3 @@ export const SecretScanningLayout = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { SecretScanningLayout } from "./SecretScanningLayout";
|
export { SecretScanningLayout } from "./SecretScanningLayout";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Menu, MenuItem } from "@app/components/v2";
|
import { Menu, MenuItem } from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
|
||||||
|
|
||||||
export const SshLayout = () => {
|
export const SshLayout = () => {
|
||||||
const { currentWorkspace } = useWorkspace();
|
const { currentWorkspace } = useWorkspace();
|
||||||
@@ -97,4 +97,3 @@ export const SshLayout = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export { SshLayout } from "./SshLayout";
|
export { SshLayout } from "./SshLayout";
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import {
|
|||||||
useGetPkiCollectionById,
|
useGetPkiCollectionById,
|
||||||
useUpdatePkiCollection
|
useUpdatePkiCollection
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
const schema = z.object({
|
const schema = z.object({
|
||||||
@@ -83,7 +82,7 @@ export const PkiCollectionModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/pki-collections/$collectionId` as const,
|
to: "/projects/$projectId/cert-manager/pki-collections/$collectionId",
|
||||||
params: {
|
params: {
|
||||||
projectId,
|
projectId,
|
||||||
collectionId
|
collectionId
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export const PkiCollectionTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
key={`pki-collection-${pkiCollection.id}`}
|
key={`pki-collection-${pkiCollection.id}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/pki-collections/$collectionId` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/pki-collections/$collectionId` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId,
|
projectId,
|
||||||
collectionId: pkiCollection.id
|
collectionId: pkiCollection.id
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { AlertingPage } from './AlertingPage'
|
import { AlertingPage } from "./AlertingPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/alerting',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/alerting"
|
||||||
)({
|
)({
|
||||||
component: AlertingPage,
|
component: AlertingPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
@@ -11,9 +11,9 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Alerting',
|
label: "Alerting"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ const Page = () => {
|
|||||||
|
|
||||||
handlePopUpClose("deleteCa");
|
handlePopUpClose("deleteCa");
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/certificate-authorities` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/certificate-authorities` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { CertAuthDetailsByIDPage } from './CertAuthDetailsByIDPage'
|
import { CertAuthDetailsByIDPage } from "./CertAuthDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/ca/$caName',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/ca/$caName"
|
||||||
)({
|
)({
|
||||||
component: CertAuthDetailsByIDPage,
|
component: CertAuthDetailsByIDPage,
|
||||||
beforeLoad: ({ context, params }) => {
|
beforeLoad: ({ context, params }) => {
|
||||||
@@ -11,15 +11,15 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Certificate Authorities',
|
label: "Certificate Authorities",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/cert-manager/$projectId/certificate-authorities',
|
to: "/projects/$projectId/cert-manager/certificate-authorities",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export const CaTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
key={`ca-${ca.id}`}
|
key={`ca-${ca.id}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/ca/$caName` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/ca/$caName` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
caName: ca.name
|
caName: ca.name
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { CertificateAuthoritiesPage } from './CertificateAuthoritiesPage'
|
import { CertificateAuthoritiesPage } from "./CertificateAuthoritiesPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificate-authorities',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificate-authorities"
|
||||||
)({
|
)({
|
||||||
component: CertificateAuthoritiesPage,
|
component: CertificateAuthoritiesPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
@@ -11,9 +11,9 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Certificate Authorities',
|
label: "Certificate Authorities"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { CertificatesPage } from './CertificatesPage'
|
import { CertificatesPage } from "./CertificatesPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificates',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificates"
|
||||||
)({
|
)({
|
||||||
component: CertificatesPage,
|
component: CertificatesPage
|
||||||
})
|
});
|
||||||
|
|||||||
+1
-1
@@ -57,7 +57,7 @@ export const PkiCollectionPage = () => {
|
|||||||
});
|
});
|
||||||
handlePopUpClose("deletePkiCollection");
|
handlePopUpClose("deletePkiCollection");
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/certificates` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/certificates` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PkiCollectionDetailsByIDPage } from './PkiCollectionDetailsByIDPage'
|
import { PkiCollectionDetailsByIDPage } from "./PkiCollectionDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/pki-collections/$collectionId',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/pki-collections/$collectionId"
|
||||||
)({
|
)({
|
||||||
component: PkiCollectionDetailsByIDPage,
|
component: PkiCollectionDetailsByIDPage,
|
||||||
beforeLoad: ({ context, params }) => {
|
beforeLoad: ({ context, params }) => {
|
||||||
@@ -11,15 +11,15 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Certificate Collections',
|
label: "Certificate Collections",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/cert-manager/$projectId/certificates',
|
to: "/projects/$projectId/cert-manager/certificates",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ const Page = () => {
|
|||||||
|
|
||||||
handlePopUpClose("deletePkiSubscriber");
|
handlePopUpClose("deletePkiSubscriber");
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/subscribers` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/subscribers` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PkiSubscriberDetailsByIDPage } from './PkiSubscriberDetailsByIDPage'
|
import { PkiSubscriberDetailsByIDPage } from "./PkiSubscriberDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/subscribers/$subscriberName',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/subscribers/$subscriberName"
|
||||||
)({
|
)({
|
||||||
component: PkiSubscriberDetailsByIDPage,
|
component: PkiSubscriberDetailsByIDPage,
|
||||||
beforeLoad: ({ context, params }) => {
|
beforeLoad: ({ context, params }) => {
|
||||||
@@ -11,15 +11,15 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Subscribers',
|
label: "Subscribers",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/cert-manager/$projectId/subscribers',
|
to: "/projects/$projectId/cert-manager/subscribers",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
+1
-1
@@ -76,7 +76,7 @@ export const PkiSubscribersTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
key={`pki-subscriber-${subscriber.id}`}
|
key={`pki-subscriber-${subscriber.id}`}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.CertificateManager}/$projectId/subscribers/$subscriberName` as const,
|
to: `/projects/$projectId/${ProjectType.CertificateManager}/subscribers/$subscriberName` as const,
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
subscriberName: subscriber.name
|
subscriberName: subscriber.name
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PkiSubscribersPage } from './PkiSubscribersPage'
|
import { PkiSubscribersPage } from "./PkiSubscribersPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/subscribers/',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/subscribers/"
|
||||||
)({
|
)({
|
||||||
component: PkiSubscribersPage,
|
component: PkiSubscribersPage
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PkiTemplateListPage } from './PkiTemplateListPage'
|
import { PkiTemplateListPage } from "./PkiTemplateListPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificate-templates/',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/certificate-templates/"
|
||||||
)({
|
)({
|
||||||
component: PkiTemplateListPage,
|
component: PkiTemplateListPage
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { SettingsPage } from './SettingsPage'
|
import { SettingsPage } from "./SettingsPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/settings',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/cert-manager/_cert-manager-layout/settings"
|
||||||
)({
|
)({
|
||||||
component: SettingsPage,
|
component: SettingsPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
@@ -11,9 +11,9 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Settings',
|
label: "Settings"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { KmipPage } from './KmipPage'
|
import { KmipPage } from "./KmipPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/kmip',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/kmip"
|
||||||
)({
|
)({
|
||||||
component: KmipPage,
|
component: KmipPage
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { OverviewPage } from './OverviewPage'
|
import { OverviewPage } from "./OverviewPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/overview',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/overview"
|
||||||
)({
|
)({
|
||||||
component: OverviewPage,
|
component: OverviewPage
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { SettingsPage } from './SettingsPage'
|
import { SettingsPage } from "./SettingsPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/settings',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/kms/_kms-layout/settings"
|
||||||
)({
|
)({
|
||||||
component: SettingsPage,
|
component: SettingsPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
@@ -11,9 +11,9 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Settings',
|
label: "Settings"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import { SessionStorageKeys } from "@app/const";
|
|||||||
import { useServerConfig } from "@app/context";
|
import { useServerConfig } from "@app/context";
|
||||||
import { authKeys, fetchAuthToken } from "@app/hooks/api/auth/queries";
|
import { authKeys, fetchAuthToken } from "@app/hooks/api/auth/queries";
|
||||||
import { setAuthToken } from "@app/hooks/api/reactQuery";
|
import { setAuthToken } from "@app/hooks/api/reactQuery";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
const QueryParamsSchema = z.object({
|
const QueryParamsSchema = z.object({
|
||||||
callback_port: z.coerce.number().optional().catch(undefined),
|
callback_port: z.coerce.number().optional().catch(undefined),
|
||||||
|
|||||||
+4
-21
@@ -33,6 +33,7 @@ import { withPermission } from "@app/hoc";
|
|||||||
import { useDebounce } from "@app/hooks";
|
import { useDebounce } from "@app/hooks";
|
||||||
import { useOrgAdminAccessProject, useOrgAdminGetProjects } from "@app/hooks/api";
|
import { useOrgAdminAccessProject, useOrgAdminGetProjects } from "@app/hooks/api";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
|
import { getProjectHomePage } from "@app/helpers/project";
|
||||||
|
|
||||||
export const OrgAdminProjects = withPermission(
|
export const OrgAdminProjects = withPermission(
|
||||||
() => {
|
() => {
|
||||||
@@ -58,26 +59,8 @@ export const OrgAdminProjects = withPermission(
|
|||||||
await orgAdminAccessProject.mutateAsync({
|
await orgAdminAccessProject.mutateAsync({
|
||||||
projectId
|
projectId
|
||||||
});
|
});
|
||||||
if (type === ProjectType.CertificateManager) {
|
|
||||||
await navigate({
|
|
||||||
to: "/cert-manager/$projectId/subscribers" as const,
|
|
||||||
params: {
|
|
||||||
projectId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type === ProjectType.SecretScanning) {
|
|
||||||
await navigate({
|
|
||||||
to: "/secret-scanning/$projectId/data-sources" as const,
|
|
||||||
params: {
|
|
||||||
projectId
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await navigate({
|
await navigate({
|
||||||
to: `/${type}/$projectId/overview` as const,
|
to: getProjectHomePage(type),
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -122,7 +105,7 @@ export const OrgAdminProjects = withPermission(
|
|||||||
<TBody>
|
<TBody>
|
||||||
{isProjectsLoading && <TableSkeleton columns={4} innerKey="projects" />}
|
{isProjectsLoading && <TableSkeleton columns={4} innerKey="projects" />}
|
||||||
{!isProjectsLoading &&
|
{!isProjectsLoading &&
|
||||||
projects?.map(({ name, slug, createdAt, type, id }) => (
|
projects?.map(({ name, slug, createdAt, id, defaultType }) => (
|
||||||
<Tr key={`project-${id}`} className="group w-full">
|
<Tr key={`project-${id}`} className="group w-full">
|
||||||
<Td>{name}</Td>
|
<Td>{name}</Td>
|
||||||
<Td>{slug}</Td>
|
<Td>{slug}</Td>
|
||||||
@@ -143,7 +126,7 @@ export const OrgAdminProjects = withPermission(
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
handleAccessProject(type, id);
|
handleAccessProject(defaultType, id);
|
||||||
}}
|
}}
|
||||||
icon={<FontAwesomeIcon icon={faSignIn} />}
|
icon={<FontAwesomeIcon icon={faSignIn} />}
|
||||||
disabled={
|
disabled={
|
||||||
|
|||||||
@@ -418,10 +418,10 @@ export const LogsFilter = ({
|
|||||||
onChange(e);
|
onChange(e);
|
||||||
}}
|
}}
|
||||||
placeholder="All projects"
|
placeholder="All projects"
|
||||||
options={workspacesInOrg.map(({ name, id, type }) => ({
|
options={workspacesInOrg.map(({ name, id, defaultType }) => ({
|
||||||
name,
|
name,
|
||||||
id,
|
id,
|
||||||
type
|
type: defaultType
|
||||||
}))}
|
}))}
|
||||||
getOptionValue={(option) => option.id}
|
getOptionValue={(option) => option.id}
|
||||||
getOptionLabel={(option) => option.name}
|
getOptionLabel={(option) => option.name}
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import { Helmet } from "react-helmet";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
|
import { PageHeader } from "@app/components/v2";
|
||||||
import { OrgPermissionBillingActions, OrgPermissionSubjects } from "@app/context";
|
import { OrgPermissionBillingActions, OrgPermissionSubjects } from "@app/context";
|
||||||
|
|
||||||
import { BillingTabGroup } from "./components";
|
import { BillingTabGroup } from "./components";
|
||||||
import { PageHeader } from "@app/components/v2";
|
|
||||||
|
|
||||||
export const BillingPage = () => {
|
export const BillingPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
+2
-5
@@ -5,7 +5,7 @@ import { useNavigate } from "@tanstack/react-router";
|
|||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { IconButton, Tag, Td, Tooltip, Tr } from "@app/components/v2";
|
import { IconButton, Td, Tooltip, Tr } from "@app/components/v2";
|
||||||
import { formatProjectRoleName } from "@app/helpers/roles";
|
import { formatProjectRoleName } from "@app/helpers/roles";
|
||||||
import { useGetUserWorkspaces } from "@app/hooks/api";
|
import { useGetUserWorkspaces } from "@app/hooks/api";
|
||||||
import { IdentityMembership } from "@app/hooks/api/identities/types";
|
import { IdentityMembership } from "@app/hooks/api/identities/types";
|
||||||
@@ -50,7 +50,7 @@ export const IdentityProjectRow = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isAccessible) {
|
if (isAccessible) {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${project?.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
params: {
|
params: {
|
||||||
projectId: project.id
|
projectId: project.id
|
||||||
},
|
},
|
||||||
@@ -68,9 +68,6 @@ export const IdentityProjectRow = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Td className="max-w-0 truncate">{project.name}</Td>
|
<Td className="max-w-0 truncate">{project.name}</Td>
|
||||||
<Td>
|
|
||||||
<Tag size="xs">{project.type}</Tag>
|
|
||||||
</Td>
|
|
||||||
<Td>{`${formatProjectRoleName(roles[0].role, roles[0].customRoleName)}${
|
<Td>{`${formatProjectRoleName(roles[0].role, roles[0].customRoleName)}${
|
||||||
roles.length > 1 ? ` (+${roles.length - 1})` : ""
|
roles.length > 1 ? ` (+${roles.length - 1})` : ""
|
||||||
}`}</Td>
|
}`}</Td>
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ export const AllProjectView = ({
|
|||||||
onKeyDown={(evt) => {
|
onKeyDown={(evt) => {
|
||||||
if (evt.key === "Enter" && workspace.isMember) {
|
if (evt.key === "Enter" && workspace.isMember) {
|
||||||
navigate({
|
navigate({
|
||||||
to: getProjectHomePage(workspace),
|
to: getProjectHomePage(workspace.defaultType),
|
||||||
params: {
|
params: {
|
||||||
projectId: workspace.id
|
projectId: workspace.id
|
||||||
}
|
}
|
||||||
@@ -232,7 +232,7 @@ export const AllProjectView = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (workspace.isMember) {
|
if (workspace.isMember) {
|
||||||
navigate({
|
navigate({
|
||||||
to: getProjectHomePage(workspace),
|
to: getProjectHomePage(workspace.defaultType),
|
||||||
params: {
|
params: {
|
||||||
projectId: workspace.id
|
projectId: workspace.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ export const MyProjectView = ({
|
|||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
navigate({
|
navigate({
|
||||||
to: getProjectHomePage(workspace),
|
to: getProjectHomePage(workspace.defaultType),
|
||||||
params: {
|
params: {
|
||||||
projectId: workspace.id
|
projectId: workspace.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
{
|
{
|
||||||
label: "Secret Management",
|
label: "Secret Management",
|
||||||
link: linkOptions({ to: "/organization/secret-manager/overview" })
|
link: linkOptions({ to: "/organization/projects" })
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Settings"
|
label: "Settings"
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ export const UserProjectRow = ({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (isAccessible) {
|
if (isAccessible) {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${project.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
params: {
|
params: {
|
||||||
projectId: project.id
|
projectId: project.id
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { useNavigate, useSearch } from "@tanstack/react-router";
|
|||||||
|
|
||||||
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
import { ProjectAccessControlTabs } from "@app/types/project";
|
import { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -25,7 +24,7 @@ const Page = () => {
|
|||||||
|
|
||||||
const updateSelectedTab = (tab: string) => {
|
const updateSelectedTab = (tab: string) => {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
search: (prev) => ({ ...prev, selectedTab: tab }),
|
search: (prev) => ({ ...prev, selectedTab: tab }),
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
@@ -49,9 +48,7 @@ const Page = () => {
|
|||||||
<p>Machine Identities</p>
|
<p>Machine Identities</p>
|
||||||
</div>
|
</div>
|
||||||
</Tab>
|
</Tab>
|
||||||
{currentWorkspace?.type === ProjectType.SecretManager && (
|
<Tab value={ProjectAccessControlTabs.ServiceTokens}>Service Tokens</Tab>
|
||||||
<Tab value={ProjectAccessControlTabs.ServiceTokens}>Service Tokens</Tab>
|
|
||||||
)}
|
|
||||||
<Tab value={ProjectAccessControlTabs.Roles}>Project Roles</Tab>
|
<Tab value={ProjectAccessControlTabs.Roles}>Project Roles</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={ProjectAccessControlTabs.Member}>
|
<TabPanel value={ProjectAccessControlTabs.Member}>
|
||||||
@@ -63,11 +60,9 @@ const Page = () => {
|
|||||||
<TabPanel value={ProjectAccessControlTabs.Identities}>
|
<TabPanel value={ProjectAccessControlTabs.Identities}>
|
||||||
<IdentityTab />
|
<IdentityTab />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
{currentWorkspace?.type === ProjectType.SecretManager && (
|
<TabPanel value={ProjectAccessControlTabs.ServiceTokens}>
|
||||||
<TabPanel value={ProjectAccessControlTabs.ServiceTokens}>
|
<ServiceTokenTab />
|
||||||
<ServiceTokenTab />
|
</TabPanel>
|
||||||
</TabPanel>
|
|
||||||
)}
|
|
||||||
<TabPanel value={ProjectAccessControlTabs.Roles}>
|
<TabPanel value={ProjectAccessControlTabs.Roles}>
|
||||||
<ProjectRoleListTab />
|
<ProjectRoleListTab />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
|
|||||||
+2
-2
@@ -158,7 +158,7 @@ export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
onKeyDown={(evt) => {
|
onKeyDown={(evt) => {
|
||||||
if (evt.key === "Enter") {
|
if (evt.key === "Enter") {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/groups/$groupId` as const,
|
to: "/projects/$projectId/groups/$groupId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
groupId: id
|
groupId: id
|
||||||
@@ -168,7 +168,7 @@ export const GroupTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/groups/$groupId` as const,
|
to: "/projects/$projectId/groups/$groupId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
groupId: id
|
groupId: id
|
||||||
|
|||||||
@@ -260,7 +260,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
onKeyDown={(evt) => {
|
onKeyDown={(evt) => {
|
||||||
if (evt.key === "Enter") {
|
if (evt.key === "Enter") {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace?.type}/$projectId/identities/$identityId` as const,
|
to: "/projects/$projectId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
identityId: id
|
identityId: id
|
||||||
@@ -270,7 +270,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace?.type}/$projectId/identities/$identityId` as const,
|
to: "/projects/$projectId/identities/$identityId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
identityId: id
|
identityId: id
|
||||||
|
|||||||
+1
-1
@@ -21,7 +21,7 @@ export const MemberRoleForm = ({ projectMember, onOpenUpgradeModal }: Props) =>
|
|||||||
>
|
>
|
||||||
<AlertDescription>
|
<AlertDescription>
|
||||||
<Link
|
<Link
|
||||||
to={`/${currentWorkspace.type}/$projectId/members/$membershipId` as const}
|
to="/projects/$projectId/members/$membershipId"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
membershipId: projectMember.id
|
membershipId: projectMember.id
|
||||||
|
|||||||
+2
-2
@@ -311,7 +311,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
onKeyDown={(evt) => {
|
onKeyDown={(evt) => {
|
||||||
if (evt.key === "Enter") {
|
if (evt.key === "Enter") {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/members/$membershipId` as const,
|
to: "/projects/$projectId/members/$membershipId",
|
||||||
params: {
|
params: {
|
||||||
projectId: workspaceId,
|
projectId: workspaceId,
|
||||||
membershipId
|
membershipId
|
||||||
@@ -321,7 +321,7 @@ export const MembersTable = ({ handlePopUpOpen }: Props) => {
|
|||||||
}}
|
}}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/members/$membershipId` as const,
|
to: "/projects/$projectId/members/$membershipId",
|
||||||
params: {
|
params: {
|
||||||
projectId: workspaceId,
|
projectId: workspaceId,
|
||||||
membershipId
|
membershipId
|
||||||
|
|||||||
+2
-2
@@ -249,7 +249,7 @@ export const ProjectRoleList = () => {
|
|||||||
className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
className="h-10 cursor-pointer transition-colors duration-100 hover:bg-mineshaft-700"
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace?.type}/$projectId/roles/$roleSlug` as const,
|
to: "/projects/$projectId/roles/$roleSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
roleSlug: slug
|
roleSlug: slug
|
||||||
@@ -291,7 +291,7 @@ export const ProjectRoleList = () => {
|
|||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace?.type}/$projectId/roles/$roleSlug` as const,
|
to: "/projects/$projectId/roles/$roleSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
roleSlug: slug
|
roleSlug: slug
|
||||||
|
|||||||
@@ -46,7 +46,13 @@ export const GroupDetailsSection = ({ groupMembership }: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/${currentWorkspace.id}/access-management?selectedTab=groups`
|
to: "/projects/$projectId/access-management",
|
||||||
|
params: {
|
||||||
|
projectId: currentWorkspace.id
|
||||||
|
},
|
||||||
|
search: {
|
||||||
|
selectedTab: "groups"
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
handlePopUpClose("deleteGroup");
|
handlePopUpClose("deleteGroup");
|
||||||
|
|||||||
+5
-14
@@ -24,6 +24,7 @@ import {
|
|||||||
Tr
|
Tr
|
||||||
} from "@app/components/v2";
|
} from "@app/components/v2";
|
||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
|
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||||
import {
|
import {
|
||||||
getUserTablePreference,
|
getUserTablePreference,
|
||||||
PreferenceKey,
|
PreferenceKey,
|
||||||
@@ -136,20 +137,10 @@ export const GroupMembersTable = ({ groupMembership }: Props) => {
|
|||||||
text: "User privilege assumption has started"
|
text: "User privilege assumption has started"
|
||||||
});
|
});
|
||||||
|
|
||||||
let overviewPage: string;
|
const url = getProjectHomePage(
|
||||||
|
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
|
||||||
switch (currentWorkspace.type) {
|
);
|
||||||
case ProjectType.SecretScanning:
|
window.location.href = url.replace("$projectId", currentWorkspace.id);
|
||||||
overviewPage = "data-sources";
|
|
||||||
break;
|
|
||||||
case ProjectType.CertificateManager:
|
|
||||||
overviewPage = "subscribers";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
overviewPage = "overview";
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.href = `/${currentWorkspace.type}/${currentWorkspace.id}/${overviewPage}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { GroupDetailsByIDPage } from './GroupDetailsByIDPage'
|
import { GroupDetailsByIDPage } from "./GroupDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/groups/$groupId',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/groups/$groupId"
|
||||||
)({
|
)({
|
||||||
component: GroupDetailsByIDPage,
|
component: GroupDetailsByIDPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [],
|
breadcrumbs: []
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
useWorkspace
|
useWorkspace
|
||||||
} from "@app/context";
|
} from "@app/context";
|
||||||
|
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import {
|
import {
|
||||||
useAssumeProjectPrivileges,
|
useAssumeProjectPrivileges,
|
||||||
@@ -27,6 +28,7 @@ import {
|
|||||||
useGetWorkspaceIdentityMembershipDetails
|
useGetWorkspaceIdentityMembershipDetails
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { ActorType } from "@app/hooks/api/auditLogs/enums";
|
import { ActorType } from "@app/hooks/api/auditLogs/enums";
|
||||||
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
|
|
||||||
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
||||||
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
||||||
@@ -66,7 +68,10 @@ const Page = () => {
|
|||||||
type: "success",
|
type: "success",
|
||||||
text: "Identity privilege assumption has started"
|
text: "Identity privilege assumption has started"
|
||||||
});
|
});
|
||||||
window.location.href = `/${currentWorkspace.type}/${currentWorkspace.id}/overview`;
|
const url = getProjectHomePage(
|
||||||
|
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
|
||||||
|
);
|
||||||
|
window.location.href = url.replace("$projectId", currentWorkspace.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -84,7 +89,7 @@ const Page = () => {
|
|||||||
});
|
});
|
||||||
handlePopUpClose("deleteIdentity");
|
handlePopUpClose("deleteIdentity");
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
params: {
|
params: {
|
||||||
projectId: workspaceId
|
projectId: workspaceId
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
import { IdentityDetailsByIDPage } from "./IdentityDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/identities/$identityId',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/identities/$identityId"
|
||||||
)({
|
)({
|
||||||
component: IdentityDetailsByIDPage,
|
component: IdentityDetailsByIDPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [],
|
breadcrumbs: []
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import {
|
|||||||
useOrganization,
|
useOrganization,
|
||||||
useWorkspace
|
useWorkspace
|
||||||
} from "@app/context";
|
} from "@app/context";
|
||||||
|
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import {
|
import {
|
||||||
useAssumeProjectPrivileges,
|
useAssumeProjectPrivileges,
|
||||||
@@ -72,20 +73,10 @@ export const Page = () => {
|
|||||||
text: "User privilege assumption has started"
|
text: "User privilege assumption has started"
|
||||||
});
|
});
|
||||||
|
|
||||||
let page: string;
|
const url = getProjectHomePage(
|
||||||
|
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
|
||||||
switch (currentWorkspace.type) {
|
);
|
||||||
case ProjectType.SecretScanning:
|
window.location.href = url.replace("$projectId", currentWorkspace.id);
|
||||||
page = "data-sources";
|
|
||||||
break;
|
|
||||||
case ProjectType.CertificateManager:
|
|
||||||
page = "subscribers";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
page = "overview";
|
|
||||||
}
|
|
||||||
|
|
||||||
window.location.href = `/${currentWorkspace.type}/${currentWorkspace.id}/${page}`;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -105,7 +96,7 @@ export const Page = () => {
|
|||||||
type: "success"
|
type: "success"
|
||||||
});
|
});
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { MemberDetailsByIDPage } from './MemberDetailsByIDPage'
|
import { MemberDetailsByIDPage } from "./MemberDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/members/$membershipId',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/members/$membershipId"
|
||||||
)({
|
)({
|
||||||
component: MemberDetailsByIDPage,
|
component: MemberDetailsByIDPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({ context }) => {
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [],
|
breadcrumbs: []
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ const Page = () => {
|
|||||||
});
|
});
|
||||||
handlePopUpClose("deleteRole");
|
handlePopUpClose("deleteRole");
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace?.type}/$projectId/access-management` as const,
|
to: "/projects/$projectId/access-management",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@ const Content = ({ role, onClose }: ContentProps) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/roles/$roleSlug` as const,
|
to: "/projects/$projectId/roles/$roleSlug",
|
||||||
params: {
|
params: {
|
||||||
roleSlug: newRole.slug,
|
roleSlug: newRole.slug,
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ export const RoleModal = ({ popUp, handlePopUpToggle }: Props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${currentWorkspace.type}/$projectId/roles/$roleSlug` as const,
|
to: "/projects/$projectId/roles/$roleSlug",
|
||||||
params: {
|
params: {
|
||||||
roleSlug: newRole.slug,
|
roleSlug: newRole.slug,
|
||||||
projectId
|
projectId
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { RoleDetailsBySlugPage } from './RoleDetailsBySlugPage'
|
import { RoleDetailsBySlugPage } from "./RoleDetailsBySlugPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/roles/$roleSlug',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/roles/$roleSlug"
|
||||||
)({
|
)({
|
||||||
component: RoleDetailsBySlugPage,
|
component: RoleDetailsBySlugPage,
|
||||||
beforeLoad: ({ context }) => {
|
beforeLoad: ({}) => {
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [],
|
breadcrumbs: []
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { SettingsPage } from './SettingsPage'
|
|
||||||
|
import { SettingsPage } from "./SettingsPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/settings',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout/settings"
|
||||||
)({
|
)({
|
||||||
component: SettingsPage,
|
component: SettingsPage,
|
||||||
beforeLoad: ({ context, params }) => {
|
beforeLoad: ({ context, params }) => {
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs
|
||||||
// {
|
// {
|
||||||
// label: "Access Control",
|
// label: "Access Control",
|
||||||
// link: linkOptions({
|
// link: linkOptions({
|
||||||
@@ -18,7 +19,7 @@ export const Route = createFileRoute(
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import { ProjectGeneralLayout } from '@app/layouts/ProjectGeneralLayout'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { createFileRoute } from '@tanstack/react-router'
|
|
||||||
|
import { ProjectGeneralLayout } from "@app/layouts/ProjectGeneralLayout";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/_project-general-layout"
|
||||||
)({
|
)({
|
||||||
component: ProjectGeneralLayout,
|
component: ProjectGeneralLayout
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
import { BreadcrumbTypes } from "@app/components/v2";
|
||||||
import { workspaceKeys } from "@app/hooks/api";
|
import { workspaceKeys } from "@app/hooks/api";
|
||||||
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
|
import { fetchUserProjectPermissions, roleQueryKeys } from "@app/hooks/api/roles/queries";
|
||||||
import { fetchWorkspaceById } from "@app/hooks/api/workspace/queries";
|
import { fetchWorkspaceById } from "@app/hooks/api/workspace/queries";
|
||||||
|
|
||||||
import { ProjectLayout } from "@app/layouts/ProjectLayout";
|
import { ProjectLayout } from "@app/layouts/ProjectLayout";
|
||||||
import { BreadcrumbTypes } from "@app/components/v2";
|
|
||||||
import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
|
import { ProjectSelect } from "@app/layouts/ProjectLayout/components/ProjectSelect";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const ErrorPage = ({ error }: ErrorComponentProps) => {
|
|||||||
</a>{" "}
|
</a>{" "}
|
||||||
if the issue persists.
|
if the issue persists.
|
||||||
</p>
|
</p>
|
||||||
<Link to="/organization/secret-manager/overview">
|
<Link to="/organization/projects">
|
||||||
<Button className="mt-4" size="xs">
|
<Button className="mt-4" size="xs">
|
||||||
<FontAwesomeIcon icon={faHome} className="mr-2" />
|
<FontAwesomeIcon icon={faHome} className="mr-2" />
|
||||||
Back To Home
|
Back To Home
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const NotFoundPage = () => {
|
|||||||
</a>{" "}
|
</a>{" "}
|
||||||
and we`ll fix it!{" "}
|
and we`ll fix it!{" "}
|
||||||
</p>
|
</p>
|
||||||
<Link to="/organization/secret-manager/overview">
|
<Link to="/organization/projects">
|
||||||
<div className="diration-200 mt-8 cursor-default rounded-md bg-mineshaft-500 px-4 py-2 font-semibold hover:bg-primary hover:text-black">
|
<div className="diration-200 mt-8 cursor-default rounded-md bg-mineshaft-500 px-4 py-2 font-semibold hover:bg-primary hover:text-black">
|
||||||
Go to Dashboard
|
Go to Dashboard
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import {
|
|||||||
ProjectPermissionCommitsActions,
|
ProjectPermissionCommitsActions,
|
||||||
ProjectPermissionSub
|
ProjectPermissionSub
|
||||||
} from "@app/context/ProjectPermissionContext/types";
|
} from "@app/context/ProjectPermissionContext/types";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
import { CommitDetailsTab } from "./components/CommitDetailsTab";
|
import { CommitDetailsTab } from "./components/CommitDetailsTab";
|
||||||
|
|
||||||
@@ -35,7 +34,7 @@ export const CommitDetailsPage = () => {
|
|||||||
|
|
||||||
const handleGoBackToHistory = () => {
|
const handleGoBackToHistory = () => {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.SecretManager}/$projectId/commits/$environment/$folderId` as const,
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
folderId,
|
folderId,
|
||||||
@@ -50,7 +49,7 @@ export const CommitDetailsPage = () => {
|
|||||||
|
|
||||||
const handleGoToRollbackPreview = () => {
|
const handleGoToRollbackPreview = () => {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.SecretManager}/$projectId/commits/$environment/$folderId/$commitId/restore` as const,
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId/$commitId/restore",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
folderId,
|
folderId,
|
||||||
|
|||||||
+1
-2
@@ -24,7 +24,6 @@ import {
|
|||||||
} from "@app/context/ProjectPermissionContext/types";
|
} from "@app/context/ProjectPermissionContext/types";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
import { useCommitRollback, useGetRollbackPreview } from "@app/hooks/api/folderCommits/queries";
|
import { useCommitRollback, useGetRollbackPreview } from "@app/hooks/api/folderCommits/queries";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
import { SecretVersionDiffView } from "../SecretVersionDiffView";
|
import { SecretVersionDiffView } from "../SecretVersionDiffView";
|
||||||
|
|
||||||
@@ -103,7 +102,7 @@ export const RollbackPreviewTab = (): JSX.Element => {
|
|||||||
|
|
||||||
const goBackToHistory = () => {
|
const goBackToHistory = () => {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.SecretManager}/$projectId/commits/$environment/$folderId` as const,
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
folderId,
|
folderId,
|
||||||
|
|||||||
+36
-42
@@ -1,30 +1,26 @@
|
|||||||
import {
|
import { createFileRoute, linkOptions, stripSearchParams } from "@tanstack/react-router";
|
||||||
createFileRoute,
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
linkOptions,
|
import { z } from "zod";
|
||||||
stripSearchParams,
|
|
||||||
} from '@tanstack/react-router'
|
|
||||||
import { zodValidator } from '@tanstack/zod-adapter'
|
|
||||||
import { z } from 'zod'
|
|
||||||
|
|
||||||
import { SecretDashboardPathBreadcrumb } from '@app/components/navigation/SecretDashboardPathBreadcrumb'
|
import { SecretDashboardPathBreadcrumb } from "@app/components/navigation/SecretDashboardPathBreadcrumb";
|
||||||
import { BreadcrumbTypes } from '@app/components/v2'
|
import { BreadcrumbTypes } from "@app/components/v2";
|
||||||
|
|
||||||
import { RollbackPreviewTab } from './RollbackPreviewTab'
|
import { RollbackPreviewTab } from "./RollbackPreviewTab";
|
||||||
|
|
||||||
const RollbackPreviewTabQueryParamsSchema = z.object({
|
const RollbackPreviewTabQueryParamsSchema = z.object({
|
||||||
secretPath: z.string().catch('/'),
|
secretPath: z.string().catch("/")
|
||||||
})
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/$commitId/restore',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/$commitId/restore"
|
||||||
)({
|
)({
|
||||||
component: RollbackPreviewTab,
|
component: RollbackPreviewTab,
|
||||||
validateSearch: zodValidator(RollbackPreviewTabQueryParamsSchema),
|
validateSearch: zodValidator(RollbackPreviewTabQueryParamsSchema),
|
||||||
search: {
|
search: {
|
||||||
middlewares: [stripSearchParams({ secretPath: '/' })],
|
middlewares: [stripSearchParams({ secretPath: "/" })]
|
||||||
},
|
},
|
||||||
beforeLoad: ({ context, params, search }) => {
|
beforeLoad: ({ context, params, search }) => {
|
||||||
const secretPathSegments = search.secretPath.split('/').filter(Boolean)
|
const secretPathSegments = search.secretPath.split("/").filter(Boolean);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
@@ -32,20 +28,18 @@ export const Route = createFileRoute(
|
|||||||
{
|
{
|
||||||
type: BreadcrumbTypes.Dropdown,
|
type: BreadcrumbTypes.Dropdown,
|
||||||
label:
|
label:
|
||||||
context.project.environments.find(
|
context.project.environments.find((el) => el.slug === params.environment)?.name || "",
|
||||||
(el) => el.slug === params.environment,
|
dropdownTitle: "Environments",
|
||||||
)?.name || '',
|
|
||||||
dropdownTitle: 'Environments',
|
|
||||||
links: context.project.environments.map((el) => ({
|
links: context.project.environments.map((el) => ({
|
||||||
label: el.name,
|
label: el.name,
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/secrets/$envSlug',
|
to: "/projects/$projectId/secret-manager/secrets/$envSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
envSlug: el.slug,
|
envSlug: el.slug
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
})),
|
}))
|
||||||
},
|
},
|
||||||
...secretPathSegments.map((_, index) => ({
|
...secretPathSegments.map((_, index) => ({
|
||||||
type: BreadcrumbTypes.Component,
|
type: BreadcrumbTypes.Component,
|
||||||
@@ -57,41 +51,41 @@ export const Route = createFileRoute(
|
|||||||
projectId={params.projectId}
|
projectId={params.projectId}
|
||||||
disableCopy
|
disableCopy
|
||||||
/>
|
/>
|
||||||
),
|
)
|
||||||
})),
|
})),
|
||||||
{
|
{
|
||||||
label: 'Commits',
|
label: "Commits",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/commits/$environment/$folderId',
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
environment: params.environment,
|
environment: params.environment,
|
||||||
folderId: params.folderId,
|
folderId: params.folderId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
secretPath: search.secretPath,
|
secretPath: search.secretPath
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: params.commitId,
|
label: params.commitId,
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/commits/$environment/$folderId/$commitId',
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId/$commitId",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
environment: params.environment,
|
environment: params.environment,
|
||||||
folderId: params.folderId,
|
folderId: params.folderId,
|
||||||
commitId: params.commitId,
|
commitId: params.commitId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
secretPath: search.secretPath,
|
secretPath: search.secretPath
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Restore',
|
label: "Restore"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,30 +1,26 @@
|
|||||||
import {
|
import { createFileRoute, linkOptions, stripSearchParams } from "@tanstack/react-router";
|
||||||
createFileRoute,
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
linkOptions,
|
import { z } from "zod";
|
||||||
stripSearchParams,
|
|
||||||
} from '@tanstack/react-router'
|
|
||||||
import { zodValidator } from '@tanstack/zod-adapter'
|
|
||||||
import { z } from 'zod'
|
|
||||||
|
|
||||||
import { SecretDashboardPathBreadcrumb } from '@app/components/navigation/SecretDashboardPathBreadcrumb'
|
import { SecretDashboardPathBreadcrumb } from "@app/components/navigation/SecretDashboardPathBreadcrumb";
|
||||||
import { BreadcrumbTypes } from '@app/components/v2'
|
import { BreadcrumbTypes } from "@app/components/v2";
|
||||||
|
|
||||||
import { CommitDetailsPage } from './CommitDetailsPage'
|
import { CommitDetailsPage } from "./CommitDetailsPage";
|
||||||
|
|
||||||
const CommitDetailsPageQueryParamsSchema = z.object({
|
const CommitDetailsPageQueryParamsSchema = z.object({
|
||||||
secretPath: z.string().catch('/'),
|
secretPath: z.string().catch("/")
|
||||||
})
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/$commitId/',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/$commitId/"
|
||||||
)({
|
)({
|
||||||
component: CommitDetailsPage,
|
component: CommitDetailsPage,
|
||||||
validateSearch: zodValidator(CommitDetailsPageQueryParamsSchema),
|
validateSearch: zodValidator(CommitDetailsPageQueryParamsSchema),
|
||||||
search: {
|
search: {
|
||||||
middlewares: [stripSearchParams({ secretPath: '/' })],
|
middlewares: [stripSearchParams({ secretPath: "/" })]
|
||||||
},
|
},
|
||||||
beforeLoad: ({ context, params, search }) => {
|
beforeLoad: ({ context, params, search }) => {
|
||||||
const secretPathSegments = search.secretPath.split('/').filter(Boolean)
|
const secretPathSegments = search.secretPath.split("/").filter(Boolean);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
@@ -32,20 +28,18 @@ export const Route = createFileRoute(
|
|||||||
{
|
{
|
||||||
type: BreadcrumbTypes.Dropdown,
|
type: BreadcrumbTypes.Dropdown,
|
||||||
label:
|
label:
|
||||||
context.project.environments.find(
|
context.project.environments.find((el) => el.slug === params.environment)?.name || "",
|
||||||
(el) => el.slug === params.environment,
|
dropdownTitle: "Environments",
|
||||||
)?.name || '',
|
|
||||||
dropdownTitle: 'Environments',
|
|
||||||
links: context.project.environments.map((el) => ({
|
links: context.project.environments.map((el) => ({
|
||||||
label: el.name,
|
label: el.name,
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/secrets/$envSlug',
|
to: "/projects/$projectId/secret-manager/secrets/$envSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
envSlug: el.slug,
|
envSlug: el.slug
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
})),
|
}))
|
||||||
},
|
},
|
||||||
...secretPathSegments.map((_, index) => ({
|
...secretPathSegments.map((_, index) => ({
|
||||||
type: BreadcrumbTypes.Component,
|
type: BreadcrumbTypes.Component,
|
||||||
@@ -57,26 +51,26 @@ export const Route = createFileRoute(
|
|||||||
projectId={params.projectId}
|
projectId={params.projectId}
|
||||||
disableCopy
|
disableCopy
|
||||||
/>
|
/>
|
||||||
),
|
)
|
||||||
})),
|
})),
|
||||||
{
|
{
|
||||||
label: 'Commits',
|
label: "Commits",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/commits/$environment/$folderId',
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
environment: params.environment,
|
environment: params.environment,
|
||||||
folderId: params.folderId,
|
folderId: params.folderId
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
secretPath: search.secretPath,
|
secretPath: search.secretPath
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: params.commitId,
|
label: params.commitId
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import {
|
|||||||
ProjectPermissionCommitsActions,
|
ProjectPermissionCommitsActions,
|
||||||
ProjectPermissionSub
|
ProjectPermissionSub
|
||||||
} from "@app/context/ProjectPermissionContext/types";
|
} from "@app/context/ProjectPermissionContext/types";
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
|
||||||
|
|
||||||
import { CommitHistoryTab } from "./components/CommitHistoryTab";
|
import { CommitHistoryTab } from "./components/CommitHistoryTab";
|
||||||
|
|
||||||
@@ -32,7 +31,7 @@ export const CommitsPage = () => {
|
|||||||
|
|
||||||
const handleSelectCommit = (commitId: string) => {
|
const handleSelectCommit = (commitId: string) => {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.SecretManager}/$projectId/commits/$environment/$folderId/$commitId` as const,
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId/$commitId",
|
||||||
params: {
|
params: {
|
||||||
projectId: currentWorkspace.id,
|
projectId: currentWorkspace.id,
|
||||||
folderId,
|
folderId,
|
||||||
|
|||||||
@@ -1,31 +1,27 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
import {
|
import { createFileRoute, linkOptions, stripSearchParams } from "@tanstack/react-router";
|
||||||
createFileRoute,
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
linkOptions,
|
import { z } from "zod";
|
||||||
stripSearchParams,
|
|
||||||
} from '@tanstack/react-router'
|
|
||||||
import { zodValidator } from '@tanstack/zod-adapter'
|
|
||||||
import { z } from 'zod'
|
|
||||||
|
|
||||||
import { SecretDashboardPathBreadcrumb } from '@app/components/navigation/SecretDashboardPathBreadcrumb'
|
import { SecretDashboardPathBreadcrumb } from "@app/components/navigation/SecretDashboardPathBreadcrumb";
|
||||||
import { BreadcrumbTypes } from '@app/components/v2'
|
import { BreadcrumbTypes } from "@app/components/v2";
|
||||||
|
|
||||||
import { CommitsPage } from './CommitsPage'
|
import { CommitsPage } from "./CommitsPage";
|
||||||
|
|
||||||
const CommitsPageQueryParamsSchema = z.object({
|
const CommitsPageQueryParamsSchema = z.object({
|
||||||
secretPath: z.string().catch('/'),
|
secretPath: z.string().catch("/")
|
||||||
})
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/commits/$environment/$folderId/"
|
||||||
)({
|
)({
|
||||||
component: CommitsPage,
|
component: CommitsPage,
|
||||||
validateSearch: zodValidator(CommitsPageQueryParamsSchema),
|
validateSearch: zodValidator(CommitsPageQueryParamsSchema),
|
||||||
search: {
|
search: {
|
||||||
middlewares: [stripSearchParams({ secretPath: '/' })],
|
middlewares: [stripSearchParams({ secretPath: "/" })]
|
||||||
},
|
},
|
||||||
beforeLoad: ({ context, params, search }) => {
|
beforeLoad: ({ context, params, search }) => {
|
||||||
const secretPathSegments = search.secretPath.split('/').filter(Boolean)
|
const secretPathSegments = search.secretPath.split("/").filter(Boolean);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
@@ -33,20 +29,18 @@ export const Route = createFileRoute(
|
|||||||
{
|
{
|
||||||
type: BreadcrumbTypes.Dropdown,
|
type: BreadcrumbTypes.Dropdown,
|
||||||
label:
|
label:
|
||||||
context.project.environments.find(
|
context.project.environments.find((el) => el.slug === params.environment)?.name || "",
|
||||||
(el) => el.slug === params.environment,
|
dropdownTitle: "Environments",
|
||||||
)?.name || '',
|
|
||||||
dropdownTitle: 'Environments',
|
|
||||||
links: context.project.environments.map((el) => ({
|
links: context.project.environments.map((el) => ({
|
||||||
label: el.name,
|
label: el.name,
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/secrets/$envSlug',
|
to: "/projects/$projectId/secret-manager/secrets/$envSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
envSlug: el.slug,
|
envSlug: el.slug
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
})),
|
}))
|
||||||
},
|
},
|
||||||
...secretPathSegments.map((_, index) => ({
|
...secretPathSegments.map((_, index) => ({
|
||||||
type: BreadcrumbTypes.Component,
|
type: BreadcrumbTypes.Component,
|
||||||
@@ -58,20 +52,20 @@ export const Route = createFileRoute(
|
|||||||
projectId={params.projectId}
|
projectId={params.projectId}
|
||||||
disableCopy
|
disableCopy
|
||||||
/>
|
/>
|
||||||
),
|
)
|
||||||
})),
|
})),
|
||||||
{
|
{
|
||||||
label: 'Commits',
|
label: "Commits",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/commits/$environment/$folderId',
|
to: "/projects/$projectId/secret-manager/commits/$environment/$folderId",
|
||||||
params: {
|
params: {
|
||||||
projectId: params.projectId,
|
projectId: params.projectId,
|
||||||
environment: params.environment,
|
environment: params.environment,
|
||||||
folderId: params.folderId,
|
folderId: params.folderId
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { IPAllowListPage } from './IPAllowlistPage'
|
import { IPAllowListPage } from "./IPAllowlistPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/allowlist',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/allowlist"
|
||||||
)({
|
)({
|
||||||
component: () => IPAllowListPage,
|
component: () => IPAllowListPage
|
||||||
})
|
});
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { IntegrationsListPageTabs } from '@app/types/integrations'
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
||||||
|
|
||||||
import { IntegrationDetailsByIDPage } from './IntegrationsDetailsByIDPage'
|
import { IntegrationDetailsByIDPage } from "./IntegrationsDetailsByIDPage";
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/integrations/$integrationId',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/integrations/$integrationId"
|
||||||
)({
|
)({
|
||||||
component: IntegrationDetailsByIDPage,
|
component: IntegrationDetailsByIDPage,
|
||||||
beforeLoad: ({ context, params }) => {
|
beforeLoad: ({ context, params }) => {
|
||||||
@@ -13,19 +13,19 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Integrations',
|
label: "Integrations",
|
||||||
link: linkOptions({
|
link: linkOptions({
|
||||||
to: '/secret-manager/$projectId/integrations',
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params,
|
params,
|
||||||
search: {
|
search: {
|
||||||
selectedTab: IntegrationsListPageTabs.NativeIntegrations,
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Details',
|
label: "Details"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
+30
-30
@@ -69,7 +69,7 @@ export const redirectForProviderAuth = (
|
|||||||
switch (integrationOption.slug) {
|
switch (integrationOption.slug) {
|
||||||
case "gcp-secret-manager":
|
case "gcp-secret-manager":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/gcp-secret-manager/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/gcp-secret-manager/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -81,7 +81,7 @@ export const redirectForProviderAuth = (
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/azure-key-vault/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/azure-key-vault/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
@@ -103,7 +103,7 @@ export const redirectForProviderAuth = (
|
|||||||
}
|
}
|
||||||
case "aws-parameter-store":
|
case "aws-parameter-store":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/aws-parameter-store/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/aws-parameter-store/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -111,7 +111,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "aws-secret-manager":
|
case "aws-secret-manager":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/aws-secret-manager/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/aws-secret-manager/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -147,7 +147,7 @@ export const redirectForProviderAuth = (
|
|||||||
}
|
}
|
||||||
case "github":
|
case "github":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/github/auth-mode-selection",
|
to: "/projects/$projectId/secret-manager/integrations/github/auth-mode-selection",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "gitlab":
|
case "gitlab":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/gitlab/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/gitlab/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "render":
|
case "render":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/render/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/render/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -171,7 +171,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "flyio":
|
case "flyio":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/flyio/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/flyio/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -179,7 +179,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "circleci":
|
case "circleci":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/circleci/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/circleci/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -187,7 +187,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "databricks":
|
case "databricks":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/databricks/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/databricks/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "laravel-forge":
|
case "laravel-forge":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/laravel-forge/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/laravel-forge/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -203,7 +203,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "travisci":
|
case "travisci":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/travisci/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/travisci/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -211,7 +211,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "supabase":
|
case "supabase":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/supabase/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/supabase/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "checkly":
|
case "checkly":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/checkly/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/checkly/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -227,7 +227,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "qovery":
|
case "qovery":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/qovery/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/qovery/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "railway":
|
case "railway":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/railway/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/railway/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -243,7 +243,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "terraform-cloud":
|
case "terraform-cloud":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/terraform-cloud/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/terraform-cloud/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -251,7 +251,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "hashicorp-vault":
|
case "hashicorp-vault":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/hashicorp-vault/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/hashicorp-vault/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -259,7 +259,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "cloudflare-pages":
|
case "cloudflare-pages":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/cloudflare-pages/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/cloudflare-pages/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -267,7 +267,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "cloudflare-workers":
|
case "cloudflare-workers":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/cloudflare-workers/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/cloudflare-workers/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -284,7 +284,7 @@ export const redirectForProviderAuth = (
|
|||||||
}
|
}
|
||||||
case "codefresh":
|
case "codefresh":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/codefresh/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/codefresh/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -292,7 +292,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "digital-ocean-app-platform":
|
case "digital-ocean-app-platform":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/digital-ocean-app-platform/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/digital-ocean-app-platform/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -300,7 +300,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "cloud-66":
|
case "cloud-66":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/cloud-66/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/cloud-66/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -308,7 +308,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "northflank":
|
case "northflank":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/northflank/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/northflank/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -316,7 +316,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "windmill":
|
case "windmill":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/windmill/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/windmill/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -324,7 +324,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "teamcity":
|
case "teamcity":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/teamcity/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/teamcity/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -332,7 +332,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "hasura-cloud":
|
case "hasura-cloud":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/hasura-cloud/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/hasura-cloud/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -340,7 +340,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "rundeck":
|
case "rundeck":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/rundeck/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/rundeck/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -348,7 +348,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "azure-devops":
|
case "azure-devops":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/azure-devops/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/azure-devops/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
@@ -356,7 +356,7 @@ export const redirectForProviderAuth = (
|
|||||||
break;
|
break;
|
||||||
case "octopus-deploy":
|
case "octopus-deploy":
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/octopus-deploy/authorize",
|
to: "/projects/$projectId/secret-manager/integrations/octopus-deploy/authorize",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ export const IntegrationRow = ({
|
|||||||
<Tr
|
<Tr
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
navigate({
|
navigate({
|
||||||
to: "/secret-manager/$projectId/integrations/$integrationId",
|
to: "/projects/$projectId/secret-manager/integrations/$integrationId",
|
||||||
params: {
|
params: {
|
||||||
integrationId: integration.id,
|
integrationId: integration.id,
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const Route = createFileRoute(
|
|||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
throw redirect({
|
throw redirect({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
@@ -46,7 +46,7 @@ export const Route = createFileRoute(
|
|||||||
|
|
||||||
if (secretSyncs.length) {
|
if (secretSyncs.length) {
|
||||||
throw redirect({
|
throw redirect({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
@@ -62,7 +62,7 @@ export const Route = createFileRoute(
|
|||||||
});
|
});
|
||||||
} catch {
|
} catch {
|
||||||
throw redirect({
|
throw redirect({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
@@ -72,7 +72,7 @@ export const Route = createFileRoute(
|
|||||||
|
|
||||||
if (integrations.length) {
|
if (integrations.length) {
|
||||||
throw redirect({
|
throw redirect({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
@@ -81,7 +81,7 @@ export const Route = createFileRoute(
|
|||||||
}
|
}
|
||||||
|
|
||||||
throw redirect({
|
throw redirect({
|
||||||
to: "/secret-manager/$projectId/integrations",
|
to: "/projects/$projectId/secret-manager/integrations",
|
||||||
params: {
|
params: {
|
||||||
projectId
|
projectId
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ import { useUpdateFolderBatch } from "@app/hooks/api/secretFolders/queries";
|
|||||||
import { TUpdateFolderBatchDTO } from "@app/hooks/api/secretFolders/types";
|
import { TUpdateFolderBatchDTO } from "@app/hooks/api/secretFolders/types";
|
||||||
import { TSecretRotationV2 } from "@app/hooks/api/secretRotationsV2";
|
import { TSecretRotationV2 } from "@app/hooks/api/secretRotationsV2";
|
||||||
import { SecretType, SecretV3RawSanitized, TSecretFolder } from "@app/hooks/api/types";
|
import { SecretType, SecretV3RawSanitized, TSecretFolder } from "@app/hooks/api/types";
|
||||||
import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types";
|
import { ProjectVersion } from "@app/hooks/api/workspace/types";
|
||||||
import {
|
import {
|
||||||
useDynamicSecretOverview,
|
useDynamicSecretOverview,
|
||||||
useFolderOverview,
|
useFolderOverview,
|
||||||
@@ -655,7 +655,7 @@ export const OverviewPage = () => {
|
|||||||
const envIndex = visibleEnvs.findIndex((el) => slug === el.slug);
|
const envIndex = visibleEnvs.findIndex((el) => slug === el.slug);
|
||||||
if (envIndex !== -1) {
|
if (envIndex !== -1) {
|
||||||
navigate({
|
navigate({
|
||||||
to: `/${ProjectType.SecretManager}/$projectId/secrets/$envSlug` as const,
|
to: "/projects/$projectId/secret-manager/secrets/$envSlug",
|
||||||
params: {
|
params: {
|
||||||
projectId: workspaceId,
|
projectId: workspaceId,
|
||||||
envSlug: slug
|
envSlug: slug
|
||||||
@@ -1371,7 +1371,7 @@ export const OverviewPage = () => {
|
|||||||
iconSize="3x"
|
iconSize="3x"
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
to={`/${ProjectType.SecretManager}/$projectId/settings` as const}
|
to="/projects/$projectId/secret-manager/settings"
|
||||||
params={{
|
params={{
|
||||||
projectId: workspaceId
|
projectId: workspaceId
|
||||||
}}
|
}}
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ type Props = {
|
|||||||
|
|
||||||
export const FolderBreadCrumbs = ({ secretPath = "/", onResetSearch }: Props) => {
|
export const FolderBreadCrumbs = ({ secretPath = "/", onResetSearch }: Props) => {
|
||||||
const navigate = useNavigate({
|
const navigate = useNavigate({
|
||||||
from: "/secret-manager/$projectId/overview"
|
from: "/projects/$projectId/secret-manager/overview"
|
||||||
});
|
});
|
||||||
|
|
||||||
const onFolderCrumbClick = (index: number) => {
|
const onFolderCrumbClick = (index: number) => {
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ export const QuickSearchDynamicSecretItem = ({
|
|||||||
onClose
|
onClose
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const navigate = useNavigate({
|
const navigate = useNavigate({
|
||||||
from: "/secret-manager/$projectId/overview"
|
from: "/projects/$projectId/secret-manager/overview"
|
||||||
});
|
});
|
||||||
|
|
||||||
const [groupDynamicSecret] = dynamicSecretGroup;
|
const [groupDynamicSecret] = dynamicSecretGroup;
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ type Props = {
|
|||||||
|
|
||||||
export const QuickSearchFolderItem = ({ folderGroup, onClose }: Props) => {
|
export const QuickSearchFolderItem = ({ folderGroup, onClose }: Props) => {
|
||||||
const navigate = useNavigate({
|
const navigate = useNavigate({
|
||||||
from: "/secret-manager/$projectId/overview"
|
from: "/projects/$projectId/secret-manager/overview"
|
||||||
});
|
});
|
||||||
|
|
||||||
const [groupFolder] = folderGroup;
|
const [groupFolder] = folderGroup;
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ export const QuickSearchSecretItem = ({
|
|||||||
isSingleEnv,
|
isSingleEnv,
|
||||||
search
|
search
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const navigate = useNavigate({ from: "/secret-manager/$projectId/overview" });
|
const navigate = useNavigate({ from: "/projects/$projectId/secret-manager/overview" });
|
||||||
const envSlugMap = new Map(environments.map((env) => [env.slug, env]));
|
const envSlugMap = new Map(environments.map((env) => [env.slug, env]));
|
||||||
const [isUrlCopied, , setIsUrlCopied] = useTimedReset<boolean>({
|
const [isUrlCopied, , setIsUrlCopied] = useTimedReset<boolean>({
|
||||||
initialState: false
|
initialState: false
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ type Props = {
|
|||||||
|
|
||||||
export const QuickSearchSecretRotationItem = ({ secretRotationGroup, onClose }: Props) => {
|
export const QuickSearchSecretRotationItem = ({ secretRotationGroup, onClose }: Props) => {
|
||||||
const navigate = useNavigate({
|
const navigate = useNavigate({
|
||||||
from: "/secret-manager/$projectId/overview"
|
from: "/projects/$projectId/secret-manager/overview"
|
||||||
});
|
});
|
||||||
|
|
||||||
const [groupSecretRotation] = secretRotationGroup;
|
const [groupSecretRotation] = secretRotationGroup;
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import { createFileRoute } from '@tanstack/react-router'
|
import { createFileRoute } 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 { SecretApprovalsPage } from './SecretApprovalsPage'
|
import { SecretApprovalsPage } from "./SecretApprovalsPage";
|
||||||
|
|
||||||
const SecretApprovalPageQueryParams = z.object({
|
const SecretApprovalPageQueryParams = z.object({
|
||||||
requestId: z.string().catch(''),
|
requestId: z.string().catch("")
|
||||||
})
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
'/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/approval',
|
"/_authenticate/_inject-org-details/_org-layout/projects/$projectId/_project-layout/secret-manager/_secret-manager-layout/approval"
|
||||||
)({
|
)({
|
||||||
component: SecretApprovalsPage,
|
component: SecretApprovalsPage,
|
||||||
validateSearch: zodValidator(SecretApprovalPageQueryParams),
|
validateSearch: zodValidator(SecretApprovalPageQueryParams),
|
||||||
@@ -18,9 +18,9 @@ export const Route = createFileRoute(
|
|||||||
breadcrumbs: [
|
breadcrumbs: [
|
||||||
...context.breadcrumbs,
|
...context.breadcrumbs,
|
||||||
{
|
{
|
||||||
label: 'Approvals',
|
label: "Approvals"
|
||||||
},
|
}
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
},
|
}
|
||||||
})
|
});
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user