mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 02:30:45 +00:00
* 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.
21 lines
535 B
Go
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
|
|
}
|