Skip to content

Commit

Permalink
filter out deleted stages
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Jul 7, 2024
1 parent 1c5b9b2 commit 725ced4
Show file tree
Hide file tree
Showing 3 changed files with 10,267 additions and 7,043 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/node": "^18.16.0",
"@types/react": "18.0.25",
"@types/relaxed-json": "^1.0.1",
"drizzle-kit": "0.22.7",
"drizzle-kit": "0.22.8",
"sst": "2.43.2",
"typescript": "^5.2.2",
"vitest": "^0.25.3"
Expand Down
22 changes: 13 additions & 9 deletions packages/web/workspace/src/pages/workspace/stage/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { IssueStore } from "$/data/issue";
import { ResourceStore } from "$/data/resource";
import { UsageStore } from "$/data/usage";
import { sumBy } from "remeda";
import type { State } from "@console/core/state";

export const StageContext =
createContext<ReturnType<typeof createStageContext>>();
Expand All @@ -40,6 +39,7 @@ export function createStageContext() {
items.find(
(stage) =>
stage.appID === app()?.id &&
!stage.timeDeleted &&
(stage.name === params.stageName || stage.id === params.stageName),
),
);
Expand Down Expand Up @@ -131,10 +131,13 @@ export function ResourcesProvider(props: ParentProps) {
title: `${item.route}`,
run(control: any) {
nav(
`/${params.workspaceSlug
}/${appName}/${stageName}/resources/logs/${fn.id
}?logGroup=${resource.metadata.routes!.logGroupPrefix +
item.logGroupPath
`/${
params.workspaceSlug
}/${appName}/${stageName}/resources/logs/${
fn.id
}?logGroup=${
resource.metadata.routes!.logGroupPrefix +
item.logGroupPath
}`,
);
control.hide();
Expand All @@ -146,10 +149,11 @@ export function ResourcesProvider(props: ParentProps) {
{
icon: IconApi,
category: "API Routes",
title: `${resource.metadata.routes.find(
(r: any) => r.fn?.node === fn.addr,
)?.route
}`,
title: `${
resource.metadata.routes.find(
(r: any) => r.fn?.node === fn.addr,
)?.route
}`,
run,
},
];
Expand Down
Loading

0 comments on commit 725ced4

Please sign in to comment.