18 lines
573 B
Go
18 lines
573 B
Go
package service
|
|
|
|
// GetNodeTreeView is the node-list read path: every node row as a view,
|
|
// annotated with its agent binding and the bound agent's telemetry. All
|
|
// nodes are direct agent nodes — the transitive sub-node projections of
|
|
// the panel-to-panel era are gone, so the per-node counts computed by
|
|
// GetAll are the final ones.
|
|
func (s *NodeService) GetNodeTreeView() ([]*NodeView, error) {
|
|
nodes, err := s.GetAll()
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
views := toNodeViews(nodes)
|
|
annotateNodeTypes(views)
|
|
annotateAgentTelemetry(views)
|
|
return views, nil
|
|
}
|