diff options
author | Stas Vilchik <vilchiks@gmail.com> | 2016-05-09 15:40:36 +0200 |
---|---|---|
committer | Stas Vilchik <vilchiks@gmail.com> | 2016-05-10 10:15:24 +0200 |
commit | a033bfa56a65867d2415dfba8eefc9788e72f121 (patch) | |
tree | 68d1d773c9f014d8098f00aa07f538ba30eee98b | |
parent | e3d3e9943d309e602da7475dc830956e8b5b976c (diff) | |
download | sonarqube-a033bfa56a65867d2415dfba8eefc9788e72f121.tar.gz sonarqube-a033bfa56a65867d2415dfba8eefc9788e72f121.zip |
SONAR-6059 Treemap drilldown is not working with "Quality Gate Status" as color metric
-rw-r--r-- | server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/treemap.html.erb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/treemap.html.erb b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/treemap.html.erb index f6a1fbc2b6b..6b51c0eed9e 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/treemap.html.erb +++ b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/treemap.html.erb @@ -54,7 +54,10 @@ longName: '<%= escape_javascript row.resource.long_name -%>', qualifier: '<%= escape_javascript row.resource.qualifier -%>', measures: { - <%= colorMetric.name -%>: { val: <%= color ? color.value : "null" -%>, fval: '<%= color ? color.formatted_value : "-" -%>' }, + <% + value = color ? (colorMetric.val_type == 'LEVEL' ? "'#{color.formatted_value}'" : color.value) : 'null'; + %> + <%= colorMetric.name -%>: { val: <%= value -%>, fval: '<%= color ? color.formatted_value : "-" -%>' }, <%= sizeMetric.name -%>: { val: <%= size ? size.value : "null" -%>, fval: '<%= size ? size.formatted_value : "-" -%>' } } }, |