Files
Dashboard-CAS/frontend/src/main.tsx
I. Alcaraz Salazar 81bcdcd696 feat: add admin panel at /admin for full dashboard configuration
- Backend: ConfigManager write methods (atomic YAML save), admin CRUD
  router for settings (display/odoo/refresh) and nodes, WS broadcast
  on config changes, fix nmap scan blocking event loop with to_thread
- Frontend: admin UI with tab navigation, overview dashboard, node
  CRUD table with modal form, Odoo/display/refresh settings pages,
  typed API wrappers, active views filtering, config_changed WS handler
- Infra: nginx no-cache headers for HTML, cache-forever for hashed assets
- Fixes: WebSocket reconnect loop (ref pattern), rotation index OOB
  when views shrink, mutable node list cache

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 02:34:05 +00:00

18 lines
433 B
TypeScript

import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
import App from "./App";
import { AdminApp } from "./pages/admin/AdminApp";
const isAdmin = window.location.pathname.startsWith("/admin");
if (isAdmin) {
document.title = "Admin - TV Dashboard";
}
createRoot(document.getElementById("root")!).render(
<StrictMode>
{isAdmin ? <AdminApp /> : <App />}
</StrictMode>
);