-
+
Back to organization
diff --git a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
index 10d6889a5..800722f14 100644
--- a/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
+++ b/frontend/src/layouts/ProjectLayout/components/ProjectSelect/ProjectSelect.tsx
@@ -22,7 +22,7 @@ import { usePopUp } from "@app/hooks";
import { useGetUserWorkspaces } from "@app/hooks/api";
import { useUpdateUserProjectFavorites } from "@app/hooks/api/users/mutation";
import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
-import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
+import { Workspace } from "@app/hooks/api/workspace/types";
type TWorkspaceWithFaveProp = Workspace & { isFavorite: boolean };
@@ -126,7 +126,7 @@ const ProjectOption = ({
export const ProjectSelect = () => {
const { currentWorkspace } = useWorkspace();
const { currentOrg } = useOrganization();
- const { data: workspaces = [] } = useGetUserWorkspaces({ type: currentWorkspace.type });
+ const { data: workspaces = [] } = useGetUserWorkspaces();
const { data: projectFavorites } = useGetUserProjectFavorites(currentOrg.id!);
const { subscription } = useSubscription();
@@ -211,7 +211,6 @@ export const ProjectSelect = () => {
handlePopUpToggle("addNewWs", isOpen)}
- projectType={currentWorkspace?.type || ProjectType.SecretManager}
/>
);
diff --git a/frontend/src/layouts/ProjectLayout/components/SidebarHeader/SidebarHeader.tsx b/frontend/src/layouts/ProjectLayout/components/SidebarHeader/SidebarHeader.tsx
index d3c96ab66..dc74fdad5 100644
--- a/frontend/src/layouts/ProjectLayout/components/SidebarHeader/SidebarHeader.tsx
+++ b/frontend/src/layouts/ProjectLayout/components/SidebarHeader/SidebarHeader.tsx
@@ -14,7 +14,7 @@ import {
DropdownMenuItem,
DropdownMenuTrigger
} from "@app/components/v2";
-import { useOrganization, useUser, useWorkspace } from "@app/context";
+import { useOrganization, useUser } from "@app/context";
import { useGetOrganizations, useLogoutUser } from "@app/hooks/api";
import { AuthMethod } from "@app/hooks/api/users/types";
@@ -24,7 +24,6 @@ type Prop = {
export const SidebarHeader = ({ onChangeOrg }: Prop) => {
const { currentOrg } = useOrganization();
- const { currentWorkspace } = useWorkspace();
const { user } = useUser();
const navigate = useNavigate();
const { data: orgs } = useGetOrganizations();
@@ -42,7 +41,7 @@ export const SidebarHeader = ({ onChangeOrg }: Prop) => {
return (
-
+
diff --git a/frontend/src/pages/admin/layout.tsx b/frontend/src/pages/admin/layout.tsx
index f94484746..36ff5cf5e 100644
--- a/frontend/src/pages/admin/layout.tsx
+++ b/frontend/src/pages/admin/layout.tsx
@@ -7,7 +7,7 @@ export const Route = createFileRoute("/_authenticate/_inject-org-details/admin/_
beforeLoad: ({ context }) => {
if (!context.user.superAdmin) {
throw redirect({
- to: "/organization/secret-manager/overview"
+ to: "/organization/projects"
});
}
}
diff --git a/frontend/src/pages/auth/LoginPage/Login.utils.tsx b/frontend/src/pages/auth/LoginPage/Login.utils.tsx
index 87164fc5d..9b20425c3 100644
--- a/frontend/src/pages/auth/LoginPage/Login.utils.tsx
+++ b/frontend/src/pages/auth/LoginPage/Login.utils.tsx
@@ -4,7 +4,6 @@ import { useServerConfig } from "@app/context";
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
import { queryClient } from "@app/hooks/api/reactQuery";
import { userKeys } from "@app/hooks/api/users";
-import { ProjectType } from "@app/hooks/api/workspace/types";
export const navigateUserToOrg = async (navigate: NavigateFn, organizationId?: string) => {
const userOrgs = await fetchOrganizations();
@@ -13,7 +12,7 @@ export const navigateUserToOrg = async (navigate: NavigateFn, organizationId?: s
if (organizationId) {
localStorage.setItem("orgData.id", organizationId);
- navigate({ to: "/organization/secret-manager/overview" });
+ navigate({ to: "/organization/projects" });
return;
}
@@ -21,7 +20,7 @@ export const navigateUserToOrg = async (navigate: NavigateFn, organizationId?: s
// user is part of at least 1 non-auth enforced org
const userOrg = nonAuthEnforcedOrgs[0] && nonAuthEnforcedOrgs[0].id;
localStorage.setItem("orgData.id", userOrg);
- navigate({ to: `/organization/${ProjectType.SecretManager}/overview` as const });
+ navigate({ to: "/organization/projects" });
} else {
// user is not part of any non-auth enforced orgs
localStorage.removeItem("orgData.id");
diff --git a/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx b/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx
index fe27e5d7d..8471fc203 100644
--- a/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx
+++ b/frontend/src/pages/auth/SignUpInvitePage/SignUpInvitePage.tsx
@@ -28,7 +28,6 @@ import {
import { MfaMethod } from "@app/hooks/api/auth/types";
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
import { isLoggedIn } from "@app/hooks/api/reactQuery";
-import { ProjectType } from "@app/hooks/api/workspace/types";
// eslint-disable-next-line new-cap
const client = new jsrp.client();
@@ -204,7 +203,7 @@ export const SignupInvitePage = () => {
localStorage.setItem("orgData.id", orgId);
navigate({
- to: `/organization/${ProjectType.SecretManager}/overview` as const
+ to: "/organization/projects"
});
};
diff --git a/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx b/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
index 2f2ade8e7..7e7c15c6d 100644
--- a/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
+++ b/frontend/src/pages/auth/SignUpSsoPage/components/UserInfoSSOStep/UserInfoSSOStep.tsx
@@ -18,7 +18,6 @@ import { useToggle } from "@app/hooks";
import { completeAccountSignup, useSelectOrganization } from "@app/hooks/api/auth/queries";
import { MfaMethod } from "@app/hooks/api/auth/types";
import { fetchOrganizations } from "@app/hooks/api/organization/queries";
-import { ProjectType } from "@app/hooks/api/workspace/types";
// eslint-disable-next-line new-cap
const client = new jsrp.client();
@@ -207,7 +206,7 @@ export const UserInfoSSOStep = ({
localStorage.setItem("orgData.id", orgId);
navigate({
- to: `/organization/${ProjectType.SecretManager}/overview` as const
+ to: "/organization/projects"
});
} catch (error) {
setIsLoading(false);
diff --git a/frontend/src/pages/kms/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx b/frontend/src/pages/kms/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
index 5a7549b3c..21ed0dec8 100644
--- a/frontend/src/pages/kms/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
+++ b/frontend/src/pages/kms/SettingsPage/components/DeleteProjectSection/DeleteProjectSection.tsx
@@ -64,7 +64,7 @@ export const DeleteProjectSection = () => {
});
navigate({
- to: `/organization/${ProjectType.SecretManager}/overview` as const
+ to: "/organization/projects"
});
handlePopUpClose("deleteWorkspace");
} catch (err) {
diff --git a/frontend/src/pages/middlewares/restrict-login-signup.tsx b/frontend/src/pages/middlewares/restrict-login-signup.tsx
index 73964868a..68d3f0892 100644
--- a/frontend/src/pages/middlewares/restrict-login-signup.tsx
+++ b/frontend/src/pages/middlewares/restrict-login-signup.tsx
@@ -112,7 +112,7 @@ export const Route = createFileRoute("/_restrict-login-signup")({
throw redirect({ to: "/login/select-organization" });
}
throw redirect({
- to: `/organization/${ProjectType.SecretManager}/overview` as const
+ to: "/organization/projects"
});
},
component: AuthConsentWrapper
diff --git a/frontend/src/pages/organization/BillingPage/BillingPage.tsx b/frontend/src/pages/organization/BillingPage/BillingPage.tsx
index d0b71cc21..a58a7f14d 100644
--- a/frontend/src/pages/organization/BillingPage/BillingPage.tsx
+++ b/frontend/src/pages/organization/BillingPage/BillingPage.tsx
@@ -5,6 +5,7 @@ import { OrgPermissionCan } from "@app/components/permissions";
import { OrgPermissionBillingActions, OrgPermissionSubjects } from "@app/context";
import { BillingTabGroup } from "./components";
+import { PageHeader } from "@app/components/v2";
export const BillingPage = () => {
const { t } = useTranslation();
@@ -18,10 +19,11 @@ export const BillingPage = () => {
-
-
{t("billing.title")}
-
-
+
+
{
+ return {
+ breadcrumbs: [
+ {
+ label: "Billing"
+ }
+ ]
+ };
+ }
});
diff --git a/frontend/src/pages/organization/CertManagerOverviewPage/CertManagerOverviewPage.tsx b/frontend/src/pages/organization/CertManagerOverviewPage/CertManagerOverviewPage.tsx
deleted file mode 100644
index 73626c3ef..000000000
--- a/frontend/src/pages/organization/CertManagerOverviewPage/CertManagerOverviewPage.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-import { ProjectType } from "@app/hooks/api/workspace/types";
-
-import { ProductOverviewPage } from "../SecretManagerOverviewPage/SecretManagerOverviewPage";
-
-export const CertManagerOverviewPage = () => (
-
-);
diff --git a/frontend/src/pages/organization/CertManagerOverviewPage/route.tsx b/frontend/src/pages/organization/CertManagerOverviewPage/route.tsx
deleted file mode 100644
index 1e3673189..000000000
--- a/frontend/src/pages/organization/CertManagerOverviewPage/route.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { createFileRoute, linkOptions } from "@tanstack/react-router";
-
-import { CertManagerOverviewPage } from "./CertManagerOverviewPage";
-
-export const Route = createFileRoute(
- "/_authenticate/_inject-org-details/_org-layout/organization/cert-manager/overview"
-)({
- component: CertManagerOverviewPage,
- context: () => ({
- breadcrumbs: [
- {
- label: "Cert Management",
- link: linkOptions({ to: "/organization/cert-manager/overview" })
- }
- ]
- })
-});
diff --git a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx
index e6d503e84..a0565d50d 100644
--- a/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx
+++ b/frontend/src/pages/organization/IdentityDetailsByIDPage/components/IdentityProjectsSection/IdentityAddToProjectModal.tsx
@@ -44,7 +44,7 @@ type Props = {
const Content = ({ identityId, handlePopUpToggle }: Omit) => {
const { currentOrg } = useOrganization();
- const { data: workspaces = [] } = useGetUserWorkspaces({ type: "all" });
+ const { data: workspaces = [] } = useGetUserWorkspaces();
const { mutateAsync: addIdentityToWorkspace } = useAddIdentityToWorkspace();
const {
diff --git a/frontend/src/pages/organization/KmsOverviewPage/KmsOverviewPage.tsx b/frontend/src/pages/organization/KmsOverviewPage/KmsOverviewPage.tsx
deleted file mode 100644
index f336acc4a..000000000
--- a/frontend/src/pages/organization/KmsOverviewPage/KmsOverviewPage.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { ProjectType } from "@app/hooks/api/workspace/types";
-
-import { ProductOverviewPage } from "../SecretManagerOverviewPage/SecretManagerOverviewPage";
-
-export const KmsOverviewPage = () => ;
diff --git a/frontend/src/pages/organization/KmsOverviewPage/route.tsx b/frontend/src/pages/organization/KmsOverviewPage/route.tsx
deleted file mode 100644
index 08f7ddf4a..000000000
--- a/frontend/src/pages/organization/KmsOverviewPage/route.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import { createFileRoute, linkOptions } from "@tanstack/react-router";
-
-import { KmsOverviewPage } from "./KmsOverviewPage";
-
-export const Route = createFileRoute(
- "/_authenticate/_inject-org-details/_org-layout/organization/kms/overview"
-)({
- component: KmsOverviewPage,
- context: () => ({
- breadcrumbs: [
- {
- label: "KMS",
- link: linkOptions({ to: "/organization/kms/overview" })
- }
- ]
- })
-});
diff --git a/frontend/src/pages/organization/SecretManagerOverviewPage/SecretManagerOverviewPage.tsx b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
similarity index 76%
rename from frontend/src/pages/organization/SecretManagerOverviewPage/SecretManagerOverviewPage.tsx
rename to frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
index a479e76a6..48f6e02f0 100644
--- a/frontend/src/pages/organization/SecretManagerOverviewPage/SecretManagerOverviewPage.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
@@ -10,31 +10,25 @@ import { NewProjectModal } from "@app/components/projects";
import { PageHeader } from "@app/components/v2";
import { useSubscription } from "@app/context";
import { useFetchServerStatus } from "@app/hooks/api/serverDetails";
-import { ProjectType } from "@app/hooks/api/workspace/types";
import { usePopUp } from "@app/hooks/usePopUp";
import { AllProjectView } from "./components/AllProjectView";
import { MyProjectView } from "./components/MyProjectView";
import { ProjectListToggle, ProjectListView } from "./components/ProjectListToggle";
-const formatDescription = (type: ProjectType) => {
- if (type === ProjectType.SecretManager)
- return "Securely store, manage, and rotate various application secrets, such as database credentials, API keys, etc.";
- if (type === ProjectType.CertificateManager)
- return "Manage your PKI infrastructure and issue digital certificates for services, applications, and devices.";
- if (type === ProjectType.KMS)
- return "Centralize the management of keys for cryptographic operations, such as encryption and decryption.";
- if (type === ProjectType.SecretScanning)
- return "Connect and monitor data sources to prevent secret leaks.";
- return "Infisical SSH lets you issue SSH credentials to users for short-lived, secure SSH access to infrastructure.";
-};
+// const formatDescription = (type: ProjectType) => {
+// if (type === ProjectType.SecretManager)
+// return "Securely store, manage, and rotate various application secrets, such as database credentials, API keys, etc.";
+// if (type === ProjectType.CertificateManager)
+// return "Manage your PKI infrastructure and issue digital certificates for services, applications, and devices.";
+// if (type === ProjectType.KMS)
+// return "Centralize the management of keys for cryptographic operations, such as encryption and decryption.";
+// if (type === ProjectType.SecretScanning)
+// return "Connect and monitor data sources to prevent secret leaks.";
+// return "Infisical SSH lets you issue SSH credentials to users for short-lived, secure SSH access to infrastructure.";
+// };
-type Props = {
- type: ProjectType;
-};
-
-// #TODO: Update all the workspaceIds
-export const ProductOverviewPage = ({ type }: Props) => {
+export const ProjectsPage = () => {
const { t } = useTranslation();
const [projectListView, setProjectListView] = useState(ProjectListView.MyProjects);
@@ -87,19 +81,17 @@ export const ProductOverviewPage = ({ type }: Props) => {
}
- description={formatDescription(type)}
+ description="Your team's complete security toolkit - organized and ready when you need them."
/>
{projectListView === ProjectListView.MyProjects ? (
handlePopUpOpen("addNewWs")}
onUpgradePlan={() => handlePopUpOpen("upgradePlan")}
isAddingProjectsAllowed={isAddingProjectsAllowed}
/>
) : (
handlePopUpOpen("addNewWs")}
onUpgradePlan={() => handlePopUpOpen("upgradePlan")}
isAddingProjectsAllowed={isAddingProjectsAllowed}
@@ -108,7 +100,6 @@ export const ProductOverviewPage = ({ type }: Props) => {
handlePopUpToggle("addNewWs", isOpen)}
- projectType={type}
/>
{
);
};
-
-export const SecretManagerOverviewPage = () => (
-
-);
diff --git a/frontend/src/pages/organization/SecretManagerOverviewPage/components/AllProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
similarity index 98%
rename from frontend/src/pages/organization/SecretManagerOverviewPage/components/AllProjectView.tsx
rename to frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
index 6be1a4554..daea79374 100644
--- a/frontend/src/pages/organization/SecretManagerOverviewPage/components/AllProjectView.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/components/AllProjectView.tsx
@@ -35,10 +35,9 @@ import {
} from "@app/helpers/userTablePreferences";
import { useDebounce, usePagination, usePopUp, useResetPageHelper } from "@app/hooks";
import { useRequestProjectAccess, useSearchProjects } from "@app/hooks/api";
-import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
+import { Workspace } from "@app/hooks/api/workspace/types";
type Props = {
- type: ProjectType;
onAddNewProject: () => void;
onUpgradePlan: () => void;
isAddingProjectsAllowed: boolean;
@@ -92,7 +91,6 @@ const RequestAccessModal = ({ projectId, onPopUpToggle }: RequestAccessModalProp
};
export const AllProjectView = ({
- type,
onAddNewProject,
onUpgradePlan,
isAddingProjectsAllowed
@@ -125,7 +123,6 @@ export const AllProjectView = ({
const { data: searchedProjects, isPending: isProjectLoading } = useSearchProjects({
limit,
offset,
- type,
name: debouncedSearch || undefined,
orderDirection
});
diff --git a/frontend/src/pages/organization/SecretManagerOverviewPage/components/MyProjectView.tsx b/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx
similarity index 96%
rename from frontend/src/pages/organization/SecretManagerOverviewPage/components/MyProjectView.tsx
rename to frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx
index a04b4e196..a6eb3f1e9 100644
--- a/frontend/src/pages/organization/SecretManagerOverviewPage/components/MyProjectView.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/components/MyProjectView.tsx
@@ -29,10 +29,9 @@ import { useGetUserWorkspaces } from "@app/hooks/api";
import { OrderByDirection } from "@app/hooks/api/generic/types";
import { useUpdateUserProjectFavorites } from "@app/hooks/api/users/mutation";
import { useGetUserProjectFavorites } from "@app/hooks/api/users/queries";
-import { ProjectType, Workspace } from "@app/hooks/api/workspace/types";
+import { Workspace } from "@app/hooks/api/workspace/types";
type Props = {
- type: ProjectType;
onAddNewProject: () => void;
onUpgradePlan: () => void;
isAddingProjectsAllowed: boolean;
@@ -48,7 +47,6 @@ enum ProjectsViewMode {
}
export const MyProjectView = ({
- type,
onAddNewProject,
onUpgradePlan,
isAddingProjectsAllowed
@@ -56,9 +54,7 @@ export const MyProjectView = ({
const navigate = useNavigate();
const { currentOrg } = useOrganization();
- const { data: workspaces = [], isPending: isWorkspaceLoading } = useGetUserWorkspaces({
- type
- });
+ const { data: workspaces = [], isPending: isWorkspaceLoading } = useGetUserWorkspaces();
const {
setPage,
perPage,
@@ -202,11 +198,6 @@ export const MyProjectView = ({