Files
weave-scope/render/detailed/tables.go
Tom Wilkie 9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00

21 lines
535 B
Go

package detailed
import (
"github.com/weaveworks/scope/report"
)
// NodeTables produces a list of tables (to be consumed directly by the UI) based
// on the report and the node. It uses the report to get the templates for the node's
// topology.
func NodeTables(r report.Report, n report.Node) []report.Table {
if _, ok := n.Counters.Lookup(n.Topology); ok {
// This is a group of nodes, so no tables!
return nil
}
if topology, ok := r.Topology(n.Topology); ok {
return topology.TableTemplates.Tables(n)
}
return nil
}