]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-3457 Project Widget should be configured as soon as they are added to a dashboard
authorDavid Gageot <david@gageot.net>
Thu, 10 May 2012 14:16:15 +0000 (16:16 +0200)
committerDavid Gageot <david@gageot.net>
Thu, 10 May 2012 14:16:15 +0000 (16:16 +0200)
sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb

index 464a7b35a3d142b783ca9889ace14ec23efe0f9d..1ec983fa87309f6bc5097c14871aea5e63619885 100644 (file)
@@ -105,7 +105,7 @@ class DashboardController < ApplicationController
                                             :name => definition.getTitle(),
                                             :column_index => 1,
                                             :row_index => 1,
-                                            :configured => !definition.hasRequiredProperties())
+                                            :configured => !definition.hasRequiredProperties() && !dashboard.global || definition.isGlobal)
         widget_id=new_widget.id
         first_column_widgets.each_with_index do |w, index|
           w.row_index=index+2
index 2692fd4a5bf72ec32c0aa097de1fb193b64f323e..9a9e59a92abaa3488ea22635a05041c98ee8d317 100644 (file)
@@ -19,7 +19,7 @@
 
     <% if !widget.java_definition.global && @dashboard.global %>
       <tr>
-        <td class="form-key-cell"><%= message('widget.resource_id') %></td>
+        <td class="form-key-cell"><%= message('widget.resource_id') %> *</td>
         <td class="form-val-cell" id="row_resource"><%= resource_value_field(widget.resource_id) -%></td>
       </tr>
     <% end %>