95 lines
2.5 KiB
TypeScript
95 lines
2.5 KiB
TypeScript
export interface IServiceStatus {
|
|
id: string;
|
|
name: string;
|
|
displayName: string;
|
|
description?: string;
|
|
currentStatus: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance';
|
|
lastChecked: number; // timestamp
|
|
uptime30d: number; // percentage
|
|
uptime90d: number; // percentage
|
|
responseTime: number; // milliseconds
|
|
category?: string;
|
|
dependencies?: string[];
|
|
selected?: boolean;
|
|
}
|
|
|
|
export interface IStatusHistoryPoint {
|
|
timestamp: number;
|
|
status: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance';
|
|
responseTime?: number;
|
|
errorRate?: number;
|
|
}
|
|
|
|
export interface IIncidentUpdate {
|
|
id: string;
|
|
timestamp: number;
|
|
status: 'investigating' | 'identified' | 'monitoring' | 'resolved' | 'postmortem';
|
|
message: string;
|
|
author?: string;
|
|
}
|
|
|
|
export interface IIncidentDetails {
|
|
id: string;
|
|
title: string;
|
|
status: 'investigating' | 'identified' | 'monitoring' | 'resolved' | 'postmortem';
|
|
severity: 'critical' | 'major' | 'minor' | 'maintenance';
|
|
affectedServices: string[];
|
|
startTime: number;
|
|
endTime?: number;
|
|
updates: IIncidentUpdate[];
|
|
impact: string;
|
|
rootCause?: string;
|
|
resolution?: string;
|
|
}
|
|
|
|
export interface IUptimeDay {
|
|
date: string; // YYYY-MM-DD
|
|
uptime: number; // percentage
|
|
incidents: number;
|
|
totalDowntime: number; // minutes
|
|
status: 'operational' | 'degraded' | 'partial_outage' | 'major_outage';
|
|
}
|
|
|
|
export interface IMonthlyUptime {
|
|
month: string; // YYYY-MM
|
|
days: IUptimeDay[];
|
|
overallUptime: number; // percentage
|
|
totalIncidents: number;
|
|
}
|
|
|
|
export interface IOverallStatus {
|
|
status: 'operational' | 'degraded' | 'partial_outage' | 'major_outage' | 'maintenance';
|
|
message: string;
|
|
lastUpdated: number;
|
|
affectedServices: number;
|
|
totalServices: number;
|
|
}
|
|
|
|
export interface IStatusPageConfig {
|
|
apiEndpoint?: string;
|
|
refreshInterval?: number; // milliseconds
|
|
timeZone?: string;
|
|
dateFormat?: string;
|
|
enableWebSocket?: boolean;
|
|
enableNotifications?: boolean;
|
|
theme?: 'light' | 'dark' | 'auto';
|
|
language?: string;
|
|
showHistoricalDays?: number;
|
|
whitelabel?: boolean;
|
|
companyName?: string;
|
|
companyLogo?: string;
|
|
supportEmail?: string;
|
|
statusPageUrl?: string;
|
|
legalUrl?: string;
|
|
}
|
|
|
|
export interface ISubscription {
|
|
email?: string;
|
|
phone?: string;
|
|
webhook?: string;
|
|
services: string[];
|
|
severityFilter: ('critical' | 'major' | 'minor' | 'maintenance')[];
|
|
}
|
|
|
|
// Re-export the incident interface from @uptime.link/interfaces if needed
|
|
// Note: The IIncident interface is imported in the incidents component directly from plugins
|