This commit is contained in:
Alex Holliday committed 2026-01-23 21:30:34 +00:00
1 parent 69018a4944
commit c2dece862c
4 files changed
+208 -10

No files matched your search

+30
View File
@@ -1,6 +1,18 @@
import type { Check } from "@/Types/Check";
export type MonitorStatus = "up" | "down" | "initializing";
export const MonitorTypes = [
"http",
"ping",
"pagespeed",
"hardware",
"docker",
"port",
"game",
"unknown",
] as const;
export type MonitorType = (typeof MonitorTypes)[number];
export interface Monitor {
checks: Check[];
createdAt: string;
@@ -18,3 +30,21 @@ export interface Monitor {
__v: number;
_id: string;
}
export interface MonitorWithChecks extends Monitor {
checks: Check[];
uptimePercentage?: number;
}
export interface MonitorsSummary {
totalMonitors: number;
totalUp: number;
totalDown: number;
totalPaused: number;
}
export interface MonitorsWithChecksResponse {
count: number;
monitors: MonitorWithChecks[];
summary: MonitorsSummary;
}
+40
View File
@@ -0,0 +1,40 @@
export interface AuthState {
isLoading: boolean;
authToken: string;
user: string;
success: boolean | null;
msg: string | null;
}
export interface UIState {
monitors: {
rowsPerPage: number;
};
team: {
rowsPerPage: number;
};
maintenance: {
rowsPerPage: number;
};
infrastructure: {
rowsPerPage: number;
};
sidebar: {
collapsed: boolean;
};
mode: "light" | "dark";
showURL: boolean;
greeting: {
index: number;
lastUpdate: string | null;
};
timezone: string;
distributedUptimeEnabled: boolean;
language: string;
starPromptOpen: boolean;
}
export interface RootState {
auth: AuthState;
ui: UIState;
}