Skip to content

Commit e263698

Browse files
authored
Merge pull request #59 from oslabs-beta/user0824/feat/dashboard
User0824/feat/dashboard
2 parents d365435 + 2ca30d6 commit e263698

30 files changed

+1946
-834
lines changed

client/package-lock.json

Lines changed: 145 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"class-variance-authority": "^0.7.1",
3131
"clsx": "^2.1.1",
3232
"cmdk": "^1.1.1",
33+
"framer-motion": "^12.16.0",
3334
"lucide-react": "^0.511.0",
3435
"motion": "^12.15.0",
3536
"react": "^18.3.1",
@@ -38,6 +39,7 @@
3839
"react-router-dom": "^7.6.2",
3940
"react-simple-typewriter": "^5.0.1",
4041
"recharts": "^2.15.3",
42+
"socket.io-client": "^4.8.1",
4143
"tailwind-merge": "^3.3.0"
4244
},
4345
"devDependencies": {

client/src/App.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const App = () => {
3838

3939
return (
4040
<div
41-
className="duration-800 scrollbar-hide min-h-screen transition-colors"
41+
className="duration-800 min-h-screen transition-colors"
4242
style={{
4343
backgroundColor: 'var(--background)',
4444
color: 'var(--foreground)',
@@ -76,19 +76,19 @@ const App = () => {
7676
{/* CONDITIONAL CONTENT WITH ROUTES */}
7777
<SignedOut>
7878
<div className="pt-16">
79-
{' '}
80-
{/* Add top padding for header */}
8179
<Welcome />
8280
</div>
8381
</SignedOut>
8482
<SignedIn>
85-
<div className="pb-24 pt-16">
86-
{' '}
87-
{/* Add top padding for header and bottom padding for nav */}
88-
<Routes>
89-
<Route path="/" element={<Dashboard />} />
90-
<Route path="/historical" element={<HistoricalData />} />
91-
</Routes>
83+
{/* Create a fixed viewport container that accounts for header and nav */}
84+
<div className="fixed bottom-0 left-0 right-0 top-16 flex flex-col">
85+
{/* Scrollable content area that stops at navigation bar */}
86+
<div className="flex-1 overflow-y-auto pb-24">
87+
<Routes>
88+
<Route path="/" element={<Dashboard />} />
89+
<Route path="/historical" element={<HistoricalData />} />
90+
</Routes>
91+
</div>
9292
</div>
9393
<NavigationBar />
9494
</SignedIn>

client/src/components/Bytes.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
'use client';
1+
// ----------------------------------------------------------
2+
// >> DISK I/O OPERATIONS AND NETWORK TRAFFIC << //
3+
// ----------------------------------------------------------
24

35
import * as React from 'react';
46
import { Area, AreaChart, CartesianGrid, XAxis, YAxis } from 'recharts';
@@ -263,10 +265,7 @@ const Bytes: React.FC = () => {
263265
<Card className="pt-0">
264266
<CardHeader className="flex items-center gap-2 space-y-0 border-b py-5 sm:flex-row">
265267
<div className="grid flex-1 gap-1">
266-
<CardTitle>Historical GKE Metrics</CardTitle>
267-
<CardDescription>
268-
Disk I/O Operations and Network Traffic
269-
</CardDescription>
268+
<CardTitle>Disk I/O Operations and Network Traffic</CardTitle>
270269
</div>
271270
<Select value={range} onValueChange={(v) => setRange(v as Range)}>
272271
<SelectTrigger

client/src/components/Dashboard.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33
// ----------------------------------------------------------
44

55
import React from 'react';
6-
import Metrics from './Metrics';
6+
import EnhancedMetrics from './EnhancedMetrics';
77

88
const Dashboard: React.FC = () => {
99
return (
10-
<div className="flex flex-col">
11-
<Metrics />
10+
<div className="mx-10 mt-2 flex max-w-full flex-col">
11+
{/* Remove height constraints and let it flow naturally in the scroll container */}
12+
<div className="space-y-3">
13+
<EnhancedMetrics />
14+
</div>
1215
</div>
1316
);
1417
};

0 commit comments

Comments
 (0)