# HG changeset patch # User Sascha L. Teichmann # Date 1558950134 -7200 # Node ID 104c4f683c74499f285f94fab478710700e8a212 # Parent 096968d5628f81ea7366661a0fe44e6fad7a2b0e fairway availabilty: prefill result mit zero values if there is no data. diff -r 096968d5628f -r 104c4f683c74 pkg/controllers/stretches.go --- a/pkg/controllers/stretches.go Mon May 27 11:22:12 2019 +0200 +++ b/pkg/controllers/stretches.go Mon May 27 11:42:14 2019 +0200 @@ -362,6 +362,11 @@ // Normalize to look like as we have only one bottleneck. scale := 1 / float64(len(loaded)) + empty := fmt.Sprintf("%.3f", 0.0) + for i := range record[1:] { + record[i+1] = empty + } + for _, r := range results { record[0] = r.label for i, v := range r.ldc { @@ -619,6 +624,11 @@ return } + empty := fmt.Sprintf("%.3f", 0.0) + for i := range record[1:] { + record[i+1] = empty + } + for _, res := range results { record[0] = res.label