Skip to content

Commit 48e15cd

Browse files
committed
change layout and compose up openwebui
Signed-off-by: JaredforReal <[email protected]>
1 parent 1b0c0b3 commit 48e15cd

File tree

4 files changed

+72
-41
lines changed

4 files changed

+72
-41
lines changed

dashboard/frontend/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const App: React.FC = () => {
6969
<BrowserRouter>
7070
<Layout>
7171
<Routes>
72-
<Route path="/" element={<Navigate to="/monitoring" replace />} />
72+
<Route path="/" element={<Navigate to="/playground" replace />} />
7373
<Route path="/monitoring" element={<MonitoringPage />} />
7474
<Route path="/config" element={<ConfigPage />} />
7575
<Route path="/playground" element={<PlaygroundPage />} />

dashboard/frontend/src/components/Layout.module.css

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,53 @@
11
.container {
22
display: flex;
3-
flex-direction: column;
43
height: 100vh;
54
overflow: hidden;
5+
background-color: var(--color-bg);
66
}
77

8-
.header {
9-
display: flex;
10-
align-items: center;
11-
justify-content: space-between;
12-
padding: 0.75rem 1.5rem;
8+
.sidebar {
9+
width: 240px;
1310
background-color: var(--color-bg-secondary);
14-
border-bottom: 1px solid var(--color-border);
15-
box-shadow: 0 1px 3px var(--color-shadow);
16-
flex-shrink: 0;
17-
height: 64px;
11+
border-right: 1px solid var(--color-border);
12+
display: flex;
13+
flex-direction: column;
14+
padding: 1rem 0.75rem;
15+
gap: 1rem;
1816
}
1917

20-
.headerLeft {
18+
.brand {
2119
display: flex;
2220
align-items: center;
23-
gap: 0.75rem;
21+
gap: 0.5rem;
22+
padding: 0 0.5rem;
2423
}
2524

2625
.logo {
27-
width: 32px;
28-
height: 32px;
26+
width: 28px;
27+
height: 28px;
2928
object-fit: contain;
3029
}
3130

32-
.title {
33-
font-size: 1.125rem;
31+
.brandText {
32+
font-size: 0.95rem;
3433
font-weight: 600;
3534
color: var(--color-text);
36-
margin: 0;
3735
}
3836

3937
.nav {
4038
display: flex;
41-
gap: 0.5rem;
39+
flex-direction: column;
40+
gap: 0.25rem;
4241
}
4342

4443
.navLink {
4544
display: flex;
4645
align-items: center;
47-
gap: 0.375rem;
48-
padding: 0.5rem 1rem;
46+
gap: 0.5rem;
47+
padding: 0.5rem 0.625rem;
4948
border-radius: var(--radius-md);
5049
color: var(--color-text-secondary);
51-
font-size: 0.875rem;
50+
font-size: 0.9rem;
5251
font-weight: 500;
5352
transition: all var(--transition-fast);
5453
}
@@ -71,6 +70,17 @@
7170
.navIcon {
7271
font-size: 1rem;
7372
line-height: 1;
73+
width: 1.25rem;
74+
text-align: center;
75+
}
76+
77+
.navText {
78+
white-space: nowrap;
79+
}
80+
81+
.sidebarFooter {
82+
margin-top: auto;
83+
padding: 0 0.5rem;
7484
}
7585

7686
.themeToggle {

dashboard/frontend/src/components/Layout.tsx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
2727

2828
return (
2929
<div className={styles.container}>
30-
<header className={styles.header}>
31-
<div className={styles.headerLeft}>
30+
<aside className={styles.sidebar}>
31+
<div className={styles.brand}>
3232
<img src="/vllm.png" alt="vLLM" className={styles.logo} />
33-
<h1 className={styles.title}>Semantic Router Dashboard</h1>
33+
<span className={styles.brandText}>Semantic Router</span>
3434
</div>
3535
<nav className={styles.nav}>
3636
<NavLink
37-
to="/monitoring"
37+
to="/playground"
3838
className={({ isActive }) =>
3939
isActive ? `${styles.navLink} ${styles.navLinkActive}` : styles.navLink
4040
}
4141
>
42-
<span className={styles.navIcon}>📊</span>
43-
Monitoring
42+
<span className={styles.navIcon}>🎮</span>
43+
<span className={styles.navText}>Playground</span>
4444
</NavLink>
4545
<NavLink
4646
to="/config"
@@ -49,26 +49,29 @@ const Layout: React.FC<LayoutProps> = ({ children }) => {
4949
}
5050
>
5151
<span className={styles.navIcon}>⚙️</span>
52-
Config
52+
<span className={styles.navText}>Configuration</span>
5353
</NavLink>
5454
<NavLink
55-
to="/playground"
55+
to="/monitoring"
5656
className={({ isActive }) =>
5757
isActive ? `${styles.navLink} ${styles.navLinkActive}` : styles.navLink
5858
}
5959
>
60-
<span className={styles.navIcon}>🎮</span>
61-
Playground
60+
<span className={styles.navIcon}>📊</span>
61+
<span className={styles.navText}>Monitoring</span>
6262
</NavLink>
6363
</nav>
64-
<button
65-
className={styles.themeToggle}
66-
onClick={toggleTheme}
67-
aria-label="Toggle theme"
68-
>
69-
{theme === 'light' ? '🌙' : '☀️'}
70-
</button>
71-
</header>
64+
<div className={styles.sidebarFooter}>
65+
<button
66+
className={styles.themeToggle}
67+
onClick={toggleTheme}
68+
aria-label="Toggle theme"
69+
title="Toggle theme"
70+
>
71+
{theme === 'light' ? '🌙' : '☀️'}
72+
</button>
73+
</div>
74+
</aside>
7275
<main className={styles.main}>{children}</main>
7376
</div>
7477
)

deploy/docker-compose/docker-compose.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,21 @@ services:
114114
depends_on:
115115
- prometheus
116116

117+
# Open WebUI (optional, used by Dashboard Playground)
118+
openwebui:
119+
image: ghcr.io/open-webui/open-webui:main
120+
container_name: openwebui
121+
# Expose externally only if you want to access Open WebUI directly
122+
# ports:
123+
# - "3001:8080"
124+
environment:
125+
# Add any Open WebUI env here if needed (auth, providers, etc.)
126+
- WEBUI_NAME=Open WebUI
127+
volumes:
128+
- openwebui-data:/app/backend/data
129+
networks:
130+
- semantic-network
131+
117132
# LLM Katan service for testing
118133
llm-katan:
119134
build:
@@ -143,7 +158,7 @@ services:
143158
- TARGET_PROMETHEUS_URL=http://prometheus:9090
144159
- TARGET_ROUTER_API_URL=http://semantic-router:8080
145160
- TARGET_ROUTER_METRICS_URL=http://semantic-router:9190/metrics
146-
- TARGET_OPENWEBUI_URL=${TARGET_OPENWEBUI_URL:-}
161+
- TARGET_OPENWEBUI_URL=http://openwebui:8080
147162
ports:
148163
- "8700:8700"
149164
networks:
@@ -155,6 +170,8 @@ services:
155170
condition: service_started
156171
prometheus:
157172
condition: service_started
173+
openwebui:
174+
condition: service_started
158175
healthcheck:
159176
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8700/healthz"]
160177
interval: 10s
@@ -174,3 +191,4 @@ volumes:
174191
driver: local
175192
prometheus-data:
176193
grafana-data:
194+
openwebui-data:

0 commit comments

Comments
 (0)