aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorDavid Gageot <david@gageot.net>2012-05-10 16:16:15 +0200
committerDavid Gageot <david@gageot.net>2012-05-10 16:16:15 +0200
commit90954e4aae1f99413c850e5286c2676e59897ae0 (patch)
treec22d51b3d509d5f14ac0941d72d6413de2811828 /sonar-server
parentdb3b3e7e51a8cd263e5357ee5afdfdd7d84bf59d (diff)
downloadsonarqube-90954e4aae1f99413c850e5286c2676e59897ae0.tar.gz
sonarqube-90954e4aae1f99413c850e5286c2676e59897ae0.zip
SONAR-3457 Project Widget should be configured as soon as they are added to a dashboard
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb2
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb2
2 files changed, 2 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
index 464a7b35a3d..1ec983fa873 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboard_controller.rb
@@ -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
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
index 2692fd4a5bf..9a9e59a92ab 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget_properties.html.erb
@@ -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 %>