mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Squash of: * Include plugins in the report * show plugin list in the UI * moving metric and metadata templates into the probe reports * update js for prime -> priority * added retry to plugin handshake * added iowait plugin * review feedback * plugin documentation
20 lines
525 B
Go
20 lines
525 B
Go
package detailed
|
|
|
|
import (
|
|
"github.com/weaveworks/scope/report"
|
|
)
|
|
|
|
// NodeMetadata produces a table (to be consumed directly by the UI) based on
|
|
// an a report.Node, which is (hopefully) a node in one of our topologies.
|
|
func NodeMetadata(r report.Report, n report.Node) []report.MetadataRow {
|
|
if _, ok := n.Counters.Lookup(n.Topology); ok {
|
|
// This is a group of nodes, so no metadata!
|
|
return nil
|
|
}
|
|
|
|
if topology, ok := r.Topology(n.Topology); ok {
|
|
return topology.MetadataTemplates.MetadataRows(n)
|
|
}
|
|
return nil
|
|
}
|