aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2011-06-22 19:39:09 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2011-06-22 19:39:09 +0200
commit8c245c0cc716902bfb049a46f8b9311e91052b16 (patch)
treedd552df1a5fd7c49c9aef37a5ea9467ece793d00 /sonar-server
parent8a2a5892cbbaf25bf04341cd3dc6c1b0257778b2 (diff)
downloadsonarqube-8c245c0cc716902bfb049a46f8b9311e91052b16.tar.gz
sonarqube-8c245c0cc716902bfb049a46f8b9311e91052b16.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/views/cloud/index.html.erb4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/cloud/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/cloud/index.html.erb
index 49eace59e0e..d69666a4e54 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/cloud/index.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/cloud/index.html.erb
@@ -23,7 +23,9 @@
<li class="first">
<span class="note">Color:</span>
<select name="color" onchange="document.forms['cloudform'].submit()">
- <option value="coverage" <%= 'selected' if @color_metric.key=='coverage' -%>>Coverage</option>
+ <% if @snapshot.measure(@color_metric) %>
+ <option value="coverage" <%= 'selected' if @color_metric.key=='coverage' -%>>Coverage</option>
+ <% end %>
<option value="violations_density" <%= 'selected' if @color_metric.key=='violations_density' -%>>Rules compliance</option>
</select>
</li>