]> source.dussan.org Git - sonarqube.git/commitdiff
Do not suggest the Coverage option in Clouds page if the project has no coverage...
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 22 Jun 2011 17:39:09 +0000 (19:39 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Wed, 22 Jun 2011 17:39:09 +0000 (19:39 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/cloud/index.html.erb

index 49eace59e0e5ed94017b9681516afca61d55e796..d69666a4e5441f2943a00f5f6a46f0013826cb8e 100644 (file)
@@ -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>