mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 06:28:15 +00:00
style: implement new navigation
This commit is contained in:
@@ -22,7 +22,7 @@ const badgeVariants = cva(
|
|||||||
namespace:
|
namespace:
|
||||||
"bg-namespace-v1/20 text-namespace-v1 [&_svg]:text-namespace-v1 flex opacity-100 hover:bg-namespace-v1/10 items-center [&_svg]:size-3.5 gap-x-1 w-min whitespace-nowrap",
|
"bg-namespace-v1/20 text-namespace-v1 [&_svg]:text-namespace-v1 flex opacity-100 hover:bg-namespace-v1/10 items-center [&_svg]:size-3.5 gap-x-1 w-min whitespace-nowrap",
|
||||||
project:
|
project:
|
||||||
"bg-primary/10 text-primary [&_svg]:text-primary opacity-100 hover:bg-primary/10 flex items-center [&_svg]:size-3 gap-x-1 w-min whitespace-nowrap",
|
"bg-primary/10 text-primary [&_svg]:text-primary opacity-100 hover:bg-primary/10 flex items-center [&_svg]:size-3 w-min gap-x-1 whitespace-nowrap",
|
||||||
instance:
|
instance:
|
||||||
"bg-mineshaft-200/20 text-mineshaft-200 [&_svg]:text-mineshaft-200 opacity-100 hover:bg-mineshaft-200/20 flex items-center [&_svg]:size-3 gap-x-1 w-min whitespace-nowrap"
|
"bg-mineshaft-200/20 text-mineshaft-200 [&_svg]:text-mineshaft-200 opacity-100 hover:bg-mineshaft-200/20 flex items-center [&_svg]:size-3 gap-x-1 w-min whitespace-nowrap"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,10 +120,16 @@ export type TBreadcrumbFormat =
|
|||||||
icon?: ReactNode;
|
icon?: ReactNode;
|
||||||
};
|
};
|
||||||
|
|
||||||
const BreadcrumbContainer = ({ breadcrumbs }: { breadcrumbs: TBreadcrumbFormat[] }) => (
|
const BreadcrumbContainer = ({
|
||||||
<div className="mx-auto max-w-7xl text-white">
|
breadcrumbs,
|
||||||
<Breadcrumb>
|
className
|
||||||
<BreadcrumbList>
|
}: {
|
||||||
|
breadcrumbs: TBreadcrumbFormat[];
|
||||||
|
className?: string;
|
||||||
|
}) => (
|
||||||
|
<div className={twMerge("mx-auto max-w-8xl overflow-hidden text-white", className)}>
|
||||||
|
<Breadcrumb className="overflow-hidden">
|
||||||
|
<BreadcrumbList className="overflow-hidden">
|
||||||
{(breadcrumbs as TBreadcrumbFormat[]).map((el, index) => {
|
{(breadcrumbs as TBreadcrumbFormat[]).map((el, index) => {
|
||||||
const isNotLastCrumb = index + 1 !== breadcrumbs.length;
|
const isNotLastCrumb = index + 1 !== breadcrumbs.length;
|
||||||
const BreadcrumbSegment = isNotLastCrumb ? BreadcrumbLink : BreadcrumbPage;
|
const BreadcrumbSegment = isNotLastCrumb ? BreadcrumbLink : BreadcrumbPage;
|
||||||
@@ -165,8 +171,8 @@ const BreadcrumbContainer = ({ breadcrumbs }: { breadcrumbs: TBreadcrumbFormat[]
|
|||||||
const Component = el.component;
|
const Component = el.component;
|
||||||
return (
|
return (
|
||||||
<React.Fragment key={`breadcrumb-group-${index + 1}`}>
|
<React.Fragment key={`breadcrumb-group-${index + 1}`}>
|
||||||
<BreadcrumbItem>
|
<BreadcrumbItem className="overflow-hidden">
|
||||||
<BreadcrumbSegment>
|
<BreadcrumbSegment className="overflow-hidden">
|
||||||
<Component />
|
<Component />
|
||||||
</BreadcrumbSegment>
|
</BreadcrumbSegment>
|
||||||
</BreadcrumbItem>
|
</BreadcrumbItem>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const SCOPE_NAME: Record<NonNullable<Props["scope"]>, { label: string; icon: Ico
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const PageHeader = ({ title, description, children, className, scope }: Props) => (
|
export const PageHeader = ({ title, description, children, className, scope }: Props) => (
|
||||||
<div className={twMerge("mb-4 w-full", className)}>
|
<div className={twMerge("mb-10 w-full border-b border-mineshaft-500 pb-10", className)}>
|
||||||
<div className="flex w-full justify-between">
|
<div className="flex w-full justify-between">
|
||||||
<div className="mr-4 flex w-full items-center">
|
<div className="mr-4 flex w-full items-center">
|
||||||
<h1 className="text-3xl font-medium text-white capitalize">{title}</h1>
|
<h1 className="text-3xl font-medium text-white capitalize">{title}</h1>
|
||||||
|
|||||||
@@ -1,10 +1,19 @@
|
|||||||
|
import { IconDefinition } from "@fortawesome/free-brands-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
export type TabsProps = TabsPrimitive.TabsProps;
|
export type TabsProps = TabsPrimitive.TabsProps;
|
||||||
|
|
||||||
export const Tabs = ({ className, children, ...props }: TabsProps) => (
|
export const Tabs = ({ className, children, ...props }: TabsProps) => (
|
||||||
<TabsPrimitive.Root className={twMerge("flex flex-col", className)} {...props}>
|
<TabsPrimitive.Root
|
||||||
|
className={twMerge(
|
||||||
|
"flex",
|
||||||
|
className,
|
||||||
|
props.orientation === "vertical" ? "flex-col lg:flex-row lg:gap-x-12" : "flex-col"
|
||||||
|
)}
|
||||||
|
{...props}
|
||||||
|
>
|
||||||
{children}
|
{children}
|
||||||
</TabsPrimitive.Root>
|
</TabsPrimitive.Root>
|
||||||
);
|
);
|
||||||
@@ -13,7 +22,11 @@ export type TabListProps = TabsPrimitive.TabsListProps;
|
|||||||
|
|
||||||
export const TabList = ({ className, children, ...props }: TabListProps) => (
|
export const TabList = ({ className, children, ...props }: TabListProps) => (
|
||||||
<TabsPrimitive.List
|
<TabsPrimitive.List
|
||||||
className={twMerge("flex shrink-0 border-b-2 border-mineshaft-800", className)}
|
className={twMerge(
|
||||||
|
"no-scrollbar flex shrink-0 overflow-auto border-b-2 border-mineshaft-800",
|
||||||
|
"data-[orientation=vertical]:lg:flex-col data-[orientation=vertical]:lg:items-start data-[orientation=vertical]:lg:gap-y-6 data-[orientation=vertical]:lg:border-b-0",
|
||||||
|
className
|
||||||
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
@@ -26,18 +39,29 @@ export const Tab = ({
|
|||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
variant = "project",
|
variant = "project",
|
||||||
|
icon,
|
||||||
...props
|
...props
|
||||||
}: TabProps & { variant?: "project" | "namespace" | "org" }) => (
|
}: TabProps & {
|
||||||
|
icon?: IconDefinition;
|
||||||
|
variant?: "project" | "namespace" | "org" | "instance";
|
||||||
|
}) => (
|
||||||
<TabsPrimitive.Trigger
|
<TabsPrimitive.Trigger
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"flex h-10 items-center justify-center px-3 text-sm font-medium text-mineshaft-400 transition-all select-none first:rounded-tl-md last:rounded-tr-md hover:text-mineshaft-200 data-[state=active]:border-b data-[state=active]:text-white",
|
"flex h-10 cursor-pointer items-center justify-center border-transparent",
|
||||||
|
"px-3 text-sm font-medium whitespace-nowrap text-mineshaft-400 transition-all select-none",
|
||||||
|
"data-[orientation=vertical]:lg:h-5 data-[orientation=vertical]:lg:border-b-0 data-[orientation=vertical]:lg:border-l",
|
||||||
|
"border-b hover:text-mineshaft-200",
|
||||||
|
"data-[state=active]:border-mineshaft-400 data-[state=active]:text-white",
|
||||||
|
"hover:border-mineshaft-400",
|
||||||
variant === "project" && "data-[state=active]:border-primary",
|
variant === "project" && "data-[state=active]:border-primary",
|
||||||
variant === "namespace" && "data-[state=active]:border-namespace-v1",
|
variant === "namespace" && "data-[state=active]:border-namespace-v1",
|
||||||
variant === "org" && "data-[state=active]:border-org-v1",
|
variant === "org" && "data-[state=active]:border-org-v1",
|
||||||
|
variant === "instance" && "data-[state=active]:border-mineshaft-300",
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
{icon && <FontAwesomeIcon icon={icon} className="mr-2" size="xs" />}
|
||||||
{children}
|
{children}
|
||||||
</TabsPrimitive.Trigger>
|
</TabsPrimitive.Trigger>
|
||||||
);
|
);
|
||||||
@@ -46,7 +70,10 @@ export type TabPanelProps = TabsPrimitive.TabsContentProps;
|
|||||||
|
|
||||||
export const TabPanel = ({ className, children, ...props }: TabPanelProps) => (
|
export const TabPanel = ({ className, children, ...props }: TabPanelProps) => (
|
||||||
<TabsPrimitive.Content
|
<TabsPrimitive.Content
|
||||||
className={twMerge("grow rounded-br-md rounded-bl-md py-5 outline-hidden", className)}
|
className={twMerge(
|
||||||
|
"grow rounded-br-md rounded-bl-md py-5 outline-hidden data-[orientation=vertical]:lg:py-0",
|
||||||
|
className
|
||||||
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
--font-inter: "Inter", sans-serif;
|
--font-inter: "Inter", sans-serif;
|
||||||
--color-org-v1: #30B3FF;
|
--color-org-v1: #30B3FF;
|
||||||
--color-namespace-v1: #96ff59;
|
--color-namespace-v1: #96ff59;
|
||||||
|
--max-width-8xl: 88rem; /* 1408px */
|
||||||
/* Primary */
|
/* Primary */
|
||||||
--color-primary-50: #fffff5;
|
--color-primary-50: #fffff5;
|
||||||
--color-primary-100: #fcfce8;
|
--color-primary-100: #fcfce8;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import { RedisBanner } from "@app/layouts/OrganizationLayout/components/RedisBan
|
|||||||
import { SmtpBanner } from "@app/layouts/OrganizationLayout/components/SmtpBanner";
|
import { SmtpBanner } from "@app/layouts/OrganizationLayout/components/SmtpBanner";
|
||||||
|
|
||||||
import { InsecureConnectionBanner } from "../OrganizationLayout/components/InsecureConnectionBanner";
|
import { InsecureConnectionBanner } from "../OrganizationLayout/components/InsecureConnectionBanner";
|
||||||
import { AdminSidebar } from "./Sidebar";
|
import { AdminNavBar } from "./AdminNavBar";
|
||||||
|
|
||||||
export const AdminLayout = () => {
|
export const AdminLayout = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -33,9 +33,9 @@ export const AdminLayout = () => {
|
|||||||
{!isLoading && !serverDetails?.emailConfigured && <SmtpBanner />}
|
{!isLoading && !serverDetails?.emailConfigured && <SmtpBanner />}
|
||||||
{!isLoading && subscription.auditLogs && <AuditLogBanner />}
|
{!isLoading && subscription.auditLogs && <AuditLogBanner />}
|
||||||
{!window.isSecureContext && <InsecureConnectionBanner />}
|
{!window.isSecureContext && <InsecureConnectionBanner />}
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="flex grow flex-col overflow-y-hidden">
|
||||||
<AdminSidebar />
|
<AdminNavBar />
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-4 pt-8 pb-4 dark:scheme-dark">
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4 dark:scheme-dark">
|
||||||
<Outlet />
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,102 @@
|
|||||||
|
import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";
|
||||||
|
import {
|
||||||
|
faArrowLeft,
|
||||||
|
faBuilding,
|
||||||
|
faCog,
|
||||||
|
faDatabase,
|
||||||
|
faGlobe,
|
||||||
|
faKey,
|
||||||
|
faLock,
|
||||||
|
faPlug,
|
||||||
|
faUserTie
|
||||||
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useMatchRoute } from "@tanstack/react-router";
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
|
|
||||||
|
const generalTabs = [
|
||||||
|
{
|
||||||
|
label: "General",
|
||||||
|
icon: faCog,
|
||||||
|
link: "/admin/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Encryption",
|
||||||
|
icon: faLock,
|
||||||
|
link: "/admin/encryption"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Authentication",
|
||||||
|
icon: faCheckCircle,
|
||||||
|
link: "/admin/authentication"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Integrations",
|
||||||
|
icon: faPlug,
|
||||||
|
link: "/admin/integrations"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Caching",
|
||||||
|
icon: faDatabase,
|
||||||
|
link: "/admin/caching"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Environment Variables",
|
||||||
|
icon: faKey,
|
||||||
|
link: "/admin/environment"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const othersTabs = [
|
||||||
|
{
|
||||||
|
label: "Access Controls",
|
||||||
|
icon: faUserTie,
|
||||||
|
link: "/admin/access-management"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Resource Overview",
|
||||||
|
icon: faBuilding,
|
||||||
|
link: "/admin/resources/overview"
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export const AdminNavBar = () => {
|
||||||
|
const matchRoute = useMatchRoute();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
|
<motion.div
|
||||||
|
initial={{ x: -150 }}
|
||||||
|
animate={{ x: 0 }}
|
||||||
|
exit={{ x: -150 }}
|
||||||
|
transition={{ duration: 0.2 }}
|
||||||
|
className="px-4"
|
||||||
|
>
|
||||||
|
<nav className="w-full">
|
||||||
|
<Tabs value="selected">
|
||||||
|
<TabList className="border-b-0">
|
||||||
|
<Link to="/organization/projects">
|
||||||
|
<Tab value="back" className="flex gap-x-2">
|
||||||
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
|
</Tab>
|
||||||
|
</Link>
|
||||||
|
{[...generalTabs, ...othersTabs].map((tab) => {
|
||||||
|
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
||||||
|
return (
|
||||||
|
<Link key={tab.link} to={tab.link}>
|
||||||
|
<Tab variant="instance" value={isActive ? "selected" : ""}>
|
||||||
|
{tab.label}
|
||||||
|
</Tab>
|
||||||
|
</Link>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</TabList>
|
||||||
|
</Tabs>
|
||||||
|
</nav>
|
||||||
|
</motion.div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,126 +0,0 @@
|
|||||||
import { faCheckCircle } from "@fortawesome/free-regular-svg-icons";
|
|
||||||
import {
|
|
||||||
faBuilding,
|
|
||||||
faChevronLeft,
|
|
||||||
faCog,
|
|
||||||
faDatabase,
|
|
||||||
faKey,
|
|
||||||
faLock,
|
|
||||||
faPlug,
|
|
||||||
faUserTie
|
|
||||||
} 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";
|
|
||||||
|
|
||||||
const generalTabs = [
|
|
||||||
{
|
|
||||||
label: "General",
|
|
||||||
icon: faCog,
|
|
||||||
link: "/admin/"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Encryption",
|
|
||||||
icon: faLock,
|
|
||||||
link: "/admin/encryption"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Authentication",
|
|
||||||
icon: faCheckCircle,
|
|
||||||
link: "/admin/authentication"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Integrations",
|
|
||||||
icon: faPlug,
|
|
||||||
link: "/admin/integrations"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Caching",
|
|
||||||
icon: faDatabase,
|
|
||||||
link: "/admin/caching"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Environment Variables",
|
|
||||||
icon: faKey,
|
|
||||||
link: "/admin/environment"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
const othersTabs = [
|
|
||||||
{
|
|
||||||
label: "Access Controls",
|
|
||||||
icon: faUserTie,
|
|
||||||
link: "/admin/access-management"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Resource Overview",
|
|
||||||
icon: faBuilding,
|
|
||||||
link: "/admin/resources/overview"
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
export const AdminSidebar = () => {
|
|
||||||
const matchRoute = useMatchRoute();
|
|
||||||
|
|
||||||
return (
|
|
||||||
<aside className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60">
|
|
||||||
<nav className="items-between flex h-full flex-col justify-between overflow-y-auto dark:scheme-dark">
|
|
||||||
<div className="flex-1">
|
|
||||||
<Menu>
|
|
||||||
<MenuGroup title="Configuration">
|
|
||||||
{generalTabs.map((tab) => {
|
|
||||||
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
|
||||||
return (
|
|
||||||
<Link key={tab.link} to={tab.link}>
|
|
||||||
<MenuItem isSelected={Boolean(isActive)}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={tab.icon} />
|
|
||||||
</div>
|
|
||||||
{tab.label}
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
{othersTabs.map((tab) => {
|
|
||||||
const isActive = matchRoute({ to: tab.link, fuzzy: false });
|
|
||||||
return (
|
|
||||||
<Link key={tab.link} to={tab.link}>
|
|
||||||
<MenuItem isSelected={Boolean(isActive)}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={tab.icon} />
|
|
||||||
</div>
|
|
||||||
{tab.label}
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</MenuGroup>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<FontAwesomeIcon
|
|
||||||
className="mx-1 inline-block shrink-0"
|
|
||||||
icon={faChevronLeft}
|
|
||||||
flip="vertical"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Back to Organization
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</nav>
|
|
||||||
</aside>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
import { faBook, faCog, faCube, faHome, faLock, faUsers } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import { useProject, useProjectPermission } from "@app/context";
|
import { useProject, useProjectPermission } from "@app/context";
|
||||||
|
|
||||||
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
|
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
|
||||||
@@ -12,41 +12,35 @@ export const KmsLayout = () => {
|
|||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const { assumedPrivilegeDetails } = useProjectPermission();
|
const { assumedPrivilegeDetails } = useProjectPermission();
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="unlock" />
|
<TabList className="border-b-0">
|
||||||
KMS
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/kms/$projectId/overview"
|
to="/projects/kms/$projectId/overview"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Overview</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCube} />
|
|
||||||
</div>
|
|
||||||
Overview
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/kms/$projectId/kmip"
|
to="/projects/kms/$projectId/kmip"
|
||||||
@@ -54,51 +48,33 @@ export const KmsLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>KMIP</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faLock} />
|
|
||||||
</div>
|
|
||||||
KMIP
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
<Link
|
|
||||||
to="/projects/kms/$projectId/access-management"
|
|
||||||
params={{
|
|
||||||
projectId: currentProject.id
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
|
||||||
</div>
|
|
||||||
Project Access
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/kms/$projectId/audit-logs"
|
to="/projects/kms/$projectId/audit-logs"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
|
>
|
||||||
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/projects/kms/$projectId/access-management"
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faBook} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Audit Logs
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
>
|
||||||
|
Access Control
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -107,43 +83,16 @@ export const KmsLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
variant="project"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { useFetchServerStatus } from "@app/hooks/api";
|
|||||||
import { AuditLogBanner } from "./components/AuditLogBanner";
|
import { AuditLogBanner } from "./components/AuditLogBanner";
|
||||||
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
|
import { InsecureConnectionBanner } from "./components/InsecureConnectionBanner";
|
||||||
import { Navbar } from "./components/NavBar";
|
import { Navbar } from "./components/NavBar";
|
||||||
import { OrgSidebar } from "./components/OrgSidebar";
|
import { OrgNavBar } from "./components/OrgNavBar";
|
||||||
import { RedisBanner } from "./components/RedisBanner";
|
import { RedisBanner } from "./components/RedisBanner";
|
||||||
import { SmtpBanner } from "./components/SmtpBanner";
|
import { SmtpBanner } from "./components/SmtpBanner";
|
||||||
|
|
||||||
@@ -41,16 +41,16 @@ export const OrganizationLayout = () => {
|
|||||||
className={`dark hidden ${containerHeight} w-full flex-col overflow-x-hidden bg-bunker-800 transition-all md:flex`}
|
className={`dark hidden ${containerHeight} w-full flex-col overflow-x-hidden bg-bunker-800 transition-all md:flex`}
|
||||||
>
|
>
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{!isLoading && !serverDetails?.redisConfigured && <RedisBanner />}
|
<div className="flex grow flex-col overflow-y-hidden">
|
||||||
{!isLoading && !serverDetails?.emailConfigured && <SmtpBanner />}
|
<OrgNavBar isHidden={isInsideProject} />
|
||||||
{!isLoading && subscription.auditLogs && <AuditLogBanner />}
|
{!isLoading && !isInsideProject && !serverDetails?.redisConfigured && <RedisBanner />}
|
||||||
{!window.isSecureContext && <InsecureConnectionBanner />}
|
{!isLoading && !isInsideProject && !serverDetails?.emailConfigured && <SmtpBanner />}
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
{!isLoading && !isInsideProject && subscription.auditLogs && <AuditLogBanner />}
|
||||||
<OrgSidebar isHidden={isInsideProject} />
|
{!window.isSecureContext && !isInsideProject && <InsecureConnectionBanner />}
|
||||||
<main
|
<main
|
||||||
className={twMerge(
|
className={twMerge(
|
||||||
"flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-4 pt-8 pb-4 dark:scheme-dark",
|
"flex-1 overflow-x-hidden bg-bunker-800 px-12 pt-10 pb-4 dark:scheme-dark",
|
||||||
isInsideProject && "p-0"
|
isInsideProject ? "overflow-y-hidden p-0" : "overflow-y-auto"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
faEnvelope,
|
faEnvelope,
|
||||||
faExclamationTriangle,
|
faExclamationTriangle,
|
||||||
faGlobe,
|
faGlobe,
|
||||||
|
faInfinity,
|
||||||
faInfo,
|
faInfo,
|
||||||
faInfoCircle,
|
faInfoCircle,
|
||||||
faServer,
|
faServer,
|
||||||
@@ -43,7 +44,7 @@ import { envConfig } from "@app/config/env";
|
|||||||
import { useOrganization, useSubscription, useUser } from "@app/context";
|
import { useOrganization, useSubscription, useUser } from "@app/context";
|
||||||
import { isInfisicalCloud } from "@app/helpers/platform";
|
import { isInfisicalCloud } from "@app/helpers/platform";
|
||||||
import { useToggle } from "@app/hooks";
|
import { useToggle } from "@app/hooks";
|
||||||
import { projectKeys, useGetOrganizations, useLogoutUser } from "@app/hooks/api";
|
import { projectKeys, useGetOrganizations, useGetOrgTrialUrl, useLogoutUser } from "@app/hooks/api";
|
||||||
import { authKeys, selectOrganization } from "@app/hooks/api/auth/queries";
|
import { authKeys, selectOrganization } from "@app/hooks/api/auth/queries";
|
||||||
import { MfaMethod } from "@app/hooks/api/auth/types";
|
import { MfaMethod } from "@app/hooks/api/auth/types";
|
||||||
import { getAuthToken } from "@app/hooks/api/reactQuery";
|
import { getAuthToken } from "@app/hooks/api/reactQuery";
|
||||||
@@ -162,6 +163,8 @@ export const Navbar = () => {
|
|||||||
await navigateUserToOrg(navigate, orgId);
|
await navigateUserToOrg(navigate, orgId);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const { mutateAsync } = useGetOrgTrialUrl();
|
||||||
|
|
||||||
const logout = useLogoutUser();
|
const logout = useLogoutUser();
|
||||||
const logOutUser = async () => {
|
const logOutUser = async () => {
|
||||||
try {
|
try {
|
||||||
@@ -201,11 +204,12 @@ export const Navbar = () => {
|
|||||||
|
|
||||||
const isServerAdminPanel = location.pathname.startsWith("/admin");
|
const isServerAdminPanel = location.pathname.startsWith("/admin");
|
||||||
|
|
||||||
const isOrgScope = breadcrumbs?.length === 1; // TODO: scott/akhil is this adequate?
|
const isOrgScope = location.pathname.startsWith("/organization"); // TODO: scott/akhil is this adequate?
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="z-10 flex min-h-12 items-center border-b border-mineshaft-600 bg-mineshaft-800 px-4">
|
<div className="z-10 flex min-h-12 items-center bg-mineshaft-900 px-4 pt-1">
|
||||||
<div>
|
<div className="mr-auto flex items-center overflow-hidden">
|
||||||
|
<div className="shrink-0">
|
||||||
<Link to="/organization/projects">
|
<Link to="/organization/projects">
|
||||||
<img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
|
<img alt="infisical logo" src="/images/logotransparent.png" className="h-4" />
|
||||||
</Link>
|
</Link>
|
||||||
@@ -230,16 +234,19 @@ export const Navbar = () => {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center overflow-hidden">
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<Link to="/organization/projects">
|
<Link className="overflow-hidden" to="/organization/projects">
|
||||||
<div className="group flex cursor-pointer items-center gap-2 text-sm text-white transition-all duration-100 hover:text-primary">
|
<div className="group flex cursor-pointer items-center gap-2 overflow-hidden text-sm text-white transition-all duration-100 hover:text-primary">
|
||||||
<Badge
|
<Badge
|
||||||
variant="org"
|
variant="org"
|
||||||
className={twMerge("text-sm", !isOrgScope && "bg-transparent opacity-75")}
|
className={twMerge(
|
||||||
|
"max-w-full min-w-0 text-sm",
|
||||||
|
!isOrgScope && "bg-transparent opacity-75"
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon icon={faGlobe} />
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
{currentOrg?.name}
|
<p className="truncate">{currentOrg?.name}</p>
|
||||||
</Badge>
|
</Badge>
|
||||||
<div className="mr-1 rounded-sm border border-mineshaft-500 px-1 text-xs text-bunker-300 no-underline!">
|
<div className="mr-1 rounded-sm border border-mineshaft-500 px-1 text-xs text-bunker-300 no-underline!">
|
||||||
{getPlan(subscription)}
|
{getPlan(subscription)}
|
||||||
@@ -277,7 +284,9 @@ export const Navbar = () => {
|
|||||||
className="mt-6 cursor-default p-1 shadow-mineshaft-600 drop-shadow-md"
|
className="mt-6 cursor-default p-1 shadow-mineshaft-600 drop-shadow-md"
|
||||||
style={{ minWidth: "220px" }}
|
style={{ minWidth: "220px" }}
|
||||||
>
|
>
|
||||||
<div className="px-2 py-1 text-xs text-mineshaft-400 capitalize">organizations</div>
|
<div className="px-2 py-1 text-xs text-mineshaft-400 capitalize">
|
||||||
|
organizations
|
||||||
|
</div>
|
||||||
{orgs?.map((org) => {
|
{orgs?.map((org) => {
|
||||||
return (
|
return (
|
||||||
<DropdownMenuItem key={org.id}>
|
<DropdownMenuItem key={org.id}>
|
||||||
@@ -326,19 +335,60 @@ export const Navbar = () => {
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
<div className="mt-1 h-1 border-t border-mineshaft-600" />
|
<div className="mt-1 h-1 border-t border-mineshaft-600" />
|
||||||
<DropdownMenuItem icon={<FontAwesomeIcon icon={faSignOut} />} onClick={logOutUser}>
|
<DropdownMenuItem
|
||||||
|
icon={<FontAwesomeIcon icon={faSignOut} />}
|
||||||
|
onClick={logOutUser}
|
||||||
|
>
|
||||||
Log Out
|
Log Out
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
|
{!isOrgScope && (
|
||||||
|
<>
|
||||||
<p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
|
<p className="pr-3 pl-1 text-lg text-mineshaft-400/70">/</p>
|
||||||
{breadcrumbs ? (
|
{breadcrumbs ? (
|
||||||
<BreadcrumbContainer breadcrumbs={breadcrumbs as TBreadcrumbFormat[]} />
|
<BreadcrumbContainer
|
||||||
|
className="min-w-[10rem] flex-1"
|
||||||
|
breadcrumbs={[breadcrumbs[0]] as TBreadcrumbFormat[]}
|
||||||
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
<div className="grow" />
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{subscription && subscription.slug === "starter" && !subscription.has_used_trial && (
|
||||||
|
<Tooltip content="Start Free Pro Trial">
|
||||||
|
<Button
|
||||||
|
variant="plain"
|
||||||
|
className="mr-2 border-mineshaft-500 px-2.5 py-1.5 whitespace-nowrap text-mineshaft-200 hover:bg-mineshaft-600"
|
||||||
|
leftIcon={<FontAwesomeIcon icon={faInfinity} />}
|
||||||
|
onClick={async () => {
|
||||||
|
if (!subscription || !currentOrg) return;
|
||||||
|
|
||||||
|
// direct user to start pro trial
|
||||||
|
const url = await mutateAsync({
|
||||||
|
orgId: currentOrg.id,
|
||||||
|
success_url: window.location.href
|
||||||
|
});
|
||||||
|
|
||||||
|
window.location.href = url;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Free Pro Trial
|
||||||
|
</Button>
|
||||||
|
</Tooltip>
|
||||||
|
)}
|
||||||
|
{user.superAdmin && !location.pathname.startsWith("/admin") && (
|
||||||
|
<Link
|
||||||
|
className="mr-2 rounded-md border border-mineshaft-500 px-2.5 py-1.5 text-sm whitespace-nowrap text-mineshaft-200 hover:bg-mineshaft-600"
|
||||||
|
to="/admin"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faServer} className="mr-2" />
|
||||||
|
Server Console
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<div className="rounded-l-md border border-r-0 border-mineshaft-500 px-2.5 py-1 hover:bg-mineshaft-600">
|
<div className="rounded-l-md border border-r-0 border-mineshaft-500 px-2.5 py-1 hover:bg-mineshaft-600">
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
import { Link, useLocation } from "@tanstack/react-router";
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
||||||
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
|
import { usePopUp } from "@app/hooks";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
isHidden?: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const OrgNavBar = ({ isHidden }: Props) => {
|
||||||
|
const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
|
||||||
|
|
||||||
|
const { pathname } = useLocation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{!isHidden && (
|
||||||
|
<div className="dark hidden w-full flex-col overflow-x-hidden border-b border-mineshaft-600 bg-mineshaft-900 px-4 md:flex">
|
||||||
|
<motion.div
|
||||||
|
key="menu-project-items"
|
||||||
|
initial={{ x: 150 }}
|
||||||
|
animate={{ x: 0 }}
|
||||||
|
exit={{ x: 150 }}
|
||||||
|
transition={{ duration: 0.2 }}
|
||||||
|
className=""
|
||||||
|
>
|
||||||
|
<nav className="w-full">
|
||||||
|
<Tabs value="selected">
|
||||||
|
<TabList className="border-b-0">
|
||||||
|
<Link to="/organization/projects">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
Overview
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/access-management">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab
|
||||||
|
variant="org"
|
||||||
|
value={
|
||||||
|
isActive ||
|
||||||
|
pathname.match(
|
||||||
|
/organization\/members|organization\/identities|organization\/groups|organization\/roles/
|
||||||
|
)
|
||||||
|
? "selected"
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Access Control
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/app-connections">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
App Connections
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/networking">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
Networking
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/audit-logs">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
Audit Logs
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/settings">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
Settings
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link to="/organization/billing">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab variant="org" value={isActive ? "selected" : ""}>
|
||||||
|
Usage & Billing
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
<Link className="mr-auto" to="/organization/secret-sharing">
|
||||||
|
{({ isActive }) => (
|
||||||
|
<Tab value={isActive ? "selected" : ""} variant="org">
|
||||||
|
Secret Sharing
|
||||||
|
</Tab>
|
||||||
|
)}
|
||||||
|
</Link>
|
||||||
|
</TabList>
|
||||||
|
</Tabs>
|
||||||
|
</nav>
|
||||||
|
</motion.div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<CreateOrgModal
|
||||||
|
isOpen={popUp?.createOrg?.isOpen}
|
||||||
|
onClose={() => handlePopUpToggle("createOrg", false)}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { OrgNavBar } from "./OrgNavBar";
|
||||||
@@ -1,214 +0,0 @@
|
|||||||
import {
|
|
||||||
faBook,
|
|
||||||
faCog,
|
|
||||||
faInfinity,
|
|
||||||
faMoneyBill,
|
|
||||||
faNetworkWired,
|
|
||||||
faPlug,
|
|
||||||
faShare,
|
|
||||||
faTable,
|
|
||||||
faUsers,
|
|
||||||
faUserTie
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
||||||
import { Link } from "@tanstack/react-router";
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";
|
|
||||||
import { Menu, MenuGroup, MenuItem, Tooltip } from "@app/components/v2";
|
|
||||||
import { useOrganization, useSubscription, useUser } from "@app/context";
|
|
||||||
import { usePopUp } from "@app/hooks";
|
|
||||||
import { useGetOrgTrialUrl } from "@app/hooks/api";
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
isHidden?: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
export const OrgSidebar = ({ isHidden }: Props) => {
|
|
||||||
const { subscription } = useSubscription();
|
|
||||||
|
|
||||||
const { user } = useUser();
|
|
||||||
const { mutateAsync } = useGetOrgTrialUrl();
|
|
||||||
|
|
||||||
const { currentOrg } = useOrganization();
|
|
||||||
|
|
||||||
const { popUp, handlePopUpToggle } = usePopUp(["createOrg"] as const);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AnimatePresence mode="popLayout">
|
|
||||||
{!isHidden && (
|
|
||||||
<motion.aside
|
|
||||||
key="org-sidebar"
|
|
||||||
transition={{ duration: 0.3 }}
|
|
||||||
initial={{ opacity: 0, translateX: -240 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: -240 }}
|
|
||||||
layout
|
|
||||||
className="dark z-10 w-60 border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-800 to-mineshaft-900"
|
|
||||||
>
|
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
|
||||||
<Menu>
|
|
||||||
<MenuGroup title="Overview">
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faTable} />
|
|
||||||
</div>
|
|
||||||
Overview
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/access-management">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
|
||||||
</div>
|
|
||||||
Organization Access
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/billing">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faMoneyBill} className="mr-4" />
|
|
||||||
</div>
|
|
||||||
Usage & Billing
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/audit-logs">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBook} className="mr-4" />
|
|
||||||
</div>
|
|
||||||
Audit Logs
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/settings">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} className="mr-4" />
|
|
||||||
</div>
|
|
||||||
Organization Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Resources">
|
|
||||||
<Link to="/organization/app-connections">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faPlug} className="mr-4" />
|
|
||||||
</div>
|
|
||||||
App Connections
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link to="/organization/networking">
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="org" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faNetworkWired} className="mr-4" />
|
|
||||||
</div>
|
|
||||||
Networking
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
</Menu>
|
|
||||||
<div className="grow" />
|
|
||||||
<Menu>
|
|
||||||
{subscription &&
|
|
||||||
subscription.slug === "starter" &&
|
|
||||||
!subscription.has_used_trial && (
|
|
||||||
<Tooltip content="Start Free Pro Trial">
|
|
||||||
<MenuItem
|
|
||||||
variant="org"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<FontAwesomeIcon
|
|
||||||
className="mx-1 inline-block shrink-0"
|
|
||||||
icon={faInfinity}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
onClick={async () => {
|
|
||||||
if (!subscription || !currentOrg) return;
|
|
||||||
|
|
||||||
// direct user to start pro trial
|
|
||||||
const url = await mutateAsync({
|
|
||||||
orgId: currentOrg.id,
|
|
||||||
success_url: window.location.href
|
|
||||||
});
|
|
||||||
|
|
||||||
window.location.href = url;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Pro Trial
|
|
||||||
</MenuItem>
|
|
||||||
</Tooltip>
|
|
||||||
)}
|
|
||||||
<Link to="/organization/secret-sharing">
|
|
||||||
<MenuItem
|
|
||||||
variant="org"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faShare} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Share Secret
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
{user.superAdmin && (
|
|
||||||
<Link to="/admin">
|
|
||||||
<MenuItem
|
|
||||||
variant="org"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon
|
|
||||||
className="mx-1 inline-block shrink-0"
|
|
||||||
icon={faUserTie}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Server Console
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
</Menu>
|
|
||||||
</nav>
|
|
||||||
</motion.aside>
|
|
||||||
)}
|
|
||||||
</AnimatePresence>
|
|
||||||
<CreateOrgModal
|
|
||||||
isOpen={popUp?.createOrg?.isOpen}
|
|
||||||
onClose={() => handlePopUpToggle("createOrg", false)}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
export { OrgSidebar } from "./OrgSidebar";
|
|
||||||
@@ -1,19 +1,11 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import {
|
import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
|
||||||
faBook,
|
|
||||||
faBoxOpen,
|
|
||||||
faCog,
|
|
||||||
faDisplay,
|
|
||||||
faHome,
|
|
||||||
faUser,
|
|
||||||
faUsers
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import { useProject, useProjectPermission, useSubscription } from "@app/context";
|
import { useProject, useProjectPermission, useSubscription } from "@app/context";
|
||||||
import { usePopUp } from "@app/hooks";
|
import { usePopUp } from "@app/hooks";
|
||||||
|
|
||||||
@@ -23,7 +15,7 @@ export const PamLayout = () => {
|
|||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
const { assumedPrivilegeDetails } = useProjectPermission();
|
const { assumedPrivilegeDetails } = useProjectPermission();
|
||||||
|
const location = useLocation();
|
||||||
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"]);
|
const { popUp, handlePopUpOpen, handlePopUpToggle } = usePopUp(["upgradePlan"]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -35,39 +27,31 @@ export const PamLayout = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="groups" />
|
<TabList className="border-b-0">
|
||||||
PAM
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/pam/$projectId/accounts"
|
to="/projects/pam/$projectId/accounts"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Accounts</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faUser} />
|
|
||||||
</div>
|
|
||||||
Accounts
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/pam/$projectId/resources"
|
to="/projects/pam/$projectId/resources"
|
||||||
@@ -75,16 +59,7 @@ export const PamLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Resources</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBoxOpen} />
|
|
||||||
</div>
|
|
||||||
Resources
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/pam/$projectId/sessions"
|
to="/projects/pam/$projectId/sessions"
|
||||||
@@ -92,19 +67,8 @@ export const PamLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Sessions</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faDisplay} />
|
|
||||||
</div>
|
|
||||||
Sessions
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
<Link
|
<Link
|
||||||
to="/projects/pam/$projectId/access-management"
|
to="/projects/pam/$projectId/access-management"
|
||||||
params={{
|
params={{
|
||||||
@@ -112,14 +76,16 @@ export const PamLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Project Access
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
>
|
||||||
|
Access Control
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -128,16 +94,7 @@ export const PamLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBook} />
|
|
||||||
</div>
|
|
||||||
Audit Logs
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/pam/$projectId/settings"
|
to="/projects/pam/$projectId/settings"
|
||||||
@@ -145,42 +102,16 @@ export const PamLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<UpgradePlanModal
|
<UpgradePlanModal
|
||||||
|
|||||||
@@ -1,23 +1,10 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import { faArrowLeft, faGlobe, faMobile } from "@fortawesome/free-solid-svg-icons";
|
||||||
faBell,
|
|
||||||
faBook,
|
|
||||||
faCertificate,
|
|
||||||
faCog,
|
|
||||||
faFileLines,
|
|
||||||
faHome,
|
|
||||||
faMobile,
|
|
||||||
faPlug,
|
|
||||||
faPuzzlePiece,
|
|
||||||
faSitemap,
|
|
||||||
faStamp,
|
|
||||||
faUsers
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import { useProject, useProjectPermission } from "@app/context";
|
import { useProject, useProjectPermission } from "@app/context";
|
||||||
|
|
||||||
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
|
import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePrivilegeModeBanner";
|
||||||
@@ -27,42 +14,35 @@ export const PkiManagerLayout = () => {
|
|||||||
const { assumedPrivilegeDetails } = useProjectPermission();
|
const { assumedPrivilegeDetails } = useProjectPermission();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
const location = useLocation();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="note" />
|
<TabList className="border-b-0">
|
||||||
PKI Manager
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/cert-management/$projectId/subscribers"
|
to="/projects/cert-management/$projectId/subscribers"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Subscribers</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faSitemap} />
|
|
||||||
</div>
|
|
||||||
Subscribers
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/cert-management/$projectId/certificate-templates"
|
to="/projects/cert-management/$projectId/certificate-templates"
|
||||||
@@ -71,14 +51,7 @@ export const PkiManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>Certificate Templates</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faFileLines} />
|
|
||||||
</div>
|
|
||||||
Certificate Templates
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -88,14 +61,15 @@ export const PkiManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive || location.pathname.match(/\/pki-collections\//)
|
||||||
<FontAwesomeIcon icon={faCertificate} />
|
? "selected"
|
||||||
</div>
|
: ""
|
||||||
|
}
|
||||||
|
>
|
||||||
Certificates
|
Certificates
|
||||||
</div>
|
</Tab>
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -105,14 +79,9 @@ export const PkiManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive || location.pathname.match(/\/ca\//) ? "selected" : ""}>
|
||||||
<div className="mx-1 flex gap-2">
|
Certificate Authorities
|
||||||
<div className="w-6">
|
</Tab>
|
||||||
<FontAwesomeIcon icon={faStamp} />
|
|
||||||
</div>
|
|
||||||
Certificates Authority
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -121,16 +90,7 @@ export const PkiManagerLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Alerting</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBell} />
|
|
||||||
</div>
|
|
||||||
Alerting
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/cert-management/$projectId/integrations"
|
to="/projects/cert-management/$projectId/integrations"
|
||||||
@@ -138,16 +98,7 @@ export const PkiManagerLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Integrations</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faPuzzlePiece} />
|
|
||||||
</div>
|
|
||||||
Integrations
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/cert-management/$projectId/app-connections"
|
to="/projects/cert-management/$projectId/app-connections"
|
||||||
@@ -156,33 +107,7 @@ export const PkiManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>App Connections</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faPlug} />
|
|
||||||
</div>
|
|
||||||
App Connections
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
<Link
|
|
||||||
to="/projects/cert-management/$projectId/access-management"
|
|
||||||
params={{
|
|
||||||
projectId: currentProject.id
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
|
||||||
</div>
|
|
||||||
Project Access
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -190,16 +115,26 @@ export const PkiManagerLayout = () => {
|
|||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
|
>
|
||||||
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/projects/cert-management/$projectId/access-management"
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faBook} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Audit Logs
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
>
|
||||||
|
Access Control
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -208,42 +143,16 @@ export const PkiManagerLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
|
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
|
||||||
|
|||||||
+2
-2
@@ -15,7 +15,7 @@ export const AssumePrivilegeModeBanner = () => {
|
|||||||
if (!assumedPrivilegeDetails) return null;
|
if (!assumedPrivilegeDetails) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="z-10 -mx-4 flex items-center justify-center gap-2 rounded-sm border border-mineshaft-600 bg-primary-400 p-2 text-mineshaft-800 shadow-sm">
|
<div className="flex w-full items-center border-b border-yellow/50 bg-yellow/30 px-4 py-2 text-sm text-yellow-200">
|
||||||
<div>
|
<div>
|
||||||
<FontAwesomeIcon icon={faInfoCircle} className="mr-2" />
|
<FontAwesomeIcon icon={faInfoCircle} className="mr-2" />
|
||||||
You are currently viewing the project with privileges of{" "}
|
You are currently viewing the project with privileges of{" "}
|
||||||
@@ -24,7 +24,7 @@ export const AssumePrivilegeModeBanner = () => {
|
|||||||
{assumedPrivilegeDetails?.actorName}
|
{assumedPrivilegeDetails?.actorName}
|
||||||
</b>
|
</b>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="ml-auto">
|
||||||
<Button
|
<Button
|
||||||
size="xs"
|
size="xs"
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
|
|||||||
@@ -99,26 +99,21 @@ export const ProjectSelect = () => {
|
|||||||
}, [projects, projectFavorites, currentWorkspace]);
|
}, [projects, projectFavorites, currentWorkspace]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="-mr-2 flex w-full items-center gap-1">
|
<div className="mr-2 flex items-center gap-1 overflow-hidden">
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<Link
|
<Link
|
||||||
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
|
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
|
||||||
params={{
|
params={{
|
||||||
projectId: currentWorkspace.id
|
projectId: currentWorkspace.id
|
||||||
}}
|
}}
|
||||||
|
className="overflow-hidden"
|
||||||
>
|
>
|
||||||
<div className="relative flex cursor-pointer items-center gap-2 text-sm text-white duration-100 hover:text-primary">
|
|
||||||
<Tooltip content={currentWorkspace.name} className="max-w-96 break-words">
|
<Tooltip content={currentWorkspace.name} className="max-w-96 break-words">
|
||||||
<Badge
|
<Badge variant="project" className="max-w-full min-w-0 text-sm">
|
||||||
variant="project"
|
|
||||||
className="max-w-44 overflow-hidden text-sm text-ellipsis whitespace-nowrap"
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faCube} />
|
<FontAwesomeIcon icon={faCube} />
|
||||||
|
<p className="truncate">{currentWorkspace?.name}</p>
|
||||||
{currentWorkspace?.name}
|
|
||||||
</Badge>
|
</Badge>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
|
||||||
</Link>
|
</Link>
|
||||||
<DropdownMenuTrigger asChild>
|
<DropdownMenuTrigger asChild>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1,21 +1,10 @@
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import { faArrowLeft, faGlobe, faMobile } from "@fortawesome/free-solid-svg-icons";
|
||||||
faArrowsSpin,
|
|
||||||
faBook,
|
|
||||||
faCheckToSlot,
|
|
||||||
faCog,
|
|
||||||
faHome,
|
|
||||||
faMobile,
|
|
||||||
faPlug,
|
|
||||||
faPuzzlePiece,
|
|
||||||
faUsers,
|
|
||||||
faVault
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
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 { Badge, Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Badge, Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import { useProject, useProjectPermission } from "@app/context";
|
import { useProject, useProjectPermission } from "@app/context";
|
||||||
import {
|
import {
|
||||||
useGetAccessRequestsCount,
|
useGetAccessRequestsCount,
|
||||||
@@ -28,10 +17,10 @@ import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePri
|
|||||||
export const SecretManagerLayout = () => {
|
export const SecretManagerLayout = () => {
|
||||||
const { currentProject, projectId } = useProject();
|
const { currentProject, projectId } = useProject();
|
||||||
const { assumedPrivilegeDetails } = useProjectPermission();
|
const { assumedPrivilegeDetails } = useProjectPermission();
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const projectSlug = currentProject?.slug || "";
|
const projectSlug = currentProject?.slug || "";
|
||||||
const location = useLocation();
|
|
||||||
|
|
||||||
const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({
|
const { data: secretApprovalReqCount } = useGetSecretApprovalRequestCount({
|
||||||
projectId
|
projectId
|
||||||
@@ -54,23 +43,24 @@ export const SecretManagerLayout = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="vault" />
|
<TabList className="border-b-0">
|
||||||
Secrets Manager
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-management/$projectId/overview"
|
to="/projects/secret-management/$projectId/overview"
|
||||||
params={{
|
params={{
|
||||||
@@ -81,22 +71,15 @@ export const SecretManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem
|
<Tab
|
||||||
variant="project"
|
value={
|
||||||
isSelected={
|
isActive || location.pathname.match(/\/secrets\/|\/commits\//)
|
||||||
isActive ||
|
? "selected"
|
||||||
location.pathname.startsWith(
|
: ""
|
||||||
`/projects/secret-management/${currentProject.id}/overview`
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div className="mx-1 flex gap-2">
|
Overview
|
||||||
<div className="w-6">
|
</Tab>
|
||||||
<FontAwesomeIcon icon={faVault} />
|
|
||||||
</div>
|
|
||||||
Secrets
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -105,16 +88,7 @@ export const SecretManagerLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Integrations</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faPuzzlePiece} />
|
|
||||||
</div>
|
|
||||||
Integrations
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
{Boolean(secretRotations?.length) && (
|
{Boolean(secretRotations?.length) && (
|
||||||
<Link
|
<Link
|
||||||
@@ -124,42 +98,10 @@ export const SecretManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>Secret Rotations</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faArrowsSpin} />
|
|
||||||
</div>
|
|
||||||
Secret Rotations
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
<Link
|
|
||||||
to="/projects/secret-management/$projectId/approval"
|
|
||||||
params={{
|
|
||||||
projectId: currentProject.id
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{({ isActive }) => (
|
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCheckToSlot} />
|
|
||||||
</div>
|
|
||||||
Approvals
|
|
||||||
{Boolean(
|
|
||||||
secretApprovalReqCount?.open ||
|
|
||||||
accessApprovalRequestCount?.pendingCount
|
|
||||||
) && (
|
|
||||||
<Badge variant="primary" className="ml-1.5">
|
|
||||||
{pendingRequestsCount}
|
|
||||||
</Badge>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-management/$projectId/app-connections"
|
to="/projects/secret-management/$projectId/app-connections"
|
||||||
params={{
|
params={{
|
||||||
@@ -167,33 +109,26 @@ export const SecretManagerLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>App Connections</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faPlug} />
|
|
||||||
</div>
|
|
||||||
App Connections
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-management/$projectId/access-management"
|
to="/projects/secret-management/$projectId/approval"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>
|
||||||
<div className="mx-1 flex gap-2">
|
Approvals
|
||||||
<div className="w-6">
|
{Boolean(
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
secretApprovalReqCount?.open || accessApprovalRequestCount?.pendingCount
|
||||||
</div>
|
) && (
|
||||||
Project Access
|
<Badge variant="primary" className="ml-1.5">
|
||||||
</div>
|
{pendingRequestsCount}
|
||||||
</MenuItem>
|
</Badge>
|
||||||
|
)}
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -201,16 +136,26 @@ export const SecretManagerLayout = () => {
|
|||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
|
>
|
||||||
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
|
</Link>
|
||||||
|
<Link
|
||||||
|
to="/projects/secret-management/$projectId/access-management"
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faBook} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Audit Logs
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
>
|
||||||
|
Access Control
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -219,43 +164,16 @@ export const SecretManagerLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
variant="project"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
|
<div className="z-200 flex h-screen w-screen flex-col items-center justify-center bg-bunker-800 md:hidden">
|
||||||
|
|||||||
@@ -1,17 +1,9 @@
|
|||||||
import {
|
import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
|
||||||
faBook,
|
|
||||||
faCog,
|
|
||||||
faDatabase,
|
|
||||||
faHome,
|
|
||||||
faMagnifyingGlass,
|
|
||||||
faPlug,
|
|
||||||
faUsers
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { Badge, Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Badge, Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import {
|
import {
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
useProject,
|
useProject,
|
||||||
@@ -29,6 +21,7 @@ export const SecretScanningLayout = () => {
|
|||||||
|
|
||||||
const { permission } = useProjectPermission();
|
const { permission } = useProjectPermission();
|
||||||
const { subscription } = useSubscription();
|
const { subscription } = useSubscription();
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
const { data: unresolvedFindings } = useGetSecretScanningUnresolvedFindingCount(
|
const { data: unresolvedFindings } = useGetSecretScanningUnresolvedFindingCount(
|
||||||
currentProject.id,
|
currentProject.id,
|
||||||
@@ -45,39 +38,31 @@ export const SecretScanningLayout = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="secret-scan" />
|
<TabList className="border-b-0">
|
||||||
Secret Scanning
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-scanning/$projectId/data-sources"
|
to="/projects/secret-scanning/$projectId/data-sources"
|
||||||
params={{
|
params={{
|
||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Data Sources</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faDatabase} />
|
|
||||||
</div>
|
|
||||||
Data Sources
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-scanning/$projectId/findings"
|
to="/projects/secret-scanning/$projectId/findings"
|
||||||
@@ -86,19 +71,14 @@ export const SecretScanningLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab value={isActive ? "selected" : ""}>
|
||||||
<div className="mx-1 flex w-full gap-2">
|
Findings
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faMagnifyingGlass} />
|
|
||||||
</div>
|
|
||||||
<span>Findings</span>
|
|
||||||
{Boolean(unresolvedFindings) && (
|
{Boolean(unresolvedFindings) && (
|
||||||
<Badge variant="primary" className="mr-2 ml-auto h-min">
|
<Badge variant="primary" className="ml-2 h-min">
|
||||||
{unresolvedFindings}
|
{unresolvedFindings}
|
||||||
</Badge>
|
</Badge>
|
||||||
)}
|
)}
|
||||||
</div>
|
</Tab>
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -107,19 +87,17 @@ export const SecretScanningLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>App Connections</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
</Link>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
<Link
|
||||||
<FontAwesomeIcon icon={faPlug} />
|
to="/projects/secret-scanning/$projectId/audit-logs"
|
||||||
</div>
|
params={{
|
||||||
App Connections
|
projectId: currentProject.id
|
||||||
</div>
|
}}
|
||||||
</MenuItem>
|
>
|
||||||
)}
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
|
||||||
<MenuGroup title="Others">
|
|
||||||
<Link
|
<Link
|
||||||
to="/projects/secret-scanning/$projectId/access-management"
|
to="/projects/secret-scanning/$projectId/access-management"
|
||||||
params={{
|
params={{
|
||||||
@@ -127,31 +105,16 @@ export const SecretScanningLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Project Access
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link
|
|
||||||
to="/projects/secret-scanning/$projectId/audit-logs"
|
|
||||||
params={{
|
|
||||||
projectId: currentProject.id
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
Access Control
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBook} />
|
|
||||||
</div>
|
|
||||||
Audit Logs
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -160,43 +123,16 @@ export const SecretScanningLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
variant="project"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,17 +1,10 @@
|
|||||||
import {
|
import { faArrowLeft, faGlobe } from "@fortawesome/free-solid-svg-icons";
|
||||||
faBook,
|
|
||||||
faCog,
|
|
||||||
faHome,
|
|
||||||
faServer,
|
|
||||||
faStamp,
|
|
||||||
faUsers
|
|
||||||
} from "@fortawesome/free-solid-svg-icons";
|
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { Link, Outlet } from "@tanstack/react-router";
|
import { Link, Outlet, useLocation } from "@tanstack/react-router";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Lottie, Menu, MenuGroup, MenuItem } from "@app/components/v2";
|
import { Tab, TabList, Tabs } from "@app/components/v2";
|
||||||
import {
|
import {
|
||||||
ProjectPermissionActions,
|
ProjectPermissionActions,
|
||||||
ProjectPermissionSub,
|
ProjectPermissionSub,
|
||||||
@@ -24,26 +17,28 @@ import { AssumePrivilegeModeBanner } from "../ProjectLayout/components/AssumePri
|
|||||||
export const SshLayout = () => {
|
export const SshLayout = () => {
|
||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
const { assumedPrivilegeDetails } = useProjectPermission();
|
const { assumedPrivilegeDetails } = useProjectPermission();
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
<div className="dark hidden h-full w-full flex-col overflow-x-hidden md:flex">
|
||||||
<div className="flex grow flex-col overflow-y-hidden md:flex-row">
|
<div className="border-b border-mineshaft-600 bg-mineshaft-900">
|
||||||
<motion.div
|
<motion.div
|
||||||
key="menu-project-items"
|
key="menu-project-items"
|
||||||
initial={{ x: -150 }}
|
initial={{ x: -150 }}
|
||||||
animate={{ x: 0 }}
|
animate={{ x: 0 }}
|
||||||
exit={{ x: -150 }}
|
exit={{ x: -150 }}
|
||||||
transition={{ duration: 0.2 }}
|
transition={{ duration: 0.2 }}
|
||||||
className="dark w-full border-r border-mineshaft-600 bg-linear-to-tr from-mineshaft-700 via-mineshaft-800 to-mineshaft-900 md:w-60"
|
className="px-4"
|
||||||
>
|
>
|
||||||
<nav className="items-between flex h-full flex-col overflow-y-auto dark:scheme-dark">
|
<nav className="w-full">
|
||||||
<div className="flex items-center gap-3 border-b border-mineshaft-600 px-4 py-3.5 text-lg text-white">
|
<Tabs value="selected">
|
||||||
<Lottie className="inline-block h-5 w-5 shrink-0" icon="terminal" />
|
<TabList className="border-b-0">
|
||||||
SSH
|
<Link to="/organization/projects">
|
||||||
</div>
|
<Tab value="back" className="flex gap-x-2">
|
||||||
<div className="flex-1">
|
<FontAwesomeIcon icon={faGlobe} />
|
||||||
<Menu>
|
<FontAwesomeIcon icon={faArrowLeft} />
|
||||||
<MenuGroup title="Resources">
|
</Tab>
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/ssh/$projectId/overview"
|
to="/projects/ssh/$projectId/overview"
|
||||||
params={{
|
params={{
|
||||||
@@ -51,14 +46,13 @@ export const SshLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive || location.pathname.match(/\/ssh-host-groups\//) ? "selected" : ""
|
||||||
<FontAwesomeIcon icon={faServer} />
|
}
|
||||||
</div>
|
>
|
||||||
Hosts
|
Hosts
|
||||||
</div>
|
</Tab>
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<ProjectPermissionCan
|
<ProjectPermissionCan
|
||||||
@@ -74,22 +68,24 @@ export const SshLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={isActive || location.pathname.match(/\/ca\//) ? "selected" : ""}
|
||||||
<div className="w-6">
|
>
|
||||||
<FontAwesomeIcon icon={faStamp} />
|
Certificate Authorities
|
||||||
</div>
|
</Tab>
|
||||||
Certificates Authority
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</ProjectPermissionCan>
|
</ProjectPermissionCan>
|
||||||
</MenuGroup>
|
<Link
|
||||||
|
to="/projects/ssh/$projectId/audit-logs"
|
||||||
<MenuGroup title="Others">
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Audit Logs</Tab>}
|
||||||
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
to="/projects/ssh/$projectId/access-management"
|
to="/projects/ssh/$projectId/access-management"
|
||||||
params={{
|
params={{
|
||||||
@@ -97,31 +93,16 @@ export const SshLayout = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => (
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
<Tab
|
||||||
<div className="mx-1 flex gap-2">
|
value={
|
||||||
<div className="w-6">
|
isActive ||
|
||||||
<FontAwesomeIcon icon={faUsers} />
|
location.pathname.match(/\/groups\/|\/identities\/|\/members\/|\/roles\//)
|
||||||
</div>
|
? "selected"
|
||||||
Project Access
|
: ""
|
||||||
</div>
|
}
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
|
||||||
<Link
|
|
||||||
to="/projects/ssh/$projectId/audit-logs"
|
|
||||||
params={{
|
|
||||||
projectId: currentProject.id
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
Access Control
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
</Tab>
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faBook} />
|
|
||||||
</div>
|
|
||||||
Audit Logs
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
)}
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
@@ -130,43 +111,16 @@ export const SshLayout = () => {
|
|||||||
projectId: currentProject.id
|
projectId: currentProject.id
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isActive }) => (
|
{({ isActive }) => <Tab value={isActive ? "selected" : ""}>Settings</Tab>}
|
||||||
<MenuItem variant="project" isSelected={isActive}>
|
|
||||||
<div className="mx-1 flex gap-2">
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon icon={faCog} />
|
|
||||||
</div>
|
|
||||||
Project Settings
|
|
||||||
</div>
|
|
||||||
</MenuItem>
|
|
||||||
)}
|
|
||||||
</Link>
|
</Link>
|
||||||
</MenuGroup>
|
</TabList>
|
||||||
</Menu>
|
</Tabs>
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<Menu>
|
|
||||||
<Link to="/organization/projects">
|
|
||||||
<MenuItem
|
|
||||||
variant="project"
|
|
||||||
className="relative flex items-center gap-2 overflow-hidden text-sm text-mineshaft-400 hover:text-mineshaft-300"
|
|
||||||
leftIcon={
|
|
||||||
<div className="w-6">
|
|
||||||
<FontAwesomeIcon className="mx-1 inline-block shrink-0" icon={faHome} />
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Organization Home
|
|
||||||
</MenuItem>
|
|
||||||
</Link>
|
|
||||||
</Menu>
|
|
||||||
</div>
|
|
||||||
</nav>
|
</nav>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 p-4 pt-8">
|
|
||||||
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
|
||||||
<Outlet />
|
|
||||||
</div>
|
</div>
|
||||||
|
{assumedPrivilegeDetails && <AssumePrivilegeModeBanner />}
|
||||||
|
<div className="flex-1 overflow-x-hidden overflow-y-auto bg-bunker-800 px-12 pt-10 pb-4">
|
||||||
|
<Outlet />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const AccessManagementPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Access Control" })}</title>
|
<title>{t("common.head-title", { title: "Access Control" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Access Control"
|
title="Access Control"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const AuthenticationPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Authentication"
|
title="Authentication"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const CachingPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Caching"
|
title="Caching"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const EncryptionPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Encryption"
|
title="Encryption"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const EnvironmentPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Environment Variables"
|
title="Environment Variables"
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export const GeneralPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="General"
|
title="General"
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const IntegrationsPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Admin" })}</title>
|
<title>{t("common.head-title", { title: "Admin" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Integrations"
|
title="Integrations"
|
||||||
|
|||||||
@@ -13,18 +13,24 @@ export const ResourceOverviewPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Resource Overview" })}</title>
|
<title>{t("common.head-title", { title: "Resource Overview" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="instance"
|
scope="instance"
|
||||||
title="Resource Overview"
|
title="Resource Overview"
|
||||||
description="Manage resources within your Infisical instance."
|
description="Manage resources within your Infisical instance."
|
||||||
/>
|
/>
|
||||||
<Tabs defaultValue="tab-organizations">
|
<Tabs orientation="vertical" defaultValue="tab-organizations">
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value="tab-organizations">Organizations</Tab>
|
<Tab variant="instance" value="tab-organizations">
|
||||||
<Tab value="tab-users">Users</Tab>
|
Organizations
|
||||||
<Tab value="tab-identities">Identities</Tab>
|
</Tab>
|
||||||
|
<Tab variant="instance" value="tab-users">
|
||||||
|
Users
|
||||||
|
</Tab>
|
||||||
|
<Tab variant="instance" value="tab-identities">
|
||||||
|
Identities
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value="tab-organizations">
|
<TabPanel value="tab-organizations">
|
||||||
<OrganizationsTable />
|
<OrganizationsTable />
|
||||||
|
|||||||
@@ -10,11 +10,11 @@ import { PkiAlertsSection } from "./components";
|
|||||||
export const AlertingPage = () => {
|
export const AlertingPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Alerting" })}</title>
|
<title>{t("common.head-title", { title: "Alerting" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Alerting"
|
title="Alerting"
|
||||||
|
|||||||
+16
-4
@@ -1,5 +1,7 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -84,10 +86,20 @@ const Page = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title={data.name}>
|
<Link
|
||||||
|
to="/projects/cert-management/$projectId/certificate-authorities"
|
||||||
|
params={{
|
||||||
|
projectId
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Certificate Authorities
|
||||||
|
</Link>
|
||||||
|
<PageHeader scope="project" description="Manage certificate authority" title={data.name}>
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild className="rounded-lg">
|
<DropdownMenuTrigger asChild className="rounded-lg">
|
||||||
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
||||||
|
|||||||
+2
-2
@@ -11,11 +11,11 @@ import { CaSection } from "./components";
|
|||||||
export const CertificateAuthoritiesPage = () => {
|
export const CertificateAuthoritiesPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Certificate Authorities" })}</title>
|
<title>{t("common.head-title", { title: "Certificate Authorities" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Certificate Authorities"
|
title="Certificate Authorities"
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ export const CertificatesPage = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex h-full flex-col justify-between bg-bunker-800 text-white">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "Certificates" })}</title>
|
<title>{t("common.head-title", { title: "Certificates" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Certificates"
|
title="Certificates"
|
||||||
|
|||||||
@@ -42,16 +42,18 @@ export const IntegrationsListPage = () => {
|
|||||||
<meta property="og:title" content="Manage your certificates in seconds" />
|
<meta property="og:title" content="Manage your certificates in seconds" />
|
||||||
<meta name="og:description" content="Sync and manage PKI certificates across services" />
|
<meta name="og:description" content="Sync and manage PKI certificates across services" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="relative container mx-auto max-w-7xl pb-12 text-white">
|
<div className="relative mx-auto max-w-8xl pb-12 text-white">
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Integrations"
|
title="Integrations"
|
||||||
description="Manage integrations with third-party certificate services."
|
description="Manage integrations with third-party certificate services."
|
||||||
/>
|
/>
|
||||||
<Tabs value={currentTab} onValueChange={updateSelectedTab}>
|
<Tabs orientation="vertical" value={currentTab} onValueChange={updateSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={IntegrationsListPageTabs.PkiSyncs}>Certificate Syncs</Tab>
|
<Tab variant="project" value={IntegrationsListPageTabs.PkiSyncs}>
|
||||||
|
Certificate Syncs
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={IntegrationsListPageTabs.PkiSyncs}>
|
<TabPanel value={IntegrationsListPageTabs.PkiSyncs}>
|
||||||
<ProjectPermissionCan
|
<ProjectPermissionCan
|
||||||
|
|||||||
+16
-4
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -70,10 +72,20 @@ export const PkiCollectionPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title={data.name}>
|
<Link
|
||||||
|
to="/projects/cert-management/$projectId/certificates"
|
||||||
|
params={{
|
||||||
|
projectId
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Certificates
|
||||||
|
</Link>
|
||||||
|
<PageHeader scope="project" title={data.name} description="Manage certificate collection">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild className="rounded-lg">
|
<DropdownMenuTrigger asChild className="rounded-lg">
|
||||||
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
||||||
|
|||||||
+16
-4
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -75,10 +77,20 @@ const Page = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title={data.name}>
|
<Link
|
||||||
|
to="/projects/cert-management/$projectId/subscribers"
|
||||||
|
params={{
|
||||||
|
projectId
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Subscribers
|
||||||
|
</Link>
|
||||||
|
<PageHeader scope="project" title={data.name} description="Manage PKI subscriber">
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild className="rounded-lg">
|
<DropdownMenuTrigger asChild className="rounded-lg">
|
||||||
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ export const PkiSubscribersPage = () => {
|
|||||||
<title>{t("common.head-title", { title: "PKI Subscribers" })}</title>
|
<title>{t("common.head-title", { title: "PKI Subscribers" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="h-full bg-bunker-800">
|
<div className="h-full bg-bunker-800">
|
||||||
<div className="container mx-auto flex flex-col justify-between text-white">
|
<div className="mx-auto flex flex-col justify-between text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Subscribers"
|
title="Subscribers"
|
||||||
|
|||||||
@@ -68,8 +68,8 @@ const PageContent = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 font-inter text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<Button
|
<Button
|
||||||
variant="link"
|
variant="link"
|
||||||
type="submit"
|
type="submit"
|
||||||
|
|||||||
@@ -103,15 +103,15 @@ export const PkiTemplateListPage = () => {
|
|||||||
<title>{t("common.head-title", { title: "PKI Templates" })}</title>
|
<title>{t("common.head-title", { title: "PKI Templates" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="h-full bg-bunker-800">
|
<div className="h-full bg-bunker-800">
|
||||||
<div className="container mx-auto flex flex-col justify-between text-white">
|
<div className="mx-auto flex flex-col justify-between text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Certificate Templates"
|
title="Certificate Templates"
|
||||||
description="Manage certificate template to request and issue dynamic certificates following a strict format."
|
description="Manage certificate template to request and issue dynamic certificates following a strict format."
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="container mx-auto mb-6 max-w-7xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
<div className="container mx-auto mb-6 max-w-8xl rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
<div className="mb-4 flex justify-between">
|
<div className="mb-4 flex justify-between">
|
||||||
<p className="text-xl font-medium text-mineshaft-100">Templates</p>
|
<p className="text-xl font-medium text-mineshaft-100">Templates</p>
|
||||||
<div className="flex w-full justify-end">
|
<div className="flex w-full justify-end">
|
||||||
@@ -267,7 +267,7 @@ export const PkiTemplateListPage = () => {
|
|||||||
onDeleteApproved={() => onRemovePkiSubscriberSubmit()}
|
onDeleteApproved={() => onRemovePkiSubscriberSubmit()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="container mx-auto max-w-7xl" />
|
<div className="container mx-auto max-w-8xl" />
|
||||||
</div>
|
</div>
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={popUp?.certificateTemplate?.isOpen}
|
isOpen={popUp?.certificateTemplate?.isOpen}
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ export const SettingsPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title={t("settings.project.title")} />
|
<PageHeader scope="project" title={t("settings.project.title")} />
|
||||||
<Tabs defaultValue={tabs[0].key}>
|
<Tabs orientation="vertical" defaultValue={tabs[0].key}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Tab value={tab.key} key={tab.key}>
|
<Tab value={tab.key} variant="project" key={tab.key}>
|
||||||
{tab.name}
|
{tab.name}
|
||||||
</Tab>
|
</Tab>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export const KmipPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "KMS" })}</title>
|
<title>{t("common.head-title", { title: "KMS" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="KMIP"
|
title="KMIP"
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ export const OverviewPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: "KMS" })}</title>
|
<title>{t("common.head-title", { title: "KMS" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Overview"
|
title="Overview"
|
||||||
|
|||||||
@@ -20,12 +20,16 @@ export const SettingsPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title="Settings" />
|
<PageHeader
|
||||||
<Tabs defaultValue={tabs[0].key}>
|
scope="project"
|
||||||
|
title="Settings"
|
||||||
|
description="Configure general project settings"
|
||||||
|
/>
|
||||||
|
<Tabs orientation="vertical" defaultValue={tabs[0].key}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Tab value={tab.key} key={tab.key}>
|
<Tab variant="project" value={tab.key} key={tab.key}>
|
||||||
{tab.name}
|
{tab.name}
|
||||||
</Tab>
|
</Tab>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -76,11 +76,11 @@ export const AccessManagementPage = () => {
|
|||||||
const hasNoAccess = tabSections.every((tab) => tab.isHidden);
|
const hasNoAccess = tabSections.every((tab) => tab.isHidden);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title="Access Control"
|
title="Access Control"
|
||||||
@@ -111,7 +111,7 @@ export const AccessManagementPage = () => {
|
|||||||
isOpen={isUpgradePrivilegeSystemModalOpen}
|
isOpen={isUpgradePrivilegeSystemModalOpen}
|
||||||
onOpenChange={setIsUpgradePrivilegeSystemModalOpen}
|
onOpenChange={setIsUpgradePrivilegeSystemModalOpen}
|
||||||
/>
|
/>
|
||||||
<Tabs value={selectedTab} onValueChange={updateSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabSections
|
{tabSections
|
||||||
.filter((el) => !el.isHidden)
|
.filter((el) => !el.isHidden)
|
||||||
|
|||||||
+1
-13
@@ -1,17 +1,5 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { OrgGroupsSection } from "./components";
|
import { OrgGroupsSection } from "./components";
|
||||||
|
|
||||||
export const OrgGroupsTab = () => {
|
export const OrgGroupsTab = () => {
|
||||||
return (
|
return <OrgGroupsSection />;
|
||||||
<motion.div
|
|
||||||
key="panel-org-groups"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<OrgGroupsSection />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-13
@@ -1,17 +1,5 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { IdentitySection } from "./components";
|
import { IdentitySection } from "./components";
|
||||||
|
|
||||||
export const OrgIdentityTab = () => {
|
export const OrgIdentityTab = () => {
|
||||||
return (
|
return <IdentitySection />;
|
||||||
<motion.div
|
|
||||||
key="panel-service-token"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<IdentitySection />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-13
@@ -1,17 +1,5 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { OrgMembersSection } from "./components";
|
import { OrgMembersSection } from "./components";
|
||||||
|
|
||||||
export const OrgMembersTab = () => {
|
export const OrgMembersTab = () => {
|
||||||
return (
|
return <OrgMembersSection />;
|
||||||
<motion.div
|
|
||||||
key="panel-org-members"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<OrgMembersSection />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-13
@@ -1,17 +1,5 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { OrgRoleTable } from "./OrgRoleTable";
|
import { OrgRoleTable } from "./OrgRoleTable";
|
||||||
|
|
||||||
export const OrgRoleTabSection = () => {
|
export const OrgRoleTabSection = () => {
|
||||||
return (
|
return <OrgRoleTable />;
|
||||||
<motion.div
|
|
||||||
key="role-list"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<OrgRoleTable />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ export const AppConnectionsPage = withPermission(
|
|||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ export const AuditLogsPage = () => {
|
|||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
<div className="flex w-full justify-center bg-bunker-800 pb-6 text-white">
|
||||||
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
<div className="w-full max-w-8xl">
|
||||||
<div className="w-full max-w-7xl">
|
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title="Audit Logs"
|
title="Audit Logs"
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const BillingPage = () => {
|
|||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title={t("billing.title")}
|
title={t("billing.title")}
|
||||||
|
|||||||
+5
-9
@@ -17,14 +17,14 @@ const tabs = [
|
|||||||
|
|
||||||
export const BillingTabGroup = withPermission(
|
export const BillingTabGroup = withPermission(
|
||||||
() => {
|
() => {
|
||||||
const tabsFiltered = isInfisicalCloud()
|
if (!isInfisicalCloud()) {
|
||||||
? tabs
|
return <BillingCloudTab />;
|
||||||
: [{ name: "Infisical Self-Hosted", key: "tab-infisical-cloud" }];
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs defaultValue={tabs[0].key}>
|
<Tabs orientation="vertical" defaultValue={tabs[0].key}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabsFiltered.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Tab variant="org" value={tab.key}>
|
<Tab variant="org" value={tab.key}>
|
||||||
{tab.name}
|
{tab.name}
|
||||||
</Tab>
|
</Tab>
|
||||||
@@ -33,8 +33,6 @@ export const BillingTabGroup = withPermission(
|
|||||||
<TabPanel value={tabs[0].key}>
|
<TabPanel value={tabs[0].key}>
|
||||||
<BillingCloudTab />
|
<BillingCloudTab />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
{isInfisicalCloud() && (
|
|
||||||
<>
|
|
||||||
<TabPanel value={tabs[1].key}>
|
<TabPanel value={tabs[1].key}>
|
||||||
<BillingSelfHostedTab />
|
<BillingSelfHostedTab />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
@@ -44,8 +42,6 @@ export const BillingTabGroup = withPermission(
|
|||||||
<TabPanel value={tabs[3].key}>
|
<TabPanel value={tabs[3].key}>
|
||||||
<BillingDetailsTab />
|
<BillingDetailsTab />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
@@ -80,10 +82,20 @@ const Page = () => {
|
|||||||
if (isPending) return <Spinner size="sm" className="mt-2 ml-2" />;
|
if (isPending) return <Spinner size="sm" className="mt-2 ml-2" />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<PageHeader scope="org" title={data.group.name}>
|
<Link
|
||||||
|
to="/organization/access-management"
|
||||||
|
search={{
|
||||||
|
selectedTab: TabSections.Groups
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Groups
|
||||||
|
</Link>
|
||||||
|
<PageHeader scope="org" description="Organization Group" title={data.group.name}>
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger asChild className="rounded-lg">
|
<DropdownMenuTrigger asChild className="rounded-lg">
|
||||||
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
<div className="hover:text-primary-400 data-[state=open]:text-primary-400">
|
||||||
|
|||||||
+17
-4
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } 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";
|
||||||
@@ -10,6 +12,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
|
|||||||
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
|
import { OrgPermissionIdentityActions, OrgPermissionSubjects, useOrganization } from "@app/context";
|
||||||
import { useDeleteIdentity, useGetIdentityById } from "@app/hooks/api";
|
import { useDeleteIdentity, useGetIdentityById } from "@app/hooks/api";
|
||||||
import { usePopUp } from "@app/hooks/usePopUp";
|
import { usePopUp } from "@app/hooks/usePopUp";
|
||||||
|
import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
|
||||||
import { ViewIdentityAuthModal } from "@app/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityAuthModal";
|
import { ViewIdentityAuthModal } from "@app/pages/organization/IdentityDetailsByIDPage/components/ViewIdentityAuthModal/ViewIdentityAuthModal";
|
||||||
import { OrgAccessControlTabSections } from "@app/types/org";
|
import { OrgAccessControlTabSections } from "@app/types/org";
|
||||||
|
|
||||||
@@ -72,10 +75,20 @@ const Page = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
<PageHeader scope="org" title={data.identity.name} />
|
<Link
|
||||||
|
to="/organization/access-management"
|
||||||
|
search={{
|
||||||
|
selectedTab: TabSections.Identities
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Identities
|
||||||
|
</Link>
|
||||||
|
<PageHeader scope="org" description="Organization Identity" title={data.identity.name} />
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="mr-4 w-96">
|
<div className="mr-4 w-96">
|
||||||
<IdentityDetailsSection identityId={identityId} handlePopUpOpen={handlePopUpOpen} />
|
<IdentityDetailsSection identityId={identityId} handlePopUpOpen={handlePopUpOpen} />
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export const NetworkingPage = () => {
|
|||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title="Networking"
|
title="Networking"
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ export const NetworkingTabGroup = () => {
|
|||||||
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
|
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs value={selectedTab} onValueChange={setSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={setSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Tab variant="org" value={tab.key} key={tab.key}>
|
<Tab variant="org" value={tab.key} key={tab.key}>
|
||||||
|
|||||||
@@ -58,18 +58,16 @@ export const ProjectsPage = () => {
|
|||||||
: true;
|
: true;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex max-w-7xl flex-col justify-start bg-bunker-800">
|
<div className="mx-auto flex max-w-8xl flex-col justify-start bg-bunker-800">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: t("settings.members.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.members.title") })}</title>
|
||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mb-4 flex flex-col items-start justify-start">
|
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title="Overview"
|
title="Overview"
|
||||||
description="Your team's complete security toolkit - organized and ready when you need them."
|
description="Your team's complete security toolkit - organized and ready when you need them."
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
{projectListView === ProjectListView.MyProjects ? (
|
{projectListView === ProjectListView.MyProjects ? (
|
||||||
<MyProjectView
|
<MyProjectView
|
||||||
onAddNewProject={() => handlePopUpOpen("addNewWs")}
|
onAddNewProject={() => handlePopUpOpen("addNewWs")}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { faCopy, faEllipsisV } from "@fortawesome/free-solid-svg-icons";
|
import { faChevronLeft, faCopy, faEllipsisV } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { OrgPermissionCan } from "@app/components/permissions";
|
import { OrgPermissionCan } from "@app/components/permissions";
|
||||||
@@ -19,6 +19,7 @@ import { ROUTE_PATHS } from "@app/const/routes";
|
|||||||
import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@app/context";
|
import { OrgPermissionActions, OrgPermissionSubjects, useOrganization } from "@app/context";
|
||||||
import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api";
|
import { useDeleteOrgRole, useGetOrgRole } from "@app/hooks/api";
|
||||||
import { usePopUp } from "@app/hooks/usePopUp";
|
import { usePopUp } from "@app/hooks/usePopUp";
|
||||||
|
import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
|
||||||
import { DuplicateOrgRoleModal } from "@app/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal";
|
import { DuplicateOrgRoleModal } from "@app/pages/organization/RoleByIDPage/components/DuplicateOrgRoleModal";
|
||||||
import { OrgAccessControlTabSections } from "@app/types/org";
|
import { OrgAccessControlTabSections } from "@app/types/org";
|
||||||
|
|
||||||
@@ -77,20 +78,26 @@ export const Page = () => {
|
|||||||
const isCustomRole = !["admin", "member", "no-access"].includes(data?.slug ?? "");
|
const isCustomRole = !["admin", "member", "no-access"].includes(data?.slug ?? "");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
|
<Link
|
||||||
|
to="/organization/access-management"
|
||||||
|
search={{
|
||||||
|
selectedTab: TabSections.Roles
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Roles
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title={
|
title={data.name}
|
||||||
<div className="flex flex-col">
|
description={
|
||||||
<div>
|
<>
|
||||||
<span>{data.name}</span>
|
|
||||||
<p className="text-sm leading-3 font-normal text-mineshaft-400 normal-case">
|
|
||||||
{data.slug} {data.description && `- ${data.description}`}
|
{data.slug} {data.description && `- ${data.description}`}
|
||||||
</p>
|
</>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{isCustomRole && (
|
{isCustomRole && (
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export const SecretSharingPage = () => {
|
|||||||
<meta name="og:description" content={String(t("approval.og-description"))} />
|
<meta name="og:description" content={String(t("approval.og-description"))} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="h-full">
|
<div className="h-full">
|
||||||
<div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 text-white">
|
<div className="mx-auto h-full w-full max-w-8xl bg-bunker-800 text-white">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title="Secret Sharing"
|
title="Secret Sharing"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { Badge, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
|
|
||||||
import { RequestSecretTab } from "./components/RequestSecret/RequestSecretTab";
|
import { RequestSecretTab } from "./components/RequestSecret/RequestSecretTab";
|
||||||
@@ -34,14 +34,13 @@ export const ShareSecretSection = () => {
|
|||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
||||||
<Tabs value={selectedTab} onValueChange={updateSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={SecretSharingPageTabs.ShareSecret}>Share Secrets</Tab>
|
<Tab variant="org" value={SecretSharingPageTabs.ShareSecret}>
|
||||||
<Tab value={SecretSharingPageTabs.RequestSecret}>
|
Share Secrets
|
||||||
|
</Tab>
|
||||||
|
<Tab variant="org" value={SecretSharingPageTabs.RequestSecret}>
|
||||||
Request Secrets
|
Request Secrets
|
||||||
<Badge variant="primary" className="ml-1 cursor-pointer text-xs">
|
|
||||||
New
|
|
||||||
</Badge>
|
|
||||||
</Tab>
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={SecretSharingPageTabs.ShareSecret}>
|
<TabPanel value={SecretSharingPageTabs.ShareSecret}>
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ export const SecretSharingSettingsPage = withPermission(
|
|||||||
<title>{t("common.head-title", { title: "Secret Share Settings" })}</title>
|
<title>{t("common.head-title", { title: "Secret Share Settings" })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader scope="org" title="Secret Share Settings" />
|
<PageHeader scope="org" title="Secret Share Settings" />
|
||||||
<SecretSharingSettingsTabGroup />
|
<SecretSharingSettingsTabGroup />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,8 +14,12 @@ export const SettingsPage = () => {
|
|||||||
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.org.title") })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader scope="org" title={t("settings.org.title")} />
|
<PageHeader
|
||||||
|
scope="org"
|
||||||
|
description="Configure organization-wide settings"
|
||||||
|
title={t("settings.org.title")}
|
||||||
|
/>
|
||||||
<OrgTabGroup />
|
<OrgTabGroup />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const OrgTabGroup = () => {
|
|||||||
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
|
const [selectedTab, setSelectedTab] = useState(search.selectedTab || tabs[0].key);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Tabs value={selectedTab} onValueChange={setSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={setSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
{tabs.map((tab) => (
|
{tabs.map((tab) => (
|
||||||
<Tab variant="org" value={tab.key} key={tab.key}>
|
<Tab variant="org" value={tab.key} key={tab.key}>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
@@ -30,6 +32,7 @@ import {
|
|||||||
useUpdateOrgMembership
|
useUpdateOrgMembership
|
||||||
} from "@app/hooks/api";
|
} from "@app/hooks/api";
|
||||||
import { usePopUp } from "@app/hooks/usePopUp";
|
import { usePopUp } from "@app/hooks/usePopUp";
|
||||||
|
import { TabSections } from "@app/pages/organization/GroupDetailsByIDPage/GroupDetailsByIDPage";
|
||||||
import { OrgAccessControlTabSections } from "@app/types/org";
|
import { OrgAccessControlTabSections } from "@app/types/org";
|
||||||
|
|
||||||
import { UserAuditLogsSection } from "./components/UserProjectsSection/UserAuditLogsSection";
|
import { UserAuditLogsSection } from "./components/UserProjectsSection/UserAuditLogsSection";
|
||||||
@@ -115,16 +118,30 @@ const Page = withPermission(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{membership && (
|
{membership && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto w-full max-w-8xl">
|
||||||
|
<Link
|
||||||
|
to="/organization/access-management"
|
||||||
|
search={{
|
||||||
|
selectedTab: TabSections.Member
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Users
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="org"
|
scope="org"
|
||||||
title={
|
title={
|
||||||
membership.user.firstName || membership.user.lastName
|
membership.user.firstName || membership.user.lastName
|
||||||
? `${membership.user.firstName} ${membership.user.lastName ?? ""}`.trim()
|
? `${membership.user.firstName} ${membership.user.lastName ?? ""}`.trim()
|
||||||
: "-"
|
: (membership.user.username ??
|
||||||
|
membership.user.email ??
|
||||||
|
membership.inviteEmail ??
|
||||||
|
"Unknown User")
|
||||||
}
|
}
|
||||||
|
description="Organization User Membership"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
{userId !== membership.user.id && (
|
{userId !== membership.user.id && (
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export const PamAccountsPage = () => {
|
|||||||
a={ProjectPermissionSub.PamAccounts}
|
a={ProjectPermissionSub.PamAccounts}
|
||||||
>
|
>
|
||||||
<div className="h-full bg-bunker-800">
|
<div className="h-full bg-bunker-800">
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Accounts"
|
title="Accounts"
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import { faFolderOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { useNavigate } from "@tanstack/react-router";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
path: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const FolderBreadCrumbs = ({ path = "/" }: Props) => {
|
||||||
|
const navigate = useNavigate({
|
||||||
|
from: "/projects/secret-management/$projectId/overview"
|
||||||
|
});
|
||||||
|
|
||||||
|
const onFolderCrumbClick = (index: number) => {
|
||||||
|
let newAccountPath = `/${path.split("/").filter(Boolean).slice(0, index).join("/")}`;
|
||||||
|
|
||||||
|
if (!newAccountPath.endsWith("/")) {
|
||||||
|
newAccountPath += "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (path === newAccountPath) return;
|
||||||
|
navigate({
|
||||||
|
search: (prev) => ({ ...prev, accountPath: newAccountPath })
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="flex items-center space-x-2">
|
||||||
|
<div
|
||||||
|
className="breadcrumb relative z-20 border-solid border-mineshaft-600 bg-mineshaft-800 py-1 pr-2 pl-5 text-sm hover:bg-mineshaft-600"
|
||||||
|
onClick={() => onFolderCrumbClick(0)}
|
||||||
|
onKeyDown={() => null}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faFolderOpen} className="text-primary-700" />
|
||||||
|
</div>
|
||||||
|
{(path || "")
|
||||||
|
.split("/")
|
||||||
|
.filter(Boolean)
|
||||||
|
.map((pathSegment, index, arr) => (
|
||||||
|
<div
|
||||||
|
key={`path-${index + 1}`}
|
||||||
|
className={`breadcrumb relative z-20 ${
|
||||||
|
index + 1 === arr.length ? "cursor-default" : "cursor-pointer"
|
||||||
|
} border-solid border-mineshaft-600 py-1 pr-2 pl-5 text-sm text-mineshaft-200`}
|
||||||
|
onClick={() => onFolderCrumbClick(index + 1)}
|
||||||
|
onKeyDown={() => null}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
>
|
||||||
|
{pathSegment}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -45,6 +45,7 @@ import { OrderByDirection } from "@app/hooks/api/generic/types";
|
|||||||
import { PAM_RESOURCE_TYPE_MAP, TPamAccount, TPamFolder } from "@app/hooks/api/pam";
|
import { PAM_RESOURCE_TYPE_MAP, TPamAccount, TPamFolder } from "@app/hooks/api/pam";
|
||||||
|
|
||||||
import { AccountView, AccountViewToggle } from "./AccountViewToggle";
|
import { AccountView, AccountViewToggle } from "./AccountViewToggle";
|
||||||
|
import { FolderBreadCrumbs } from "./FolderBreadCrumbs";
|
||||||
import { PamAccessAccountModal } from "./PamAccessAccountModal";
|
import { PamAccessAccountModal } from "./PamAccessAccountModal";
|
||||||
import { PamAccountRow } from "./PamAccountRow";
|
import { PamAccountRow } from "./PamAccountRow";
|
||||||
import { PamAddAccountModal } from "./PamAddAccountModal";
|
import { PamAddAccountModal } from "./PamAddAccountModal";
|
||||||
@@ -255,6 +256,7 @@ export const PamAccountsTable = ({ accounts, folders, projectId }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
{accountView === AccountView.Nested && <FolderBreadCrumbs path={accountPath} />}
|
||||||
<div className="mt-4 flex gap-2">
|
<div className="mt-4 flex gap-2">
|
||||||
<ProjectPermissionCan I={ProjectPermissionActions.Read} a={ProjectPermissionSub.PamFolders}>
|
<ProjectPermissionCan I={ProjectPermissionActions.Read} a={ProjectPermissionSub.PamFolders}>
|
||||||
{(isAllowed) =>
|
{(isAllowed) =>
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export const PamResourcesPage = () => {
|
|||||||
a={ProjectPermissionSub.PamResources}
|
a={ProjectPermissionSub.PamResources}
|
||||||
>
|
>
|
||||||
<div className="h-full bg-bunker-800">
|
<div className="h-full bg-bunker-800">
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Resources"
|
title="Resources"
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useParams } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { PageHeader } from "@app/components/v2";
|
import { PageHeader } from "@app/components/v2";
|
||||||
import { ROUTE_PATHS } from "@app/const/routes";
|
import { ROUTE_PATHS } from "@app/const/routes";
|
||||||
import { ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionSub, useProject } from "@app/context";
|
||||||
import { ProjectPermissionPamSessionActions } from "@app/context/ProjectPermissionContext/types";
|
import { ProjectPermissionPamSessionActions } from "@app/context/ProjectPermissionContext/types";
|
||||||
import { useGetPamSessionById } from "@app/hooks/api/pam";
|
import { useGetPamSessionById } from "@app/hooks/api/pam";
|
||||||
|
|
||||||
@@ -17,11 +19,21 @@ const Page = () => {
|
|||||||
select: (el) => el.sessionId
|
select: (el) => el.sessionId
|
||||||
});
|
});
|
||||||
const { data: session } = useGetPamSessionById(sessionId);
|
const { data: session } = useGetPamSessionById(sessionId);
|
||||||
|
const { currentProject } = useProject();
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{session && (
|
{session && (
|
||||||
<div className="mx-auto mb-6 flex w-full max-w-7xl flex-col">
|
<div className="mx-auto mb-6 flex w-full max-w-8xl flex-col">
|
||||||
|
<Link
|
||||||
|
to="/projects/pam/$projectId/sessions"
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Sessions
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title={`${session.accountName} Session`}
|
title={`${session.accountName} Session`}
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export const PamSessionPage = () => {
|
|||||||
a={ProjectPermissionSub.PamSessions}
|
a={ProjectPermissionSub.PamSessions}
|
||||||
>
|
>
|
||||||
<div className="h-full bg-bunker-800">
|
<div className="h-full bg-bunker-800">
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Sessions"
|
title="Sessions"
|
||||||
|
|||||||
@@ -12,11 +12,13 @@ export const SettingsPage = () => {
|
|||||||
<Helmet>
|
<Helmet>
|
||||||
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
<title>{t("common.head-title", { title: t("settings.project.title") })}</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title="Settings" description="Configure your PAM project." />
|
<PageHeader scope="project" title="Settings" description="Configure your PAM project." />
|
||||||
<Tabs defaultValue="tab-project-general">
|
<Tabs orientation="vertical" defaultValue="tab-project-general">
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value="tab-project-general">General</Tab>
|
<Tab variant="project" value="tab-project-general">
|
||||||
|
General
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value="tab-project-general">
|
<TabPanel value="tab-project-general">
|
||||||
<ProjectGeneralTab />
|
<ProjectGeneralTab />
|
||||||
|
|||||||
@@ -37,26 +37,32 @@ const Page = () => {
|
|||||||
const isSecretManager = currentProject.type === ProjectType.SecretManager;
|
const isSecretManager = currentProject.type === ProjectType.SecretManager;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Access Control"
|
title="Access Control"
|
||||||
description="Manage fine-grained access for users, groups, roles, and identities within your project resources."
|
description="Manage fine-grained access for users, groups, roles, and identities within your project resources."
|
||||||
/>
|
/>
|
||||||
<Tabs value={selectedTab} onValueChange={updateSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={ProjectAccessControlTabs.Member}>Users</Tab>
|
<Tab variant="project" value={ProjectAccessControlTabs.Member}>
|
||||||
<Tab value={ProjectAccessControlTabs.Groups}>Groups</Tab>
|
Users
|
||||||
<Tab value={ProjectAccessControlTabs.Identities}>
|
</Tab>
|
||||||
<div className="flex items-center">
|
<Tab variant="project" value={ProjectAccessControlTabs.Groups}>
|
||||||
<p>Machine Identities</p>
|
Groups
|
||||||
</div>
|
</Tab>
|
||||||
|
<Tab variant="project" value={ProjectAccessControlTabs.Identities}>
|
||||||
|
Identities
|
||||||
</Tab>
|
</Tab>
|
||||||
{isSecretManager && (
|
{isSecretManager && (
|
||||||
<Tab value={ProjectAccessControlTabs.ServiceTokens}>Service Tokens</Tab>
|
<Tab variant="project" value={ProjectAccessControlTabs.ServiceTokens}>
|
||||||
|
Service Tokens
|
||||||
|
</Tab>
|
||||||
)}
|
)}
|
||||||
<Tab value={ProjectAccessControlTabs.Roles}>Project Roles</Tab>
|
<Tab variant="project" value={ProjectAccessControlTabs.Roles}>
|
||||||
|
Roles
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={ProjectAccessControlTabs.Member}>
|
<TabPanel value={ProjectAccessControlTabs.Member}>
|
||||||
<MembersTab />
|
<MembersTab />
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
||||||
import { withProjectPermission } from "@app/hoc";
|
import { withProjectPermission } from "@app/hoc";
|
||||||
|
|
||||||
@@ -7,17 +5,7 @@ import { GroupsSection } from "./components";
|
|||||||
|
|
||||||
export const GroupsTab = withProjectPermission(
|
export const GroupsTab = withProjectPermission(
|
||||||
() => {
|
() => {
|
||||||
return (
|
return <GroupsSection />;
|
||||||
<motion.div
|
|
||||||
key="panel-groups"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<GroupsSection />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: ProjectPermissionActions.Read,
|
action: ProjectPermissionActions.Read,
|
||||||
|
|||||||
+2
-15
@@ -14,7 +14,6 @@ import {
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useNavigate } from "@tanstack/react-router";
|
import { useNavigate } from "@tanstack/react-router";
|
||||||
import { format } from "date-fns";
|
import { format } from "date-fns";
|
||||||
import { motion } from "framer-motion";
|
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -158,13 +157,6 @@ export const IdentityTab = withProjectPermission(
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<motion.div
|
|
||||||
key="identity-role-panel"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
@@ -303,9 +295,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
<div>
|
<div>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
content={
|
content={
|
||||||
isExpired
|
isExpired ? "Timed role expired" : "Timed role access"
|
||||||
? "Timed role expired"
|
|
||||||
: "Timed role access"
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<FontAwesomeIcon
|
<FontAwesomeIcon
|
||||||
@@ -342,9 +332,7 @@ export const IdentityTab = withProjectPermission(
|
|||||||
return (
|
return (
|
||||||
<Tag key={roleId} className="capitalize">
|
<Tag key={roleId} className="capitalize">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<div>
|
<div>{formatProjectRoleName(role, customRoleName)}</div>
|
||||||
{formatProjectRoleName(role, customRoleName)}
|
|
||||||
</div>
|
|
||||||
{isTemporary && (
|
{isTemporary && (
|
||||||
<div>
|
<div>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
@@ -458,7 +446,6 @@ export const IdentityTab = withProjectPermission(
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Identity }
|
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Identity }
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
||||||
import { withProjectPermission } from "@app/hoc";
|
import { withProjectPermission } from "@app/hoc";
|
||||||
|
|
||||||
@@ -7,17 +5,7 @@ import { MembersSection } from "./components";
|
|||||||
|
|
||||||
export const MembersTab = withProjectPermission(
|
export const MembersTab = withProjectPermission(
|
||||||
() => {
|
() => {
|
||||||
return (
|
return <MembersSection />;
|
||||||
<motion.div
|
|
||||||
key="panel-project-members"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<MembersSection />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
action: ProjectPermissionActions.Read,
|
action: ProjectPermissionActions.Read,
|
||||||
|
|||||||
+1
-13
@@ -1,5 +1,3 @@
|
|||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
||||||
import { withProjectPermission } from "@app/hoc";
|
import { withProjectPermission } from "@app/hoc";
|
||||||
|
|
||||||
@@ -7,17 +5,7 @@ import { ProjectRoleList } from "./components/ProjectRoleList";
|
|||||||
|
|
||||||
export const ProjectRoleListTab = withProjectPermission(
|
export const ProjectRoleListTab = withProjectPermission(
|
||||||
() => {
|
() => {
|
||||||
return (
|
return <ProjectRoleList />;
|
||||||
<motion.div
|
|
||||||
key="role-list"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<ProjectRoleList />
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Role }
|
{ action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.Role }
|
||||||
);
|
);
|
||||||
|
|||||||
-9
@@ -1,18 +1,10 @@
|
|||||||
// import { faWarning } from "@fortawesome/free-solid-svg-icons";
|
// import { faWarning } from "@fortawesome/free-solid-svg-icons";
|
||||||
// import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
// import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { motion } from "framer-motion";
|
|
||||||
|
|
||||||
import { ServiceTokenSection } from "./components";
|
import { ServiceTokenSection } from "./components";
|
||||||
|
|
||||||
export const ServiceTokenTab = () => {
|
export const ServiceTokenTab = () => {
|
||||||
return (
|
return (
|
||||||
<motion.div
|
|
||||||
key="panel-service-token"
|
|
||||||
transition={{ duration: 0.15 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
{/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
|
{/* <div className="flex w-full flex-row items-center rounded-md border border-primary-600/70 bg-primary/[.07] p-4 text-base text-white">
|
||||||
<FontAwesomeIcon icon={faWarning} className="pr-6 text-4xl text-white/80" />
|
<FontAwesomeIcon icon={faWarning} className="pr-6 text-4xl text-white/80" />
|
||||||
@@ -44,6 +36,5 @@ export const ServiceTokenTab = () => {
|
|||||||
</div> */}
|
</div> */}
|
||||||
<ServiceTokenSection />
|
<ServiceTokenSection />
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export const AppConnectionsPage = withProjectPermission(
|
|||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
<div className="flex w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ export const AuditLogsPage = () => {
|
|||||||
const { currentProject } = useProject();
|
const { currentProject } = useProject();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>Project Audit Logs</title>
|
<title>Project Audit Logs</title>
|
||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl">
|
<div className="w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Audit logs"
|
title="Audit logs"
|
||||||
|
|||||||
@@ -1,11 +1,16 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useParams } from "@tanstack/react-router";
|
||||||
|
import { formatRelative } from "date-fns";
|
||||||
|
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { EmptyState, PageHeader, Spinner } from "@app/components/v2";
|
import { EmptyState, PageHeader, Spinner } from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub, useProject } from "@app/context";
|
||||||
|
import { getProjectBaseURL } from "@app/helpers/project";
|
||||||
import { useGetWorkspaceGroupMembershipDetails } from "@app/hooks/api/projects/queries";
|
import { useGetWorkspaceGroupMembershipDetails } from "@app/hooks/api/projects/queries";
|
||||||
|
import { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
|
|
||||||
import { GroupDetailsSection } from "./components/GroupDetailsSection";
|
import { GroupDetailsSection } from "./components/GroupDetailsSection";
|
||||||
import { GroupMembersSection } from "./components/GroupMembersSection";
|
import { GroupMembersSection } from "./components/GroupMembersSection";
|
||||||
@@ -31,10 +36,27 @@ const Page = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{groupMembership ? (
|
{groupMembership ? (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader scope="project" title={groupMembership.group.name} />
|
<Link
|
||||||
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
|
search={{
|
||||||
|
selectedTab: ProjectAccessControlTabs.Groups
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Groups
|
||||||
|
</Link>
|
||||||
|
<PageHeader
|
||||||
|
scope="project"
|
||||||
|
title={groupMembership.group.name}
|
||||||
|
description={`Group joined on ${groupMembership?.createdAt && formatRelative(new Date(groupMembership?.createdAt || ""), new Date())}`}
|
||||||
|
/>
|
||||||
<div className="flex">
|
<div className="flex">
|
||||||
<div className="mr-4 w-96">
|
<div className="mr-4 w-96">
|
||||||
<GroupDetailsSection groupMembership={groupMembership} />
|
<GroupDetailsSection groupMembership={groupMembership} />
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { subject } from "@casl/ability";
|
import { subject } from "@casl/ability";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { formatRelative } from "date-fns";
|
import { formatRelative } from "date-fns";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -28,6 +30,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 { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
|
|
||||||
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
||||||
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
||||||
@@ -113,9 +116,22 @@ const Page = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
|
||||||
{identityMembershipDetails ? (
|
{identityMembershipDetails ? (
|
||||||
<>
|
<>
|
||||||
|
<Link
|
||||||
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
|
params={{
|
||||||
|
projectId
|
||||||
|
}}
|
||||||
|
search={{
|
||||||
|
selectedTab: ProjectAccessControlTabs.Identities
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Identities
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title={identityMembershipDetails?.identity?.name}
|
title={identityMembershipDetails?.identity?.name}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { formatRelative } from "date-fns";
|
import { formatRelative } from "date-fns";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
@@ -29,6 +31,7 @@ import {
|
|||||||
useGetWorkspaceUserDetails
|
useGetWorkspaceUserDetails
|
||||||
} 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 { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
|
|
||||||
import { MemberProjectAdditionalPrivilegeSection } from "./components/MemberProjectAdditionalPrivilegeSection";
|
import { MemberProjectAdditionalPrivilegeSection } from "./components/MemberProjectAdditionalPrivilegeSection";
|
||||||
import { MemberRoleDetailsSection } from "./components/MemberRoleDetailsSection";
|
import { MemberRoleDetailsSection } from "./components/MemberRoleDetailsSection";
|
||||||
@@ -115,9 +118,22 @@ export const Page = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
|
||||||
{membershipDetails ? (
|
{membershipDetails ? (
|
||||||
<>
|
<>
|
||||||
|
<Link
|
||||||
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id
|
||||||
|
}}
|
||||||
|
search={{
|
||||||
|
selectedTab: ProjectAccessControlTabs.Member
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Users
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title={
|
title={
|
||||||
|
|||||||
@@ -1,8 +1,14 @@
|
|||||||
import { Helmet } from "react-helmet";
|
import { Helmet } from "react-helmet";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { faCopy, faEdit, faEllipsisV, faTrash } from "@fortawesome/free-solid-svg-icons";
|
import {
|
||||||
|
faChevronLeft,
|
||||||
|
faCopy,
|
||||||
|
faEdit,
|
||||||
|
faEllipsisV,
|
||||||
|
faTrash
|
||||||
|
} from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
import { Link, useNavigate, useParams } from "@tanstack/react-router";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
@@ -86,20 +92,29 @@ const Page = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex flex-col justify-between bg-bunker-800 text-white">
|
||||||
{data && (
|
{data && (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
|
<Link
|
||||||
|
to={`${getProjectBaseURL(currentProject.type)}/access-management`}
|
||||||
|
params={{
|
||||||
|
projectId
|
||||||
|
}}
|
||||||
|
search={{
|
||||||
|
selectedTab: ProjectAccessControlTabs.Roles
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Roles
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title={
|
title={data.name}
|
||||||
<div className="flex flex-col">
|
description={
|
||||||
<div>
|
<>
|
||||||
<span>{data.name}</span>
|
|
||||||
<p className="text-sm leading-3 font-normal text-mineshaft-400 normal-case">
|
|
||||||
{data.slug} {data.description && `- ${data.description}`}
|
{data.slug} {data.description && `- ${data.description}`}
|
||||||
</p>
|
</>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{isCustomRole && (
|
{isCustomRole && (
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export const CommitDetailsPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex w-full max-w-7xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
|
<div className="mx-auto flex w-full max-w-8xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
|
||||||
<div className="w-full max-w-[75vw]">
|
<div className="w-full max-w-[75vw]">
|
||||||
<ProjectPermissionCan
|
<ProjectPermissionCan
|
||||||
renderGuardBanner
|
renderGuardBanner
|
||||||
|
|||||||
+1
-1
@@ -297,7 +297,7 @@ export const RollbackPreviewTab = (): JSX.Element => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex w-full max-w-7xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
|
<div className="mx-auto flex w-full max-w-8xl justify-center bg-bunker-800 pt-2 pb-4 text-white">
|
||||||
<ProjectPermissionCan
|
<ProjectPermissionCan
|
||||||
renderGuardBanner
|
renderGuardBanner
|
||||||
I={ProjectPermissionCommitsActions.PerformRollback}
|
I={ProjectPermissionCommitsActions.PerformRollback}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { useNavigate, useParams, useSearch } from "@tanstack/react-router";
|
import { faChevronLeft } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
import { Link, useNavigate, useParams, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { PageHeader } from "@app/components/v2";
|
import { PageHeader } from "@app/components/v2";
|
||||||
@@ -46,8 +48,19 @@ export const CommitsPage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="mx-auto flex h-full w-full max-w-7xl justify-center bg-bunker-800 py-4 text-white">
|
<div className="mx-auto mb-4 flex h-full w-full max-w-8xl justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-[75vw]">
|
<div className="w-full">
|
||||||
|
<Link
|
||||||
|
to="/projects/secret-management/$projectId/secrets/$envSlug"
|
||||||
|
params={{
|
||||||
|
projectId: currentProject.id,
|
||||||
|
envSlug
|
||||||
|
}}
|
||||||
|
className="mb-4 flex items-center gap-x-2 text-sm text-mineshaft-400"
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
|
Secrets
|
||||||
|
</Link>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Commits"
|
title="Commits"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const IPAllowListPage = () => {
|
|||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
<div className="flex h-full w-full justify-center bg-bunker-800 text-white">
|
||||||
<div className="w-full max-w-7xl px-6">
|
<div className="w-full max-w-8xl px-6">
|
||||||
<div className="my-6">
|
<div className="my-6">
|
||||||
<p className="text-3xl font-medium text-gray-200">IP Allowlist</p>
|
<p className="text-3xl font-medium text-gray-200">IP Allowlist</p>
|
||||||
<div />
|
<div />
|
||||||
|
|||||||
+2
-2
@@ -90,9 +90,9 @@ export const IntegrationDetailsByIDPage = () => {
|
|||||||
<meta property="og:title" content="Manage your .env files in seconds" />
|
<meta property="og:title" content="Manage your .env files in seconds" />
|
||||||
<meta name="og:description" content={t("integrations.description") as string} />
|
<meta name="og:description" content={t("integrations.description") as string} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="mx-auto flex max-w-7xl flex-col justify-between bg-bunker-800 text-white">
|
<div className="mx-auto flex max-w-8xl flex-col justify-between bg-bunker-800 text-white">
|
||||||
{integration ? (
|
{integration ? (
|
||||||
<div className="mx-auto mb-6 w-full max-w-7xl">
|
<div className="mx-auto mb-6 w-full max-w-8xl">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title={`${integrationSlugNameMapping[integration.integration]} Integration`}
|
title={`${integrationSlugNameMapping[integration.integration]} Integration`}
|
||||||
|
|||||||
@@ -45,21 +45,25 @@ export const IntegrationsListPage = () => {
|
|||||||
<meta property="og:title" content="Manage your .env files in seconds" />
|
<meta property="og:title" content="Manage your .env files in seconds" />
|
||||||
<meta name="og:description" content={t("integrations.description") as string} />
|
<meta name="og:description" content={t("integrations.description") as string} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="relative container mx-auto max-w-7xl pb-12 text-white">
|
<div className="relative mx-auto max-w-8xl pb-12 text-white">
|
||||||
<div className="mb-8">
|
<div className="mb-8">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Integrations"
|
title="Integrations"
|
||||||
description="Manage integrations with third-party services."
|
description="Manage integrations with third-party services."
|
||||||
/>
|
/>
|
||||||
<Tabs value={selectedTab} onValueChange={updateSelectedTab}>
|
<Tabs orientation="vertical" value={selectedTab} onValueChange={updateSelectedTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={IntegrationsListPageTabs.SecretSyncs}>Secret Syncs</Tab>
|
<Tab variant="project" value={IntegrationsListPageTabs.SecretSyncs}>
|
||||||
<Tab value={IntegrationsListPageTabs.NativeIntegrations}>Native Integrations</Tab>
|
Secret Syncs
|
||||||
<Tab value={IntegrationsListPageTabs.FrameworkIntegrations}>
|
</Tab>
|
||||||
|
<Tab variant="project" value={IntegrationsListPageTabs.NativeIntegrations}>
|
||||||
|
Native Integrations
|
||||||
|
</Tab>
|
||||||
|
<Tab variant="project" value={IntegrationsListPageTabs.FrameworkIntegrations}>
|
||||||
Framework Integrations
|
Framework Integrations
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab value={IntegrationsListPageTabs.InfrastructureIntegrations}>
|
<Tab variant="project" value={IntegrationsListPageTabs.InfrastructureIntegrations}>
|
||||||
Infrastructure Integrations
|
Infrastructure Integrations
|
||||||
</Tab>
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
|
|||||||
@@ -911,7 +911,7 @@ export const OverviewPage = () => {
|
|||||||
<meta property="og:title" content={String(t("dashboard.og-title"))} />
|
<meta property="og:title" content={String(t("dashboard.og-title"))} />
|
||||||
<meta name="og:description" content={String(t("dashboard.og-description"))} />
|
<meta name="og:description" content={String(t("dashboard.og-description"))} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="relative mx-auto max-w-7xl text-mineshaft-50 dark:scheme-dark">
|
<div className="relative mx-auto max-w-8xl text-mineshaft-50 dark:scheme-dark">
|
||||||
<div className="flex w-full items-baseline justify-between">
|
<div className="flex w-full items-baseline justify-between">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
@@ -959,7 +959,7 @@ export const OverviewPage = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 flex items-center justify-between">
|
<div className="flex items-center justify-between">
|
||||||
<FolderBreadCrumbs secretPath={secretPath} onResetSearch={handleResetSearch} />
|
<FolderBreadCrumbs secretPath={secretPath} onResetSearch={handleResetSearch} />
|
||||||
<div className="flex flex-row items-center justify-center space-x-2">
|
<div className="flex flex-row items-center justify-center space-x-2">
|
||||||
{isTableFiltered && (
|
{isTableFiltered && (
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@ export const QuickSearchDynamicSecretItem = ({
|
|||||||
</span>
|
</span>
|
||||||
<span className="text-xs text-mineshaft-400">
|
<span className="text-xs text-mineshaft-400">
|
||||||
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
||||||
<Tooltip className="max-w-7xl" content={groupDynamicSecret.path}>
|
<Tooltip className="max-w-8xl" content={groupDynamicSecret.path}>
|
||||||
<span>{reverseTruncate(groupDynamicSecret.path)}</span>
|
<span>{reverseTruncate(groupDynamicSecret.path)}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
+1
-1
@@ -32,7 +32,7 @@ export const QuickSearchFolderItem = ({ folderGroup, onClose }: Props) => {
|
|||||||
>
|
>
|
||||||
<Td className="w-full whitespace-nowrap">
|
<Td className="w-full whitespace-nowrap">
|
||||||
<FontAwesomeIcon className="text-yellow-700" icon={faFolder} />
|
<FontAwesomeIcon className="text-yellow-700" icon={faFolder} />
|
||||||
<Tooltip content={groupFolder.path} className="max-w-7xl">
|
<Tooltip content={groupFolder.path} className="max-w-8xl">
|
||||||
<div className="ml-2 inline-block">{reverseTruncate(groupFolder.path)}</div>
|
<div className="ml-2 inline-block">{reverseTruncate(groupFolder.path)}</div>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</Td>
|
</Td>
|
||||||
|
|||||||
+1
-1
@@ -126,7 +126,7 @@ export const QuickSearchSecretItem = ({
|
|||||||
</span>
|
</span>
|
||||||
<span className="text-xs text-mineshaft-400">
|
<span className="text-xs text-mineshaft-400">
|
||||||
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
||||||
<Tooltip className="max-w-7xl" content={groupSecret.path}>
|
<Tooltip className="max-w-8xl" content={groupSecret.path}>
|
||||||
<span>{reverseTruncate(groupSecret.path ?? "")}</span>
|
<span>{reverseTruncate(groupSecret.path ?? "")}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ export const QuickSearchSecretRotationItem = ({ secretRotationGroup, onClose }:
|
|||||||
</span>
|
</span>
|
||||||
<span className="text-xs text-mineshaft-400">
|
<span className="text-xs text-mineshaft-400">
|
||||||
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
<FontAwesomeIcon size="xs" className="mr-0.5 text-yellow-700" icon={faFolder} />{" "}
|
||||||
<Tooltip className="max-w-7xl" content={groupSecretRotation.folder.path}>
|
<Tooltip className="max-w-8xl" content={groupSecretRotation.folder.path}>
|
||||||
<span>{reverseTruncate(groupSecretRotation.folder.path)}</span>
|
<span>{reverseTruncate(groupSecretRotation.folder.path)}</span>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
export const getExpandedRowStyle = (scrollOffset: number) => ({
|
export const getExpandedRowStyle = (scrollOffset: number) => ({
|
||||||
marginLeft: scrollOffset,
|
marginLeft: scrollOffset,
|
||||||
width: "calc(100vw - 275px)", // accounts for sidebar and margin
|
width: "calc(100vw - 110px)", // accounts for sidebar and margin
|
||||||
maxWidth: "1270px" // largest width of table on ultra-wide
|
maxWidth: "1404px" // largest width of table on ultra-wide
|
||||||
});
|
});
|
||||||
|
|
||||||
type GetHeaderStyleParams = {
|
type GetHeaderStyleParams = {
|
||||||
|
|||||||
@@ -38,27 +38,29 @@ export const SecretApprovalsPage = () => {
|
|||||||
<meta property="og:title" content={String(t("approval.og-title"))} />
|
<meta property="og:title" content={String(t("approval.og-title"))} />
|
||||||
<meta name="og:description" content={String(t("approval.og-description"))} />
|
<meta name="og:description" content={String(t("approval.og-description"))} />
|
||||||
</Helmet>
|
</Helmet>
|
||||||
<div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 text-white">
|
<div className="mx-auto h-full w-full max-w-8xl bg-bunker-800 text-white">
|
||||||
<PageHeader
|
<PageHeader
|
||||||
scope="project"
|
scope="project"
|
||||||
title="Approval Workflows"
|
title="Approval Workflows"
|
||||||
description="Create approval policies for any modifications to secrets in sensitive environments and folders."
|
description="Create approval policies for any modifications to secrets in sensitive environments and folders."
|
||||||
/>
|
/>
|
||||||
<Tabs defaultValue={defaultTab}>
|
<Tabs orientation="vertical" defaultValue={defaultTab}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={TabSection.SecretApprovalRequests}>
|
<Tab variant="project" value={TabSection.SecretApprovalRequests}>
|
||||||
Change Requests
|
Change Requests
|
||||||
{Boolean(secretApprovalReqCount?.open) && (
|
{Boolean(secretApprovalReqCount?.open) && (
|
||||||
<Badge className="ml-2">{secretApprovalReqCount?.open}</Badge>
|
<Badge className="ml-2">{secretApprovalReqCount?.open}</Badge>
|
||||||
)}
|
)}
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab value={TabSection.ResourceApprovalRequests}>
|
<Tab variant="project" value={TabSection.ResourceApprovalRequests}>
|
||||||
Access Requests
|
Access Requests
|
||||||
{Boolean(accessApprovalRequestCount?.pendingCount) && (
|
{Boolean(accessApprovalRequestCount?.pendingCount) && (
|
||||||
<Badge className="ml-2">{accessApprovalRequestCount?.pendingCount}</Badge>
|
<Badge className="ml-2">{accessApprovalRequestCount?.pendingCount}</Badge>
|
||||||
)}
|
)}
|
||||||
</Tab>
|
</Tab>
|
||||||
<Tab value={TabSection.Policies}>Policies</Tab>
|
<Tab variant="project" value={TabSection.Policies}>
|
||||||
|
Policies
|
||||||
|
</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={TabSection.SecretApprovalRequests}>
|
<TabPanel value={TabSection.SecretApprovalRequests}>
|
||||||
<SecretApprovalRequest />
|
<SecretApprovalRequest />
|
||||||
|
|||||||
+4
-19
@@ -19,7 +19,6 @@ import {
|
|||||||
} 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 { format, formatDistance } from "date-fns";
|
import { format, formatDistance } from "date-fns";
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
@@ -298,15 +297,7 @@ export const AccessApprovalRequest = ({
|
|||||||
const isFiltered = Boolean(search || envFilter || requestedByFilter);
|
const isFiltered = Boolean(search || envFilter || requestedByFilter);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatePresence mode="wait">
|
<>
|
||||||
<motion.div
|
|
||||||
key="approval-changes-list"
|
|
||||||
transition={{ duration: 0.1 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
className="rounded-md text-gray-300"
|
|
||||||
>
|
|
||||||
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
@@ -422,19 +413,14 @@ export const AccessApprovalRequest = ({
|
|||||||
))}
|
))}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
{!!permission.can(
|
{!!permission.can(ProjectPermissionMemberActions.Read, ProjectPermissionSub.Member) && (
|
||||||
ProjectPermissionMemberActions.Read,
|
|
||||||
ProjectPermissionSub.Member
|
|
||||||
) && (
|
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<Button
|
<Button
|
||||||
variant="plain"
|
variant="plain"
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
className={requestedByFilter ? "text-white" : "text-bunker-300"}
|
className={requestedByFilter ? "text-white" : "text-bunker-300"}
|
||||||
rightIcon={
|
rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
|
||||||
<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Requested By
|
Requested By
|
||||||
</Button>
|
</Button>
|
||||||
@@ -611,7 +597,6 @@ export const AccessApprovalRequest = ({
|
|||||||
isOpen={popUp.upgradePlan.isOpen}
|
isOpen={popUp.upgradePlan.isOpen}
|
||||||
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
onOpenChange={() => handlePopUpClose("upgradePlan")}
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
</>
|
||||||
</AnimatePresence>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+2
-12
@@ -12,7 +12,6 @@ import {
|
|||||||
faSearch
|
faSearch
|
||||||
} 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 { AnimatePresence, motion } from "framer-motion";
|
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
|
||||||
@@ -240,15 +239,7 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
|
|||||||
orderDirection === OrderByDirection.DESC && orderBy === col ? faArrowUp : faArrowDown;
|
orderDirection === OrderByDirection.DESC && orderBy === col ? faArrowUp : faArrowDown;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AnimatePresence mode="wait">
|
<>
|
||||||
<motion.div
|
|
||||||
key="approval-changes-list"
|
|
||||||
transition={{ duration: 0.1 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
className="rounded-md text-gray-300"
|
|
||||||
>
|
|
||||||
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
@@ -495,7 +486,6 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
|
|||||||
)}
|
)}
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
|
||||||
<AccessPolicyForm
|
<AccessPolicyForm
|
||||||
projectId={currentProject.id}
|
projectId={currentProject.id}
|
||||||
projectSlug={currentProject.slug}
|
projectSlug={currentProject.slug}
|
||||||
@@ -517,6 +507,6 @@ export const ApprovalPolicyList = ({ projectId }: IProps) => {
|
|||||||
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
|
||||||
text="You can add secret approval policy if you switch to Infisical's Enterprise plan."
|
text="You can add secret approval policy if you switch to Infisical's Enterprise plan."
|
||||||
/>
|
/>
|
||||||
</AnimatePresence>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
+7
-42
@@ -14,7 +14,6 @@ import {
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { useSearch } from "@tanstack/react-router";
|
import { useSearch } from "@tanstack/react-router";
|
||||||
import { format, formatDistance } from "date-fns";
|
import { format, formatDistance } from "date-fns";
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -131,30 +130,12 @@ export const SecretApprovalRequest = () => {
|
|||||||
|
|
||||||
const isFiltered = Boolean(searchFilter || envFilter || committerFilter);
|
const isFiltered = Boolean(searchFilter || envFilter || committerFilter);
|
||||||
|
|
||||||
return (
|
return isSecretApprovalScreen ? (
|
||||||
<AnimatePresence mode="wait">
|
|
||||||
{isSecretApprovalScreen ? (
|
|
||||||
<motion.div
|
|
||||||
key="approval-changes-details"
|
|
||||||
transition={{ duration: 0.1 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
>
|
|
||||||
<SecretApprovalRequestChanges
|
<SecretApprovalRequestChanges
|
||||||
approvalRequestId={selectedApprovalId || ""}
|
approvalRequestId={selectedApprovalId || ""}
|
||||||
onGoBack={handleGoBackSecretRequestDetail}
|
onGoBack={handleGoBackSecretRequestDetail}
|
||||||
/>
|
/>
|
||||||
</motion.div>
|
|
||||||
) : (
|
) : (
|
||||||
<motion.div
|
|
||||||
key="approval-changes-list"
|
|
||||||
transition={{ duration: 0.1 }}
|
|
||||||
initial={{ opacity: 0, translateX: 30 }}
|
|
||||||
animate={{ opacity: 1, translateX: 0 }}
|
|
||||||
exit={{ opacity: 0, translateX: 30 }}
|
|
||||||
className="rounded-md text-gray-300"
|
|
||||||
>
|
|
||||||
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
<div className="mb-4 flex items-center justify-between">
|
<div className="mb-4 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
@@ -224,9 +205,7 @@ export const SecretApprovalRequest = () => {
|
|||||||
variant="plain"
|
variant="plain"
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
className={envFilter ? "text-white" : "text-bunker-300"}
|
className={envFilter ? "text-white" : "text-bunker-300"}
|
||||||
rightIcon={
|
rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
|
||||||
<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Environments
|
Environments
|
||||||
</Button>
|
</Button>
|
||||||
@@ -251,19 +230,14 @@ export const SecretApprovalRequest = () => {
|
|||||||
))}
|
))}
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
{!!permission.can(
|
{!!permission.can(ProjectPermissionMemberActions.Read, ProjectPermissionSub.Member) && (
|
||||||
ProjectPermissionMemberActions.Read,
|
|
||||||
ProjectPermissionSub.Member
|
|
||||||
) && (
|
|
||||||
<DropdownMenu>
|
<DropdownMenu>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<Button
|
<Button
|
||||||
variant="plain"
|
variant="plain"
|
||||||
colorSchema="secondary"
|
colorSchema="secondary"
|
||||||
className={committerFilter ? "text-white" : "text-bunker-300"}
|
className={committerFilter ? "text-white" : "text-bunker-300"}
|
||||||
rightIcon={
|
rightIcon={<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />}
|
||||||
<FontAwesomeIcon icon={faChevronDown} size="sm" className="ml-2" />
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Author
|
Author
|
||||||
</Button>
|
</Button>
|
||||||
@@ -282,9 +256,7 @@ export const SecretApprovalRequest = () => {
|
|||||||
setCommitterFilter((state) => (state === user.id ? undefined : user.id))
|
setCommitterFilter((state) => (state === user.id ? undefined : user.id))
|
||||||
}
|
}
|
||||||
key={`request-filter-member-${id}`}
|
key={`request-filter-member-${id}`}
|
||||||
icon={
|
icon={committerFilter === user.id && <FontAwesomeIcon icon={faCheckCircle} />}
|
||||||
committerFilter === user.id && <FontAwesomeIcon icon={faCheckCircle} />
|
|
||||||
}
|
|
||||||
iconPos="right"
|
iconPos="right"
|
||||||
>
|
>
|
||||||
{user.username}
|
{user.username}
|
||||||
@@ -355,9 +327,7 @@ export const SecretApprovalRequest = () => {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{status === "close" && (
|
{status === "close" && (
|
||||||
<Tooltip
|
<Tooltip content={updatedAt ? format(new Date(updatedAt), "M/dd/yyyy h:mm a") : ""}>
|
||||||
content={updatedAt ? format(new Date(updatedAt), "M/dd/yyyy h:mm a") : ""}
|
|
||||||
>
|
|
||||||
<div className="my-auto ml-auto">
|
<div className="my-auto ml-auto">
|
||||||
<Badge
|
<Badge
|
||||||
variant={hasMerged ? "success" : "danger"}
|
variant={hasMerged ? "success" : "danger"}
|
||||||
@@ -372,9 +342,7 @@ export const SecretApprovalRequest = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
{Boolean(
|
{Boolean(!secretApprovalRequests.length && isFiltered && !isApprovalRequestLoading) && (
|
||||||
!secretApprovalRequests.length && isFiltered && !isApprovalRequestLoading
|
|
||||||
) && (
|
|
||||||
<div className="py-12">
|
<div className="py-12">
|
||||||
<EmptyState title="No Requests Match Filters" icon={faSearch} />
|
<EmptyState title="No Requests Match Filters" icon={faSearch} />
|
||||||
</div>
|
</div>
|
||||||
@@ -407,8 +375,5 @@ export const SecretApprovalRequest = () => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
|
||||||
)}
|
|
||||||
</AnimatePresence>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user