refactor(servers): unify connection status badges
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user