fix(dashboard): align server logs page to workspace layout and flatten database link in sidebar

This commit is contained in:
2026-06-14 14:42:46 -07:00
parent 54cb481f53
commit 6e0620ea7d
2 changed files with 58 additions and 44 deletions

View File

@@ -85,59 +85,76 @@ export default function LogsPage() {
return ( return (
<div <div
style={{ style={{
minHeight: "100vh", flex: 1,
minHeight: 0,
boxSizing: "border-box",
background: THEME.canvasGradient, background: THEME.canvasGradient,
fontFamily: THEME.font, fontFamily: THEME.font,
padding: "36px 48px", padding: "16px",
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
}} }}
> >
<div <Card
padding={0}
style={{ style={{
maxWidth: 1000, maxWidth: "100%",
margin: "0 auto", margin: "0 auto",
width: "100%", width: "100%",
flex: 1,
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
flex: 1,
minHeight: 0,
}} }}
> >
<PageHeader <div style={{ padding: "20px 24px" }}>
title="Server Logs" <PageHeader
subtitle="Container stdout/stderr for your deployed apps." title="Server Logs"
/> subtitle="Container stdout/stderr for your deployed apps."
/>
</div>
{loading && !anatomy ? ( {loading && !anatomy ? (
<Card> <div
<div style={{
style={{ display: "flex",
display: "flex", alignItems: "center",
alignItems: "center", gap: 8,
gap: 8, color: THEME.mid,
color: THEME.mid, fontSize: "0.875rem",
fontSize: "0.875rem", padding: "24px",
}} }}
> >
<Loader2 size={15} className="animate-spin" /> Loading <Loader2 size={15} className="animate-spin" /> Loading
</div> </div>
</Card>
) : live.length === 0 ? ( ) : live.length === 0 ? (
<EmptyState <div style={{ padding: 24 }}>
icon={<Activity size={22} />} <EmptyState
title="No apps running" icon={<Activity size={22} />}
hint="Once you deploy an app, its runtime logs will appear here." title="No apps running"
/> hint="Once you deploy an app, its runtime logs will appear here."
/>
</div>
) : ( ) : (
<div style={{ display: "flex", gap: 16, flex: 1, minHeight: 0 }}> <div
style={{
display: "flex",
flex: 1,
minHeight: 0,
borderTop: `1px solid ${THEME.borderSoft}`,
}}
>
{/* App Picker Column */} {/* App Picker Column */}
<div <div
style={{ style={{
width: 220, width: 300,
flexShrink: 0, flexShrink: 0,
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
gap: 8, gap: 8,
borderRight: `1px solid ${THEME.borderSoft}`,
padding: "20px",
overflowY: "auto",
}} }}
> >
{live.map((app) => ( {live.map((app) => (
@@ -178,12 +195,16 @@ export default function LogsPage() {
display: "flex", display: "flex",
justifyContent: "space-between", justifyContent: "space-between",
alignItems: "center", alignItems: "center",
marginBottom: 16, padding: "12px 20px",
background: THEME.subtleBg,
borderBottom: `1px solid ${THEME.borderSoft}`,
height: "53px",
boxSizing: "border-box",
}} }}
> >
<span <span
style={{ style={{
fontSize: "0.85rem", fontSize: "0.95rem",
fontWeight: 600, fontWeight: 600,
color: THEME.ink, color: THEME.ink,
}} }}
@@ -207,14 +228,16 @@ export default function LogsPage() {
<Terminal <Terminal
sequence={false} sequence={false}
className="w-full max-w-none shadow-sm flex-1" className="w-full max-w-none shadow-none border-none rounded-none flex-1"
> >
<div <div
style={{ style={{
color: THEME.mid, color: THEME.mid,
fontFamily: fontFamily:
"ui-monospace, SFMono-Regular, Menlo, monospace", "ui-monospace, SFMono-Regular, Menlo, monospace",
fontSize: "0.8rem", fontSize: "13px",
lineHeight: "24px",
padding: "16px 24px",
whiteSpace: "pre-wrap", whiteSpace: "pre-wrap",
wordBreak: "break-all", wordBreak: "break-all",
}} }}
@@ -227,7 +250,7 @@ export default function LogsPage() {
</div> </div>
</div> </div>
)} )}
</div> </Card>
</div> </div>
); );
} }

View File

@@ -72,16 +72,7 @@ export function DashboardSidebar({
{ segment: "plan", label: "Plan Docs", Icon: ClipboardList }, { segment: "plan", label: "Plan Docs", Icon: ClipboardList },
{ segment: "code", label: "Codebase", Icon: Code2 }, { segment: "code", label: "Codebase", Icon: Code2 },
{ segment: "users", label: "Users", Icon: Users }, { segment: "users", label: "Users", Icon: Users },
{ { segment: "data/tables", label: "Databases", Icon: Database },
segment: "data",
label: "Databases",
Icon: Database,
hasChildren: true,
children: databases.map((db) => ({
segment: `data/tables?db=${db.uuid}`,
label: db.name,
})),
},
{ segment: "storage", label: "File Storage", Icon: HardDrive }, { segment: "storage", label: "File Storage", Icon: HardDrive },
{ segment: "services", label: "Live Servers", Icon: Blocks }, { segment: "services", label: "Live Servers", Icon: Blocks },
{ segment: "domains", label: "Custom Domains", Icon: Globe }, { segment: "domains", label: "Custom Domains", Icon: Globe },