| import type { ComponentType } from "react" |
| import type { LucideIcon } from "lucide-react" |
| import { Crosshair, Film, ListChecks, Radio, SlidersHorizontal } from "lucide-react" |
| import { DetectorPanel } from "./detector/DetectorPanel" |
| import { PreviewPanel } from "./preview/PreviewPanel" |
| import { RuleStudioPanel } from "./rules/RuleStudioPanel" |
| import { ActivityPanel } from "./activity/ActivityPanel" |
| import { SettingsPanel } from "./settings/SettingsPanel" |
|
|
| export type SectionId = "test" | "automation" | "settings" |
|
|
| |
| export interface DashboardSection { |
| id: SectionId |
| label: string |
| hint: string |
| order: number |
| } |
|
|
| export const SECTIONS: DashboardSection[] = [ |
| { id: "test", label: "Test", hint: "detect 路 replay 路 fired actions", order: 1 }, |
| { id: "automation", label: "Automations & Firings", hint: "compile 路 validate 路 log", order: 2 }, |
| { id: "settings", label: "Settings", hint: "dispatch 路 compiler", order: 3 }, |
| ] |
|
|
| |
| |
| |
| |
| |
| export interface DashboardModule { |
| id: string |
| index: string |
| eyebrow: string |
| title: string |
| icon: LucideIcon |
| section: SectionId |
| order: number |
| span: number |
| Panel: ComponentType |
| } |
|
|
| export const MODULES: DashboardModule[] = [ |
| { |
| id: "detector", |
| index: "01", |
| eyebrow: "input", |
| title: "Detector", |
| icon: Crosshair, |
| section: "test", |
| order: 1, |
| span: 4, |
| Panel: DetectorPanel, |
| }, |
| { |
| id: "replay", |
| index: "02", |
| eyebrow: "output", |
| title: "Annotated Replay", |
| icon: Film, |
| section: "test", |
| order: 2, |
| span: 8, |
| Panel: PreviewPanel, |
| }, |
| { |
| id: "rules", |
| index: "03", |
| eyebrow: "automation", |
| title: "Rule Studio", |
| icon: ListChecks, |
| section: "automation", |
| order: 1, |
| span: 5, |
| Panel: RuleStudioPanel, |
| }, |
| { |
| id: "activity", |
| index: "04", |
| eyebrow: "telemetry", |
| title: "Activity & Firings", |
| icon: Radio, |
| section: "automation", |
| order: 2, |
| span: 7, |
| Panel: ActivityPanel, |
| }, |
| { |
| id: "dispatch", |
| index: "05", |
| eyebrow: "config", |
| title: "Dispatch & Compiler", |
| icon: SlidersHorizontal, |
| section: "settings", |
| order: 1, |
| span: 6, |
| Panel: SettingsPanel, |
| }, |
| ] |
|
|
| export function modulesForSection(section: SectionId): DashboardModule[] { |
| return MODULES.filter((m) => m.section === section).sort((a, b) => a.order - b.order) |
| } |
|
|
| |
| export const SPAN_CLASS: Record<number, string> = { |
| 4: "lg:col-span-4", |
| 5: "lg:col-span-5", |
| 6: "lg:col-span-6", |
| 7: "lg:col-span-7", |
| 8: "lg:col-span-8", |
| 12: "lg:col-span-12", |
| } |
|
|