feat(nodes): показывать версию PVE, рабочие области и аптайм на карточках узлов
All checks were successful
Backend Tests / pytest (Python 3.12) (push) Successful in 57s
Deploy to Production / Trigger production update (push) Successful in 8s

Карточки на странице «Узлы» дополнены важной информацией:
- версия Proxmox VE (чип «PVE x.y.z»);
- число нод в кластере (для кластерных серверов);
- аптайм узла;
- чипы рабочих областей, в которых состоит сервер.

Бэкенд: эндпоинт /api/{id}/nodes отдаёт version; ответ серверов
дополнен полями cluster_name и workspaces (ServerWorkspaceBrief).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
markmorado
2026-07-06 18:37:28 +05:00
parent 476b73b411
commit fc42e8fc19
8 changed files with 145 additions and 9 deletions

View File

@@ -34,7 +34,7 @@ export function useServer(serverId: number) {
export function useNodes(serverId: number) {
return useQuery({
queryKey: nodeKeys.nodes(serverId),
queryFn: () => apiClient.get<{ nodes: ProxmoxNode[]; cluster_id: string }>(`/proxmox/api/${serverId}/nodes`),
queryFn: () => apiClient.get<{ nodes: ProxmoxNode[]; cluster_id: string; version?: string | null }>(`/proxmox/api/${serverId}/nodes`),
enabled: serverId > 0,
refetchInterval: 30000,
});