]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5617 Update package_design widget
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 3 Oct 2014 13:45:54 +0000 (15:45 +0200)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 3 Oct 2014 13:46:14 +0000 (15:46 +0200)
plugins/sonar-design-plugin/src/main/java/org/sonar/plugins/design/ui/widgets/PackageDesignWidget.java
plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/widgets/package_design.html.erb
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index f5d18f61c2fc56ec9a6aa3dfef9f254682218c1f..d79f9337d68ab206d7950bc738b0a252e9f44d17 100644 (file)
@@ -33,7 +33,7 @@ public final class PackageDesignWidget extends AbstractRubyTemplate implements R
   }
 
   public String getTitle() {
-    return "Package design";
+    return "File design";
   }
 
   @Override
index 5d9b7a2c796746bdf8745523b9429795320258ee..b036433449a0591baf7964e8a2c9a14a187934bc 100644 (file)
@@ -4,6 +4,7 @@
      package_cycles=measure('package_cycles')
      package_feedback_edges=measure('package_feedback_edges')
      package_tangles=measure('package_tangles')
+     dsm_url = ApplicationController.root_context + '/design/index/' + @resource.key
 %>
   <div class="widget-row">
     <div class="widget-span widget-span-5">
@@ -11,7 +12,7 @@
         <div class="widget-measure widget-measure-main">
           <span class="widget-label"><%= message('widget.package_design.package_tangle_index') -%></span>
           <span class="nowrap">
-            <%= format_measure(package_tangle_index, :suffix => '', :default => '-', :url => url_for_drilldown(package_tangle_index)) %>
+            <%= format_measure(package_tangle_index, :suffix => '', :default => '-', :url => dsm_url) %>
             <%= dashboard_configuration.selected_period? ? format_variation(package_tangle_index) : trend_icon(package_tangle_index) -%>
           </span>
         </div>
@@ -21,7 +22,7 @@
             <span class="widget-label"><%= message('widget.package_design.cycles.suffix') -%></span>
             <span class="nowrap">
               <span class="widget-medium">&gt;</span>
-              <%= format_measure(package_cycles, :default => '-', :url => url_for_drilldown(package_cycles)) %>
+              <%= format_measure(package_cycles, :default => '-', :url => dsm_url) %>
               <%= dashboard_configuration.selected_period? ? format_variation(package_cycles) : trend_icon(package_cycles) -%>
             </span>
           </div>
@@ -39,7 +40,7 @@
           <div class="widget-measure">
             <span class="widget-label"><%= message('widget.package_design.between_packages.suffix') -%></span>
             <span class="nowrap">
-              <%= format_measure(package_feedback_edges, :default => '-', :url => url_for_drilldown(package_feedback_edges)) %>
+              <%= format_measure(package_feedback_edges, :default => '-', :url => dsm_url) %>
               <%= dashboard_configuration.selected_period? ? format_variation(package_feedback_edges) : trend_icon(package_feedback_edges) -%>
             </span>
           </div>
@@ -49,7 +50,7 @@
           <div class="widget-measure">
             <span class="widget-label"><%= message('widget.package_design.between_files.suffix') -%></span>
             <span class="nowrap">
-              <%= format_measure(package_tangles, :default => '-', :url => url_for_drilldown(package_tangles)) %>
+              <%= format_measure(package_tangles, :default => '-', :url => dsm_url) %>
               <%= dashboard_configuration.selected_period? ? format_variation(package_tangles) : trend_icon(package_tangles) -%>
             </span>
           </div>
@@ -58,4 +59,4 @@
     </div>
   </div>
 
-<% end %>
\ No newline at end of file
+<% end %>
index d7232b4533412f118b7e5414af917c3b0108c63b..4359fdefa09e3315f332739a811c02d212c3fee7 100644 (file)
@@ -1198,12 +1198,12 @@ widget.file_design.file_tangle_index=File tangle index
 widget.file_design.cycles.suffix=\ cycles
 widget.file_design.suspect_file_dependencies=Suspect file dependencies
 
-widget.package_design.name=Package Design
-widget.package_design.description=Reports on package dependency cycles and tangle index.
-widget.package_design.package_tangle_index=Package tangle index
+widget.package_design.name=File Design
+widget.package_design.description=Reports on file and directory dependency cycles.
+widget.package_design.package_tangle_index=Directory tangle index
 widget.package_design.cycles.suffix=\ cycles
 widget.package_design.dependencies_to_cut=Dependencies to cut
-widget.package_design.between_packages.suffix=\ between packages
+widget.package_design.between_packages.suffix=\ between directories
 widget.package_design.between_files.suffix=\ between files
 
 widget.hotspot_metric.name=Metric Hotspot