update editor

This commit is contained in:
2025-12-07 01:34:42 +07:00
parent d372104760
commit 09b04de9c3
8 changed files with 209 additions and 109 deletions
+14 -4
View File
@@ -204,11 +204,21 @@ func (s *Services) GetGraph(ctx context.Context, req *proto.GetGraphReq) (*proto
graph := s.storyService.GetGraph(ctx)
nodes := make([]*proto.GetGraphRsp_Node, 0, len(graph.Nodes))
for _, node := range graph.Nodes {
applications := make([]*proto.GetGraphRsp_Application, 0, len(node.Applications))
for _, application := range node.Applications {
applications = append(
applications,
&proto.GetGraphRsp_Application{
Name: application.Name,
},
)
}
nodes = append(nodes, &proto.GetGraphRsp_Node{
Id: node.ID,
Label: node.Label,
Name: node.Name,
Text: node.Text,
Id: node.ID,
Label: node.Label,
Name: node.Name,
Text: node.Text,
Applications: applications,
})
}
edges := make([]*proto.GetGraphRsp_Edge, 0, len(graph.Edges))