Adds GET /api/clouds/:cloud/diagnostics and a Diagnostics page in the General nav. The report combines, in one call: - runtime reachability, latency, version and edition from /_floci/health - every service the runtime emulates, with the console pages backed by it - per-console-service probes (the existing status check) - EC2 instance containers from /_floci/diagnose - console uptime, sign-in mode and active session count Each source is optional, so a down runtime still yields a partial report.
This commit is contained in:
@@ -77,6 +77,48 @@ export interface CloudServiceStatus {
|
||||
errorCode: string | null
|
||||
}
|
||||
|
||||
/** One service as the runtime itself reports it, which can be far more than the console covers. */
|
||||
export interface EmulatedServiceStatus {
|
||||
/** The runtime's own service id, e.g. `states` or `elasticloadbalancing`. */
|
||||
name: string
|
||||
state: string
|
||||
/** Console pages backed by this service; empty when the console has none yet. */
|
||||
consolePages: Array<{service: CloudServiceType; displayName: string; route: string}>
|
||||
}
|
||||
|
||||
/** A container the runtime started to back a resource, as reported by its diagnostics. */
|
||||
export interface RuntimeContainer {
|
||||
kind: 'ec2-instance'
|
||||
resourceId: string
|
||||
status: string | null
|
||||
sshHost: string | null
|
||||
sshPort: number | null
|
||||
}
|
||||
|
||||
export interface RuntimeDiagnostics {
|
||||
cloud: CloudProvider
|
||||
checkedAt: string
|
||||
runtime: {
|
||||
status: RuntimeReachability
|
||||
endpoint: string | null
|
||||
latencyMs: number | null
|
||||
error: string | null
|
||||
version: string | null
|
||||
edition: string | null
|
||||
}
|
||||
/** Null when the runtime does not publish a per-service list. */
|
||||
emulatedServices: EmulatedServiceStatus[] | null
|
||||
consoleServices: CloudServiceStatus[]
|
||||
/** Null when the runtime does not publish container diagnostics. */
|
||||
containers: RuntimeContainer[] | null
|
||||
console: {
|
||||
startedAt: string
|
||||
uptimeSeconds: number
|
||||
authMode: 'local' | 'oidc'
|
||||
activeSessions: number
|
||||
}
|
||||
}
|
||||
|
||||
export type FieldType = 'text' | 'textarea' | 'password' | 'select' | 'file' | 'key-value'
|
||||
|
||||
export interface FieldSchema {
|
||||
|
||||
Reference in New Issue
Block a user