perf(web): stream dashboard tile events
This commit is contained in:
parent
a66f1fdd57
commit
41fb964ebb
7 changed files with 315 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { extname, normalize } from "node:path";
|
||||
import { handleAgentDashboardRoute } from "./routes/agent-dashboard";
|
||||
import {
|
||||
handleDashboardEventsRoute,
|
||||
handleDashboardRoute,
|
||||
handleDashboardTileRoute,
|
||||
handleDashboardTilesRoute,
|
||||
|
|
@ -32,6 +33,11 @@ export async function handleRequest(request: Request): Promise<Response> {
|
|||
return handleDashboardTilesRoute(request);
|
||||
}
|
||||
|
||||
if (url.pathname === "/api/dashboard/events") {
|
||||
if (request.method !== "GET") return methodNotAllowed(["GET"]);
|
||||
return handleDashboardEventsRoute({ signal: request.signal });
|
||||
}
|
||||
|
||||
if (url.pathname.startsWith("/api/dashboard/tile/")) {
|
||||
if (request.method !== "GET") return methodNotAllowed(["GET"]);
|
||||
return handleDashboardTileRoute(url.pathname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue