From ce14665a6b08b23c8bd557141d3fc993e901ae45 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Lievremont Date: Tue, 8 Jul 2014 16:03:31 +0200 Subject: [PATCH] SONAR-5390 Reintroduce link per severity in profile rules page --- .../profile-dependent-filter-view.coffee | 5 ++ .../WEB-INF/app/views/profiles/show.html.erb | 51 ++++++++++--------- 2 files changed, 32 insertions(+), 24 deletions(-) diff --git a/sonar-server/src/main/coffee/coding-rules/views/filters/profile-dependent-filter-view.coffee b/sonar-server/src/main/coffee/coding-rules/views/filters/profile-dependent-filter-view.coffee index a86c58cacdc..5afad402b92 100644 --- a/sonar-server/src/main/coffee/coding-rules/views/filters/profile-dependent-filter-view.coffee +++ b/sonar-server/src/main/coffee/coding-rules/views/filters/profile-dependent-filter-view.coffee @@ -47,6 +47,11 @@ define [ value = value.split(',') if _.isString(value) if @choices && value.length > 0 @model.set value: value, enabled: true + @choices.each (item) -> + item.set 'checked', false + _.each value, (v) => + cModel = @choices.findWhere id: v + cModel.set 'checked', true @onChangeQualityProfile() else @clear() diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb index 3eec1835ea5..397b662228b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb @@ -39,30 +39,33 @@ %>
-
- - <% Severity::KEYS.each do |key| - stat = severity_map[key] - severity = key.downcase - value = 0 - value = stat.getValue() if stat - -%> - - - - - - <% end -%> -
- <%= message(severity) -%> - - <%= value -%> - - <% if max > 0 %> - <%= barchart(:width => 70, :percent => (100 * value / max).to_i) %> - <% end %> -
-
+ + + <% Severity::KEYS.each do |key| + stat = severity_map[key] + severity = key.downcase + value = 0 + value = stat.getValue() if stat + -%> + + + + + + <% end -%> + +
+ <%= message(severity) -%> + + " + class="widget-link"> + <%= value -%> + + + <% if max > 0 %> + <%= barchart(:width => 70, :percent => (100 * value / max).to_i) %> + <% end %> +
<% end -%> -- 2.39.5