]> source.dussan.org Git - sonarqube.git/commitdiff
Fix the error message when widget can not be displayed
authorSimon Brandhof <simon.brandhof@gmail.com>
Tue, 9 Oct 2012 14:10:10 +0000 (16:10 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Tue, 9 Oct 2012 14:10:48 +0000 (16:10 +0200)
sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_configure_widget.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/dashboard/_widget.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/widget/index.html.erb
sonar-server/src/main/webapp/WEB-INF/lib/resourceable.rb

index 6482380aef85e7cd261d583e8ddc76292d187e3f..48be0d8617295209832e3d43ceae20b3190f542d 100644 (file)
     <div class="block">
       <% if default_layout %>
       <div class="widget">   
-        <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => widget.name) -%></span>
+        <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [widget.key]) -%></span>
         <div class="clear"></div>
       </div>
       <% else %>
-        <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => widget.name) -%></span>
+        <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [widget.key]) -%></span>
       <% end %>
     </div>
   <% elsif widget_body.include? '<' %>
index c39863f4b6e93492435961a02ee0afeaf7d08d2c..38b348df389cdbdc755f95eb591820b5dd60e6c0 100644 (file)
@@ -9,11 +9,11 @@
   <div class="block">
    <% if default_layout %>
      <div class="widget">   
-       <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => widget.name) -%></span>
+       <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [widget.key]) -%></span>
        <div class="clear"></div>
      </div>
    <% else %>
-     <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => widget.name) -%></span>
+     <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [widget.key]) -%></span>
    <% end %>
   </div>
 
index 68f6685d3498c29bdc23339aaaf21508889df30f..93891cc2c0e8ccfb55419fd8178f6e2ae72cb233 100644 (file)
 
    <% if default_layout %>
      <div class="widget">   
-       <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => @widget.key) -%></span>
+       <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [@widget.key]) -%></span>
        <div class="clear"></div>
      </div>
    <% else %>
-     <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => @widget.key) -%></span>
+     <span class="empty_widget"><%= message('widget.error_occurred_please_read_logs', :params => [@widget.key]) -%></span>
    <% end %>
 
 <% 
index 7dab654202547a972cb8b78668b29b5f4f0e08a7..4d1da4014bdac002620266f83526c2f26d27cc39 100644 (file)
@@ -91,21 +91,21 @@ module Resourceable
   def leaves_qualifiers
     @leaves_qualifiers ||=
         begin
-          Java::OrgSonarServerUi::JRubyFacade.getInstance().getResourceLeavesQualifiers(qualifier)
+          Api::Utils.java_facade.getResourceLeavesQualifiers(qualifier)
         end
   end
 
   def children_qualifiers
     @children_qualifiers ||=
         begin
-          Java::OrgSonarServerUi::JRubyFacade.getInstance().getResourceChildrenQualifiers(qualifier)
+          Api::Utils.java_facade.getResourceChildrenQualifiers(qualifier)
         end
   end
 
   def java_resource_type
     @java_resource_type ||=
         begin
-          Java::OrgSonarServerUi::JRubyFacade.getInstance().getResourceType(qualifier)
+          Api::Utils.java_facade.getResourceType(qualifier)
         end
   end
 end