refactor(servers): unify connection status badges
Some checks failed
Backend Tests / pytest (Python 3.12) (push) Has been cancelled
Deploy to Production / Trigger production update (push) Has been cancelled

Extract ServerStatusBadge so every server list renders the auth-error
state identically instead of repeating the online/offline ternary, and
expose last_error_kind from the cluster topology and user-assignment
endpoints, which build their payloads by hand and so did not inherit it
from the server schema.
This commit is contained in:
markmorado
2026-07-24 05:04:45 +05:00
parent ebc692a324
commit e10f9a2a03
9 changed files with 40 additions and 45 deletions

View File

@@ -12,6 +12,7 @@ export interface ClusterServerEntry {
ip_address: string;
port: number;
is_online: boolean;
last_error_kind?: 'auth' | 'connection' | null;
cluster_name: string | null;
}

View File

@@ -77,6 +77,7 @@ export interface ServerAssignment {
name: string;
ip_address: string;
is_online: boolean;
last_error_kind?: 'auth' | 'connection' | null;
workspaces: { id: number; name: string }[];
compatible: boolean;
assigned: boolean;