feat
ci-front / build (push) Successful in 2m26s

This commit is contained in:
2026-04-04 19:49:37 +03:00
parent 69ff617c30
commit c6a9907822
7 changed files with 171 additions and 123 deletions
+13 -8
View File
@@ -1,5 +1,10 @@
import { useMemo } from "react";
import { Graph, type GraphData, type GraphNode, type GraphLink } from "@/modules/graph";
import {
Graph,
type GraphData,
type GraphNode,
type GraphLink,
} from "@/modules/graph";
import { useAgentStore } from "@/app/providers/layout/store/agent.store";
const buildGraphFromAgents = (): GraphData => {
@@ -10,26 +15,26 @@ const buildGraphFromAgents = (): GraphData => {
agents.forEach((agent) => {
// Агент как узел
nodes.push({
id: agent.name,
name: agent.name,
id: agent.label,
name: agent.label,
type: "agent",
val: 8,
description: `Агент: ${agent.name}`,
description: `Агент: ${agent.label}`,
});
// Сервисы агента как узлы + связи
agent.services.forEach((service) => {
const serviceId = `${agent.name}-${service.name}`;
const serviceId = `${agent.label}-${service}`;
nodes.push({
id: serviceId,
name: service.name,
name: service,
type: "service",
val: 12,
description: `Сервис: ${service.name} (${service.status})`,
description: `Сервис: ${service}`,
});
links.push({
source: agent.name,
source: agent.label,
target: serviceId,
type: "hosts",
});