Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c0b8506d authored by Simon Delamare's avatar Simon Delamare
Browse files

Merge branch 'wikikwol' into 'master'

[lib] wiki/kwollect: mark a metric optional if it is optinal on any cluster

See merge request !399
parents 586eff8a 402d78a9
No related branches found
No related tags found
1 merge request!399[lib] wiki/kwollect: mark a metric optional if it is optinal on any cluster
Pipeline #611417 passed
......@@ -23,7 +23,7 @@ class KwollectMetricsGenerator < WikiGenerator
metric_names.sort.each do |metric_name|
optional = all_metrics.select{|m| m["name"] == metric_name}.first["period"] == 0 ? "*" : ""
optional = all_metrics.select{|m| m["name"] == metric_name}.any?{|metric| metric["period"] == 0} ? "*" : ""
descriptions = all_metrics.select{|m| m["name"] == metric_name}.map{|metric| metric["description"]}.uniq
if descriptions.length != 1
description = longest_common_prefix(descriptions) + "XXX" + longest_common_suffix(descriptions)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment