improvement: remove overview page and re-vamp secret dashboard

This commit is contained in:
Scott Wilson
2025-08-27 16:51:15 -07:00
parent fc6778dd89
commit c99d5c210c
34 changed files with 1725 additions and 1778 deletions
@@ -36,7 +36,10 @@ export const AssumePrivilegeModeBanner = () => {
},
{
onSuccess: () => {
const url = getProjectHomePage(currentWorkspace.type);
const url = getProjectHomePage(
currentWorkspace.type,
currentWorkspace.environments
);
window.location.href = url.replace("$projectId", currentWorkspace.id);
}
}
@@ -101,7 +101,7 @@ export const ProjectSelect = () => {
<div className="-mr-2 flex w-full items-center gap-1">
<DropdownMenu modal={false}>
<Link
to={getProjectHomePage(currentWorkspace.type)}
to={getProjectHomePage(currentWorkspace.type, currentWorkspace.environments)}
params={{
projectId: currentWorkspace.id
}}
@@ -158,7 +158,7 @@ export const ProjectSelect = () => {
// to reproduce change this back to router.push and switch between two projects with different env count
// look into this on dashboard revamp
const url = linkOptions({
to: getProjectHomePage(workspace.type),
to: getProjectHomePage(workspace.type, workspace.environments),
params: {
projectId: workspace.id
}
@@ -71,9 +71,16 @@ export const SecretManagerLayout = () => {
<Menu>
<MenuGroup title="Resources">
<Link
to="/projects/secret-management/$projectId/overview"
to={
currentWorkspace.environments.length
? "/projects/secret-management/$projectId/secrets/$envSlug"
: "/projects/secret-management/$projectId/overview"
}
params={{
projectId: currentWorkspace.id
projectId: currentWorkspace.id,
...(currentWorkspace.environments.length
? { envSlug: currentWorkspace.environments[0]?.slug }
: {})
}}
>
{({ isActive }) => (