mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-21 10:28:54 +00:00
feat: resolved frontend url changes and resolved ts error
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
ProjectPermissionSub,
|
||||
useWorkspace
|
||||
} from "@app/context";
|
||||
import { getCurrentProductFromUrl, getProjectHomePage } from "@app/helpers/project";
|
||||
import { getProjectBaseURL, getProjectHomePage } from "@app/helpers/project";
|
||||
import { usePopUp } from "@app/hooks";
|
||||
import {
|
||||
useAssumeProjectPrivileges,
|
||||
@@ -28,7 +28,6 @@ import {
|
||||
useGetWorkspaceIdentityMembershipDetails
|
||||
} from "@app/hooks/api";
|
||||
import { ActorType } from "@app/hooks/api/auditLogs/enums";
|
||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||
|
||||
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
||||
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
||||
@@ -68,9 +67,7 @@ const Page = () => {
|
||||
type: "success",
|
||||
text: "Identity privilege assumption has started"
|
||||
});
|
||||
const url = getProjectHomePage(
|
||||
getCurrentProductFromUrl(window.location.href) || ProjectType.SecretManager
|
||||
);
|
||||
const url = getProjectHomePage(currentWorkspace.type);
|
||||
window.location.href = url.replace("$projectId", currentWorkspace.id);
|
||||
}
|
||||
}
|
||||
@@ -89,7 +86,7 @@ const Page = () => {
|
||||
});
|
||||
handlePopUpClose("deleteIdentity");
|
||||
navigate({
|
||||
to: "/projects/$projectId/access-management",
|
||||
to: `${getProjectBaseURL(currentWorkspace.type)}/access-management` as const,
|
||||
params: {
|
||||
projectId: workspaceId
|
||||
},
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
||||
|
||||
import { ProjectAccessControlTabs } from '@app/types/project'
|
||||
|
||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/cert-management/$projectId/_cert-manager-layout/identities/$identityId',
|
||||
)({
|
||||
component: IdentityDetailsByIDPage,
|
||||
beforeLoad: ({ context, params }) => {
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
label: 'Access Control',
|
||||
link: linkOptions({
|
||||
to: '/projects/$projectId/access-management',
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
},
|
||||
search: {
|
||||
selectedTab: ProjectAccessControlTabs.Identities,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Machine Identity',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
||||
|
||||
import { ProjectAccessControlTabs } from '@app/types/project'
|
||||
|
||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/kms/$projectId/_kms-layout/identities/$identityId',
|
||||
)({
|
||||
component: IdentityDetailsByIDPage,
|
||||
beforeLoad: ({ context, params }) => {
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
label: 'Access Control',
|
||||
link: linkOptions({
|
||||
to: '/projects/$projectId/access-management',
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
},
|
||||
search: {
|
||||
selectedTab: ProjectAccessControlTabs.Identities,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Machine Identity',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
||||
|
||||
import { ProjectAccessControlTabs } from '@app/types/project'
|
||||
|
||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/secret-management/$projectId/_secret-manager-layout/identities/$identityId',
|
||||
)({
|
||||
component: IdentityDetailsByIDPage,
|
||||
beforeLoad: ({ context, params }) => {
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
label: 'Access Control',
|
||||
link: linkOptions({
|
||||
to: '/projects/$projectId/access-management',
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
},
|
||||
search: {
|
||||
selectedTab: ProjectAccessControlTabs.Identities,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Machine Identity',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
||||
|
||||
import { ProjectAccessControlTabs } from '@app/types/project'
|
||||
|
||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/secret-scanning/$projectId/_secret-scanning-layout/identities/$identityId',
|
||||
)({
|
||||
component: IdentityDetailsByIDPage,
|
||||
beforeLoad: ({ context, params }) => {
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
label: 'Access Control',
|
||||
link: linkOptions({
|
||||
to: '/projects/$projectId/access-management',
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
},
|
||||
search: {
|
||||
selectedTab: ProjectAccessControlTabs.Identities,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Machine Identity',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,33 @@
|
||||
import { createFileRoute, linkOptions } from '@tanstack/react-router'
|
||||
|
||||
import { ProjectAccessControlTabs } from '@app/types/project'
|
||||
|
||||
import { IdentityDetailsByIDPage } from './IdentityDetailsByIDPage'
|
||||
|
||||
export const Route = createFileRoute(
|
||||
'/_authenticate/_inject-org-details/_org-layout/projects/ssh/$projectId/_ssh-layout/identities/$identityId',
|
||||
)({
|
||||
component: IdentityDetailsByIDPage,
|
||||
beforeLoad: ({ context, params }) => {
|
||||
return {
|
||||
breadcrumbs: [
|
||||
...context.breadcrumbs,
|
||||
{
|
||||
label: 'Access Control',
|
||||
link: linkOptions({
|
||||
to: '/projects/$projectId/access-management',
|
||||
params: {
|
||||
projectId: params.projectId,
|
||||
},
|
||||
search: {
|
||||
selectedTab: ProjectAccessControlTabs.Identities,
|
||||
},
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Machine Identity',
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user