mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +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
21 lines
517 B
Go
21 lines
517 B
Go
package detailed
|
|
|
|
import (
|
|
"github.com/weaveworks/scope/report"
|
|
)
|
|
|
|
// NodeMetrics 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 NodeMetrics(r report.Report, n report.Node) []report.MetricRow {
|
|
if _, ok := n.Counters.Lookup(n.Topology); ok {
|
|
// This is a group of nodes, so no metrics!
|
|
return nil
|
|
}
|
|
|
|
topology, ok := r.Topology(n.Topology)
|
|
if !ok {
|
|
return nil
|
|
}
|
|
return topology.MetricTemplates.MetricRows(n)
|
|
}
|