From 4f431d02368736ff5cc2c4d6f8b03384df99149c Mon Sep 17 00:00:00 2001 From: Lou Knauer Date: Wed, 2 Feb 2022 13:59:08 +0100 Subject: [PATCH] Update frontend; Remove debug logging --- frontend | 2 +- graph/schema.resolvers.go | 6 ++++++ metricdata/cc-metric-store.go | 4 ---- server.go | 1 + 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend b/frontend index d453af7..1472411 160000 --- a/frontend +++ b/frontend @@ -1 +1 @@ -Subproject commit d453af71cd90b222ddd54cf0821977c2fb722699 +Subproject commit 147241160cea5e239998fd20a7897ec9694f3bce diff --git a/graph/schema.resolvers.go b/graph/schema.resolvers.go index 56184be..bfe0542 100644 --- a/graph/schema.resolvers.go +++ b/graph/schema.resolvers.go @@ -217,6 +217,12 @@ func (r *queryResolver) NodeMetrics(ctx context.Context, cluster string, partiti partition = new(string) } + if metrics == nil { + for _, mc := range config.GetClusterConfig(cluster).MetricConfig { + metrics = append(metrics, mc.Name) + } + } + data, err := metricdata.LoadNodeData(cluster, *partition, metrics, nodes, scopes, from, to, ctx) if err != nil { return nil, err diff --git a/metricdata/cc-metric-store.go b/metricdata/cc-metric-store.go index b0cfedd..5b9db37 100644 --- a/metricdata/cc-metric-store.go +++ b/metricdata/cc-metric-store.go @@ -6,7 +6,6 @@ import ( "context" "encoding/json" "fmt" - "log" "net/http" "time" @@ -467,7 +466,6 @@ func (ccms *CCMetricStore) LoadNodeData(cluster, partition string, metrics, node if nodes == nil { for _, metric := range metrics { - log.Printf("local-name: %s, remote-name: %s, renamings: %#v", metric, ccms.toRemoteName(metric), ccms.here2there) req.ForAllNodes = append(req.ForAllNodes, ccms.toRemoteName(metric)) } } else { @@ -496,8 +494,6 @@ func (ccms *CCMetricStore) LoadNodeData(cluster, partition string, metrics, node query = req.Queries[i] } - log.Printf("results for %#v: %#v\n", query, res) - metric := ccms.toLocalName(query.Metric) qdata := res[0] if qdata.Error != nil { diff --git a/server.go b/server.go index ab86855..8fd8253 100644 --- a/server.go +++ b/server.go @@ -122,6 +122,7 @@ var programConfig ProgramConfig = ProgramConfig{ "plot_view_showPolarplot": true, "plot_view_showRoofline": true, "plot_view_showStatTable": true, + "system_view_selectedMetric": "cpu_load", }, }