-
Notifications
You must be signed in to change notification settings - Fork 608
feat: deployment runtime logs #4910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
57b9824
fix: overlapping in deployment list
ogzhanolguncu 2856433
chore: delete state change
ogzhanolguncu 4bbb091
feat: add actual network elements
ogzhanolguncu fdc7057
refactor: replace rest of the regions with sentinel
ogzhanolguncu 8646467
chore: tidy up
ogzhanolguncu 9b5fb64
feat: add RPS CH queries
ogzhanolguncu 7245807
feat: add proper formatting for metrics
ogzhanolguncu 02bf9a0
feat: add proper foramtting
ogzhanolguncu 48963c2
Merge branch 'main' of github.com:unkeyed/unkey into deployment-netwo…
ogzhanolguncu 38b8980
Merge branch 'main' of github.com:unkeyed/unkey into deployment-netwo…
ogzhanolguncu 3fcac1a
feat: add RPS chart
ogzhanolguncu 18d3ea8
feat: add latency chart
ogzhanolguncu 04889f6
refactor: fix AVG aggregation
ogzhanolguncu bc18de1
chore: update logs querry
ogzhanolguncu 9f982ac
refactor: reorganize componetns
ogzhanolguncu 53b6ff4
chore: tidy
ogzhanolguncu 60b2693
chore: explanation line
ogzhanolguncu 2bc6bc0
feat: add disabled for navbar-popover
ogzhanolguncu f491b04
Merge branch 'main' into deployment-network-tab
ogzhanolguncu b778105
fix: type issues
ogzhanolguncu c77ab3f
feat: update sidebar nesting
ogzhanolguncu a9b0312
feat: add tRPC for runtime-lgos
ogzhanolguncu 3149d09
feat: add rough version of runtime-logs
ogzhanolguncu dd807a3
chore: fmt
ogzhanolguncu 5d3af16
refactor: styling of runtime logs
ogzhanolguncu 2071e2c
refactor: use the same schema
ogzhanolguncu 84d6e8a
feat: add message filter
ogzhanolguncu 1e60de0
refactor: use proper filters schema
ogzhanolguncu cfafe18
feat: add AI search
ogzhanolguncu 2c47664
feat: add proper resizing for smaller screens and switch to table-aut…
ogzhanolguncu 3754d20
chore: allow overriding table layout
ogzhanolguncu 10d867e
refactor: improve ui
ogzhanolguncu 1cff653
fix: ui inconsistenties
ogzhanolguncu bff53a1
chore: improve styling of custom domains
ogzhanolguncu 31cbbaf
feat: add runtime-logs to active deployment card
ogzhanolguncu 2e4da3b
refactor: custom domain styless
ogzhanolguncu 423e4fc
fix: formatting
ogzhanolguncu 43c4df1
chore: improvemetns
ogzhanolguncu be3e5c5
refactor: use shared component for flags
ogzhanolguncu ba2ddf1
Merge branch 'main' of github.com:unkeyed/unkey into deployment-runti…
ogzhanolguncu c17cec3
chore: tidyup
ogzhanolguncu faa9e44
fix: network status bar overlapping
ogzhanolguncu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
...view)/deployments/[deploymentId]/(overview)/components/table/components/latency-badge.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...ectId]/(overview)/deployments/[deploymentId]/(overview)/navigations/deployment-navbar.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| "use client"; | ||
|
|
||
| import { QuickNavPopover } from "@/components/navbar-popover"; | ||
| import { Navbar } from "@/components/navigation/navbar"; | ||
| import { ChevronExpandY, Cloud } from "@unkey/icons"; | ||
| import { useDeploymentBreadcrumbConfig } from "./use-deployment-breadcrumb-config"; | ||
|
|
||
| export function DeploymentNavbar() { | ||
| const breadcrumbs = useDeploymentBreadcrumbConfig(); | ||
|
|
||
| return ( | ||
| <Navbar> | ||
| <Navbar.Breadcrumbs icon={<Cloud />}> | ||
| {breadcrumbs | ||
| .filter((breadcrumb) => breadcrumb.shouldRender) | ||
| .map((breadcrumb) => ( | ||
| <Navbar.Breadcrumbs.Link | ||
| key={breadcrumb.id} | ||
| href={breadcrumb.href} | ||
| noop={breadcrumb.noop} | ||
| isIdentifier={breadcrumb.isIdentifier} | ||
| active={breadcrumb.active} | ||
| > | ||
| {breadcrumb.quickNavConfig ? ( | ||
| <QuickNavPopover | ||
| items={breadcrumb.quickNavConfig.items} | ||
| activeItemId={breadcrumb.quickNavConfig.activeItemId} | ||
| shortcutKey={breadcrumb.quickNavConfig.shortcutKey} | ||
| > | ||
| <div className="flex items-center gap-1"> | ||
| {breadcrumb.children} | ||
| <ChevronExpandY className="size-4" /> | ||
| </div> | ||
| </QuickNavPopover> | ||
| ) : ( | ||
| breadcrumb.children | ||
| )} | ||
| </Navbar.Breadcrumbs.Link> | ||
| ))} | ||
| </Navbar.Breadcrumbs> | ||
| </Navbar> | ||
| ); | ||
| } |
115 changes: 115 additions & 0 deletions
115
...ew)/deployments/[deploymentId]/(overview)/navigations/use-deployment-breadcrumb-config.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| "use client"; | ||
|
|
||
| import type { QuickNavItem } from "@/components/navbar-popover"; | ||
| import type { Navbar } from "@/components/navigation/navbar"; | ||
| import { shortenId } from "@/lib/shorten-id"; | ||
| import { useParams, useSelectedLayoutSegments } from "next/navigation"; | ||
| import { useMemo } from "react"; | ||
| import type { ComponentPropsWithoutRef } from "react"; | ||
|
|
||
| export type BreadcrumbItem = ComponentPropsWithoutRef<typeof Navbar.Breadcrumbs.Link> & { | ||
| /** Unique identifier for the breadcrumb item */ | ||
| id: string; | ||
| /** Internal: determines if this breadcrumb should be rendered */ | ||
| shouldRender: boolean; | ||
| /** Optional QuickNav dropdown configuration */ | ||
| quickNavConfig?: { | ||
| items: QuickNavItem[]; | ||
| activeItemId?: string; | ||
| shortcutKey?: string; | ||
| }; | ||
| }; | ||
|
|
||
| export function useDeploymentBreadcrumbConfig(): BreadcrumbItem[] { | ||
| const params = useParams(); | ||
| const segments = useSelectedLayoutSegments(); | ||
|
|
||
| const workspaceSlug = params.workspaceSlug as string; | ||
| const projectId = params.projectId as string; | ||
| const deploymentId = params.deploymentId as string; | ||
|
|
||
| // Detect current tab from segments | ||
| const currentTab = segments.includes("network") | ||
| ? "network" | ||
| : segments.includes("runtime-logs") | ||
| ? "runtime-logs" | ||
| : "overview"; | ||
|
|
||
| return useMemo(() => { | ||
| const basePath = `/${workspaceSlug}/projects/${projectId}`; | ||
|
|
||
| // Deployment tabs for QuickNav | ||
| const deploymentTabs: QuickNavItem[] = [ | ||
| { | ||
| id: "overview", | ||
| label: "Overview", | ||
| href: `${basePath}/deployments/${deploymentId}`, | ||
| }, | ||
| { | ||
| id: "runtime-logs", | ||
| label: "Runtime Logs", | ||
| href: `${basePath}/deployments/${deploymentId}/runtime-logs`, | ||
| }, | ||
| { | ||
| id: "network", | ||
| label: "Network", | ||
| href: `${basePath}/deployments/${deploymentId}/network`, | ||
| }, | ||
| ]; | ||
|
|
||
| return [ | ||
| { | ||
| id: "projects", | ||
| href: `/${workspaceSlug}/projects`, | ||
| children: "Projects", | ||
| shouldRender: true, | ||
| active: false, | ||
| isLast: false, | ||
| }, | ||
| { | ||
| id: "project", | ||
| href: `${basePath}`, | ||
| children: projectId, | ||
| shouldRender: true, | ||
| active: false, | ||
| isLast: false, | ||
| }, | ||
| { | ||
| id: "deployments", | ||
| href: `${basePath}/deployments`, | ||
| children: "Deployments", | ||
| shouldRender: true, | ||
| active: false, | ||
| isLast: false, | ||
| }, | ||
| { | ||
| id: "deployment", | ||
| href: `${basePath}/deployments/${deploymentId}`, | ||
| children: shortenId(deploymentId), | ||
| isIdentifier: true, | ||
| shouldRender: true, | ||
| active: false, | ||
| isLast: false, | ||
| }, | ||
| { | ||
| id: "deployment-tab", | ||
| href: "#", | ||
| noop: true, | ||
| active: true, | ||
| children: | ||
| currentTab === "overview" | ||
| ? "Overview" | ||
| : currentTab === "runtime-logs" | ||
| ? "Runtime Logs" | ||
| : "Network", | ||
| shouldRender: true, | ||
| isLast: true, | ||
| quickNavConfig: { | ||
| items: deploymentTabs, | ||
| activeItemId: currentTab, | ||
| shortcutKey: "T", | ||
| }, | ||
| }, | ||
| ]; | ||
| }, [workspaceSlug, projectId, deploymentId, currentTab]); | ||
| } | ||
14 changes: 14 additions & 0 deletions
14
...pp)/[workspaceSlug]/projects/[projectId]/(overview)/deployments/[deploymentId]/layout.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| import { DeploymentNavbar } from "./(overview)/navigations/deployment-navbar"; | ||
|
|
||
| export default function DeploymentLayout({ | ||
| children, | ||
| }: { | ||
| children: React.ReactNode; | ||
| }) { | ||
| return ( | ||
| <div className="flex flex-col h-full"> | ||
| <DeploymentNavbar /> | ||
| <div className="flex-1 overflow-auto">{children}</div> | ||
| </div> | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.