From 90954e4aae1f99413c850e5286c2676e59897ae0 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Thu, 10 May 2012 16:16:15 +0200 Subject: [PATCH] SONAR-3457 Project Widget should be configured as soon as they are added to a dashboard --- .../main/webapp/WEB-INF/app/controllers/dashboard_controller.rb | 2 +- .../WEB-INF/app/views/dashboard/_widget_properties.html.erb | 2 +- 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 %> - <%= message('widget.resource_id') %> + <%= message('widget.resource_id') %> * <%= resource_value_field(widget.resource_id) -%> <% end %> -- 2.39.5