mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Merge pull request #4450 from Infisical/fix/bring-back-overviewpage
feat: union said - bring back overview page!!
This commit is contained in:
@@ -72,15 +72,14 @@ export const getProjectBaseURL = (type: ProjectType) => {
|
||||
}
|
||||
};
|
||||
|
||||
// @ts-expect-error akhilmhdh: will remove this later
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export const getProjectHomePage = (type: ProjectType, environments: WorkspaceEnv[]) => {
|
||||
switch (type) {
|
||||
case ProjectType.SecretManager:
|
||||
if (environments.length > 0)
|
||||
return `/projects/secret-management/$projectId/secrets/${environments[0].slug}`;
|
||||
|
||||
return "/projects/secret-management/$projectId/overview";
|
||||
return "/projects/secret-management/$projectId/overview" as const;
|
||||
case ProjectType.CertificateManager:
|
||||
return "/projects/cert-management/$projectId/subscribers";
|
||||
return "/projects/cert-management/$projectId/subscribers" as const;
|
||||
case ProjectType.SecretScanning:
|
||||
return `/projects/${type}/$projectId/data-sources` as const;
|
||||
default:
|
||||
|
||||
@@ -72,11 +72,7 @@ export const SecretManagerLayout = () => {
|
||||
<Menu>
|
||||
<MenuGroup title="Resources">
|
||||
<Link
|
||||
to={
|
||||
currentWorkspace.environments.length
|
||||
? "/projects/secret-management/$projectId/secrets/$envSlug"
|
||||
: "/projects/secret-management/$projectId/overview"
|
||||
}
|
||||
to="/projects/secret-management/$projectId/overview"
|
||||
params={{
|
||||
projectId: currentWorkspace.id,
|
||||
...(currentWorkspace.environments.length
|
||||
@@ -89,7 +85,7 @@ export const SecretManagerLayout = () => {
|
||||
isSelected={
|
||||
isActive ||
|
||||
location.pathname.startsWith(
|
||||
`/projects/secret-management/${currentWorkspace.id}/secrets`
|
||||
`/projects/secret-management/${currentWorkspace.id}/overview`
|
||||
)
|
||||
}
|
||||
>
|
||||
|
||||
@@ -2,20 +2,20 @@ import { Controller, useForm } from "react-hook-form";
|
||||
import { faQuestionCircle } from "@fortawesome/free-solid-svg-icons";
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { twMerge } from "tailwind-merge";
|
||||
import { z } from "zod";
|
||||
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { OrgPermissionCan } from "@app/components/permissions";
|
||||
import { Button, FormControl, Input, Select, SelectItem, Tooltip } from "@app/components/v2";
|
||||
import { NoticeBannerV2 } from "@app/components/v2/NoticeBannerV2/NoticeBannerV2";
|
||||
import { useImportVault } from "@app/hooks/api/migration/mutations";
|
||||
import { OrgPermissionCan } from "@app/components/permissions";
|
||||
import {
|
||||
OrgGatewayPermissionActions,
|
||||
OrgPermissionSubjects
|
||||
} from "@app/context/OrgPermissionContext/types";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { gatewaysQueryKeys } from "@app/hooks/api";
|
||||
import { useImportVault } from "@app/hooks/api/migration/mutations";
|
||||
|
||||
type Props = {
|
||||
id?: string;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user