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
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:
Vendored
+42
@@ -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<{
|
||||
|
||||
Vendored
+6
-2
@@ -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([]),
|
||||
|
||||
@@ -132,10 +132,14 @@ export const serviceViewSchema = serviceSchema.extend({
|
||||
enabled: z.coerce.boolean().default(false),
|
||||
ips: z.array(z.string()).default([]),
|
||||
domains: z.array(serviceDomainBindingSchema).default([]),
|
||||
health_status: ipHealthStateSchema.default('unknown'),
|
||||
health_latency_ms: z.number().nullable().default(null),
|
||||
})
|
||||
|
||||
export const serviceGroupViewSchema = serviceGroupSchema.extend({
|
||||
services: z.array(serviceViewSchema).default([]),
|
||||
health_status: ipHealthStateSchema.default('unknown'),
|
||||
health_latency_ms: z.number().nullable().default(null),
|
||||
})
|
||||
|
||||
export const serviceGroupsResponseSchema = z.object({
|
||||
|
||||
@@ -27,6 +27,8 @@ export interface ServiceGroup {
|
||||
|
||||
export interface ServiceGroupView extends ServiceGroup {
|
||||
services: ServiceView[];
|
||||
health_status: IpHealthState;
|
||||
health_latency_ms: number | null;
|
||||
}
|
||||
|
||||
export interface ServiceGroupsResponse {
|
||||
@@ -185,6 +187,8 @@ export interface ServiceView {
|
||||
updated_at: string;
|
||||
ips: string[];
|
||||
domains: ServiceDomainBindingView[];
|
||||
health_status: IpHealthState;
|
||||
health_latency_ms: number | null;
|
||||
}
|
||||
|
||||
export interface GroupWithStats extends Group {
|
||||
|
||||
Reference in New Issue
Block a user