Skip to content

Commit 4903e23

Browse files
Merged DataStore into DataCard and DataRow, fixed gaps between collapsed cards, and allowed cards to be collapsed from message name header.
1 parent 8293aba commit 4903e23

15 files changed

Lines changed: 2997 additions & 185 deletions

File tree

pecan/Frontend/pecan-live-dashboard/package-lock.json

Lines changed: 62 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pecan/Frontend/pecan-live-dashboard/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,28 @@
77
"dev": "vite",
88
"build": "tsc -b && vite build",
99
"lint": "eslint .",
10-
"preview": "vite preview"
10+
"preview": "vite preview",
11+
"start": "node production-server.js",
12+
"prod": "npm run build && npm run start"
1113
},
1214
"dependencies": {
1315
"@floating-ui/react": "^0.27.16",
1416
"@tailwindcss/vite": "^4.1.13",
1517
"bootstrap": "^5.3.8",
18+
"candied": "^2.2.0",
1619
"react": "^19.1.1",
1720
"react-bootstrap": "^2.10.10",
1821
"react-dom": "^19.1.1",
1922
"react-router": "^7.9.3",
20-
"tailwindcss": "^4.1.13"
23+
"tailwindcss": "^4.1.13",
24+
"ws": "^8.18.3"
2125
},
2226
"devDependencies": {
2327
"@eslint/js": "^9.36.0",
28+
"@types/node": "^24.7.1",
2429
"@types/react": "^19.1.17",
2530
"@types/react-dom": "^19.1.9",
31+
"@types/ws": "^8.18.1",
2632
"@vitejs/plugin-react": "^5.0.3",
2733
"eslint": "^9.36.0",
2834
"eslint-plugin-react-hooks": "^5.2.0",

pecan/Frontend/pecan-live-dashboard/src/App.tsx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1-
import { useState } from "react";
2-
import "./index.css";
1+
import { useState, useEffect } from "react";
2+
import "./App.css";
33
import Sidebar from "./components/Sidebar";
44
import Hamburger from "./components/HamburgerMenu";
5+
import { processTestMessages } from "./utils/canProcessor";
56
import { Outlet } from "react-router";
7+
import { webSocketService } from "./services/WebSocketService";
68

79
function App() {
810
const [isSidebarOpen, setIsSidebarOpen] = useState<boolean>(false);
911

12+
// Initialize WebSocket service once when app loads
13+
useEffect(() => {
14+
webSocketService.initialize();
15+
16+
// Cleanup on unmount
17+
return () => {
18+
webSocketService.disconnect();
19+
};
20+
}, []); // Empty dependency array = runs once on mount
21+
1022
return (
1123
<div className="h-screen flex flex-row ">
1224
<div className="h-screen w-[60px]">
@@ -21,6 +33,11 @@ function App() {
2133
<main id="main-content" className=" w-100 h-full">
2234
<Outlet />
2335
</main>
36+
37+
<div style={{ position: 'absolute', top: 0, right: 0, width: 200, height: 60, background: '#f0f0f0', borderRadius: 8, boxShadow: '0 2px 8px rgba(0,0,0,0.1)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 0 }}>
38+
</div>
39+
40+
<button onClick={processTestMessages} style={{ position: 'absolute', top: 10, right: 10, zIndex: 1 }}>Process Test Messages</button>
2441
</div>
2542
);
2643
}

0 commit comments

Comments
 (0)