From 68a839bf1c1bdbc7370ab59ba58623bf8c7c3865 Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Thu, 30 Mar 2023 15:23:31 +0200 Subject: [PATCH] Remove comments --- internal/graph/schema.resolvers.go | 6 +----- pkg/archive/nodelist.go | 10 ---------- web/frontend/src/Metric.svelte | 12 ------------ web/frontend/src/joblist/Row.svelte | 19 +------------------ 4 files changed, 2 insertions(+), 45 deletions(-) diff --git a/internal/graph/schema.resolvers.go b/internal/graph/schema.resolvers.go index e5bfc77..bdac26e 100644 --- a/internal/graph/schema.resolvers.go +++ b/internal/graph/schema.resolvers.go @@ -287,12 +287,8 @@ func (r *subClusterResolver) NumberOfNodes(ctx context.Context, obj *schema.SubC if err != nil { return 0, err } - // log.Debugf(">>>> See raw list definition here: %v", nodeList) stringList := nodeList.PrintList() - // log.Debugf(">>>> See parsed list here: %v", stringList) - numOfNodes := len(stringList) - // log.Debugf(">>>> See numOfNodes here: %v", len(stringList)) - return numOfNodes, nil + return len(stringList), nil } // Cluster returns generated.ClusterResolver implementation. diff --git a/pkg/archive/nodelist.go b/pkg/archive/nodelist.go index 81d8a52..105a134 100644 --- a/pkg/archive/nodelist.go +++ b/pkg/archive/nodelist.go @@ -40,23 +40,15 @@ func (nl *NodeList) Contains(name string) bool { func (nl *NodeList) PrintList() []string { var out []string for _, term := range *nl { - // log.Debugf("Term: %v", term) - prefix := term[0].prefix() - // log.Debugf("Prefix as String: %s", prefix) - limitArr := term[1].limits() for _, inner := range limitArr { for i := inner["start"]; i < inner["end"]+1; i++ { node := fmt.Sprintf("%s%02d", prefix, i) out = append(out, node) } - // log.Debugf("Inner Map @ %d: %#v", indx, inner) - // log.Debugf("Start: %#v", inner["start"]) - // log.Debugf("End: %#v", inner["end"]) } } - // log.Debugf("Node List as Strings: %#v", out) return out } @@ -95,7 +87,6 @@ func (nles NLExprIntRanges) limits() []map[string]int64 { l := make([]map[string]int64, 0) for _, nle := range nles { inner := nle.limits() - // log.Debugf("limits @ nles: %#v", inner) l = append(l, inner[0]) } return l @@ -146,7 +137,6 @@ func (nle NLExprIntRange) limits() []map[string]int64 { m["start"] = nle.start m["end"] = nle.end l = append(l, m) - // log.Debugf("limits @ nle: %#v", l) return l } diff --git a/web/frontend/src/Metric.svelte b/web/frontend/src/Metric.svelte index 5b437f7..7803313 100644 --- a/web/frontend/src/Metric.svelte +++ b/web/frontend/src/Metric.svelte @@ -18,23 +18,11 @@ let selectedHost = null, plot, fetching = false, error = null let selectedScope = minScope(scopes) let selectedScopeIndex = scopes.findIndex(s => s == selectedScope) - - // console.log('- Inputs -') - // console.log(metricName) - // console.log(scopes) - // console.log(rawData) - // console.log('- Prep Scopes -') - // console.log(selectedScope) - // console.log(selectedScopeIndex) $: avaliableScopes = scopes $: data = rawData[selectedScopeIndex] $: series = data?.series.filter(series => selectedHost == null || series.hostname == selectedHost) - // console.log('- Prep Data -') - // console.log(rawData[selectedScopeIndex]) - // console.log(rawData[selectedScopeIndex].series.filter(series => selectedHost == null || series.hostname == selectedHost)) - let from = null, to = null export function setTimeRange(f, t) { from = f, to = t diff --git a/web/frontend/src/joblist/Row.svelte b/web/frontend/src/joblist/Row.svelte index eec056d..3ba8341 100644 --- a/web/frontend/src/joblist/Row.svelte +++ b/web/frontend/src/joblist/Row.svelte @@ -60,19 +60,13 @@ // SubCluster Config present: Check if remove flag is set if (thisConfig.subClusters[thisSCIndex].remove == true) { // Return null data and informational flag - // console.log('Case 1.1 -> Returned') - // console.log({removed: true, data: null}) return {removed: true, data: null} } else { // load and return metric, if data available let thisMetric = jobMetrics.filter(jobMetric => jobMetric.name == name) // Returns Array if (thisMetric.length > 0) { - // console.log('Case 1.2.1 -> Returned') - // console.log({removed: false, data: thisMetric}) return {removed: false, data: thisMetric} } else { - // console.log('Case 1.2.2 -> Returned:') - // console.log({removed: false, data: null}) return {removed: false, data: null} } } @@ -80,26 +74,15 @@ // No specific subCluster config: 'remove' flag not set, deemed false -> load and return metric, if data available let thisMetric = jobMetrics.filter(jobMetric => jobMetric.name == name) // Returns Array if (thisMetric.length > 0) { - // console.log('Case 2.1 -> Returned') - // console.log({removed: false, data: thisMetric}) return {removed: false, data: thisMetric} } else { - // console.log('Case 2.2 -> Returned') - // console.log({removed: false, data: null}) return {removed: false, data: null} } } }) .map(function(jobMetrics) { if (jobMetrics.data != null && jobMetrics.data.length > 0) { - // console.log('Before') - // console.log(jobMetrics.data) - // console.log('After') - // console.log(selectScope(jobMetrics.data)) - let res = {removed: jobMetrics.removed, data: selectScope(jobMetrics.data)} - // console.log('Packed') - // console.log(res) - return res + return {removed: jobMetrics.removed, data: selectScope(jobMetrics.data)} } else { return jobMetrics }