-
+
diff --git a/apps/dashboard/src/config/nav.ts b/apps/dashboard/src/config/nav.ts
index ecf9cd12..55ec063d 100644
--- a/apps/dashboard/src/config/nav.ts
+++ b/apps/dashboard/src/config/nav.ts
@@ -2,6 +2,7 @@ import {
Agent,
Chat,
type IconType,
+ Incident,
Monitor,
Notification,
Overview,
@@ -28,6 +29,12 @@ export const NAV = {
icon: Overview,
keywords: ["home", "dashboard"],
},
+ incidents: {
+ label: "Incidents",
+ href: "/incidents",
+ icon: Incident,
+ keywords: ["declare", "outage", "postmortem", "commander"],
+ },
monitors: {
label: "Monitors",
href: "/monitors",
diff --git a/apps/dashboard/src/data/managed-incidents.client.ts b/apps/dashboard/src/data/managed-incidents.client.ts
new file mode 100644
index 00000000..e29a1e38
--- /dev/null
+++ b/apps/dashboard/src/data/managed-incidents.client.ts
@@ -0,0 +1,39 @@
+import type {
+ IncidentSeverity,
+ IncidentStatus,
+} from "@openstatus/db/src/schema/incidents/constants";
+
+export const severityConfig = {
+ critical: {
+ label: "Critical",
+ className: "text-destructive border-destructive/40",
+ },
+ major: { label: "Major", className: "text-warning border-warning/40" },
+ minor: { label: "Minor", className: "text-info border-info/40" },
+} as const satisfies Record<
+ IncidentSeverity,
+ { label: string; className: string }
+>;
+
+export const statusConfig = {
+ open: { label: "Open", className: "text-destructive" },
+ mitigated: { label: "Mitigated", className: "text-warning" },
+ resolved: { label: "Resolved", className: "text-success" },
+ canceled: { label: "Canceled", className: "text-muted-foreground" },
+} as const satisfies Record<
+ IncidentStatus,
+ { label: string; className: string }
+>;
+
+export function personName(
+ person: {
+ name: string | null;
+ firstName: string | null;
+ lastName: string | null;
+ email: string | null;
+ } | null,
+): string | null {
+ if (!person) return null;
+ const full = [person.firstName, person.lastName].filter(Boolean).join(" ");
+ return person.name || full || person.email || null;
+}