feat(api, web): integrate health status management for services and domains
Build, Test, and Push CFDM Docker Image / test (push) Successful in 10m17s
Build, Test, and Push CFDM Docker Image / build-and-push (push) Successful in 1m48s
Build, Test, and Push CFDM Docker Image / update-wiki (push) Successful in 6s
Build, Test, and Push CFDM Docker Image / create-release (push) Has been skipped

- Added health status and latency fields to service and domain schemas, enhancing monitoring capabilities.
- Implemented health status aggregation for services in the API, allowing for improved health checks and reporting.
- Updated web components to display health status using HealthCheckBadge, improving user visibility of service health.
- Refactored service and domain management components to incorporate health status in various views, enhancing overall functionality.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-17 02:55:49 +07:00
co-authored by Cursor
parent 64585ccd47
commit 1f710bbe8b
48 changed files with 4258 additions and 246 deletions
+42
View File
@@ -497,6 +497,13 @@ declare const serviceViewSchema: z.ZodObject<{
target_ip_priorities?: Record<string, number> | undefined;
target_cname?: string | null | undefined;
}>>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>;
declare const serviceGroupViewSchema: z.ZodObject<{
id: z.ZodNumber;
@@ -619,7 +626,21 @@ declare const serviceGroupViewSchema: z.ZodObject<{
target_ip_priorities?: Record<string, number> | undefined;
target_cname?: string | null | undefined;
}>>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>;
declare const serviceGroupsResponseSchema: z.ZodObject<{
groups: z.ZodDefault<z.ZodArray<z.ZodObject<{
@@ -743,7 +764,21 @@ declare const serviceGroupsResponseSchema: z.ZodObject<{
target_ip_priorities?: Record<string, number> | undefined;
target_cname?: string | null | undefined;
}>>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>>>;
ungrouped: z.ZodDefault<z.ZodArray<z.ZodObject<{
id: z.ZodNumber;
@@ -834,6 +869,13 @@ declare const serviceGroupsResponseSchema: z.ZodObject<{
target_ip_priorities?: Record<string, number> | undefined;
target_cname?: string | null | undefined;
}>>>>;
health_status: z.ZodDefault<z.ZodEnum<{
unknown: "unknown";
up: "up";
down: "down";
degraded: "degraded";
}>>;
health_latency_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
declare const domainSchema: z.ZodObject<{
+6 -2
View File
@@ -257,10 +257,14 @@ var serviceViewSchema = serviceSchema.extend({
subdomain: z.string().default(""),
enabled: z.coerce.boolean().default(false),
ips: z.array(z.string()).default([]),
domains: z.array(serviceDomainBindingSchema).default([])
domains: z.array(serviceDomainBindingSchema).default([]),
health_status: ipHealthStateSchema.default("unknown"),
health_latency_ms: z.number().nullable().default(null)
});
var serviceGroupViewSchema = serviceGroupSchema.extend({
services: z.array(serviceViewSchema).default([])
services: z.array(serviceViewSchema).default([]),
health_status: ipHealthStateSchema.default("unknown"),
health_latency_ms: z.number().nullable().default(null)
});
var serviceGroupsResponseSchema = z.object({
groups: z.array(serviceGroupViewSchema).default([]),