diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-06-22 19:13:04 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-06-22 19:13:04 +0200 |
commit | 8a2a5892cbbaf25bf04341cd3dc6c1b0257778b2 (patch) | |
tree | beed6ee94fe5bac1037875ca36d79e5b1a6d4e9a /sonar-server | |
parent | c0009d2cb3044f887e90402146e42472d3388828 (diff) | |
download | sonarqube-8a2a5892cbbaf25bf04341cd3dc6c1b0257778b2.tar.gz sonarqube-8a2a5892cbbaf25bf04341cd3dc6c1b0257778b2.zip |
Do not suggest the Coverage option in Clouds page if the project has no coverage measure
Diffstat (limited to 'sonar-server')
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb index 006184a5a26..ab1a6973fa2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/cloud_controller.rb @@ -32,7 +32,11 @@ class CloudController < ApplicationController @size_metric=Metric.by_key(params[:size]||'ncloc') @color_metric=Metric.by_key(params[:color]||'coverage') - + + if @snapshot.measure(@color_metric).nil? + @color_metric=Metric.by_key('violations_density') + end + snapshot_conditions='snapshots.islast=:islast AND snapshots.scope=:scope AND snapshots.qualifier!=:test_qualifier AND (snapshots.id=:sid OR (snapshots.root_snapshot_id=:root_sid AND snapshots.path LIKE :path))' snapshot_values={ |