feat: Add error message and details columns
Adds error_message and details columns to the Incident History table in the service detail page.
This commit is contained in:
@@ -2,22 +2,36 @@
|
||||
export interface Service {
|
||||
id: string;
|
||||
name: string;
|
||||
url: string;
|
||||
host?: string; // Add host field for PING and TCP services
|
||||
port?: number; // Add port field for TCP services
|
||||
type: "HTTP" | "HTTPS" | "TCP" | "DNS" | "PING" | "HTTP" | "http" | "https" | "tcp" | "dns" | "ping" | "smtp" | "icmp";
|
||||
status: "up" | "down" | "paused" | "pending" | "warning";
|
||||
url?: string;
|
||||
host?: string; // Make host optional since it's not always required
|
||||
port?: number;
|
||||
domain?: string; // Add domain field for DNS services
|
||||
type: "http" | "https" | "tcp" | "ping" | "icmp" | "dns";
|
||||
status: "up" | "down" | "paused" | "warning";
|
||||
responseTime: number;
|
||||
uptime: number;
|
||||
uptime?: number;
|
||||
lastChecked: string;
|
||||
interval: number;
|
||||
timeout?: number;
|
||||
retries: number;
|
||||
notificationChannel?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
notification_channel?: string;
|
||||
notificationChannel?: string; // Keep for backward compatibility
|
||||
alertTemplate?: string;
|
||||
muteAlerts?: boolean; // Keep this to avoid breaking existing code
|
||||
alerts?: "muted" | "unmuted"; // Make sure alerts is properly typed as union
|
||||
muteAlerts?: boolean; // Keep this to avoid breaking existing code
|
||||
muteChangedAt?: string;
|
||||
domain?: string; // Add domain field for DNS services
|
||||
follow_redirects?: boolean;
|
||||
verify_ssl?: boolean;
|
||||
expected_status_code?: number;
|
||||
keyword_check?: string;
|
||||
keyword_check_type?: "contains" | "not_contains";
|
||||
dns_record_type?: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS";
|
||||
dns_expected_value?: string;
|
||||
headers?: string;
|
||||
body?: string;
|
||||
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
||||
}
|
||||
|
||||
export interface CreateServiceParams {
|
||||
@@ -34,11 +48,54 @@ export interface CreateServiceParams {
|
||||
}
|
||||
|
||||
export interface UptimeData {
|
||||
date?: string;
|
||||
uptime?: number;
|
||||
id?: string;
|
||||
serviceId?: string;
|
||||
service_id?: string; // Make service_id optional for backward compatibility
|
||||
serviceId?: string; // Keep for backward compatibility
|
||||
timestamp: string;
|
||||
status: "up" | "down" | "paused" | "pending" | "warning";
|
||||
status: "up" | "down" | "paused" | "warning";
|
||||
responseTime: number;
|
||||
error_message?: string;
|
||||
details?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
date?: string; // Keep for backward compatibility
|
||||
uptime?: number; // Keep for backward compatibility
|
||||
}
|
||||
|
||||
export interface PingData {
|
||||
id?: string;
|
||||
service_id: string;
|
||||
timestamp: string;
|
||||
status: "up" | "down" | "paused" | "warning";
|
||||
responseTime: number;
|
||||
packet_loss?: number;
|
||||
error_message?: string;
|
||||
details?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
}
|
||||
|
||||
export interface DNSData {
|
||||
id?: string;
|
||||
service_id: string;
|
||||
timestamp: string;
|
||||
status: "up" | "down" | "paused" | "warning";
|
||||
responseTime: number;
|
||||
resolved_ip?: string;
|
||||
error_message?: string;
|
||||
details?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
}
|
||||
|
||||
export interface TCPData {
|
||||
id?: string;
|
||||
service_id: string;
|
||||
timestamp: string;
|
||||
status: "up" | "down" | "paused" | "warning";
|
||||
responseTime: number;
|
||||
error_message?: string;
|
||||
details?: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user