aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-server
diff options
context:
space:
mode:
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-08 16:03:31 +0200
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>2014-07-08 16:03:31 +0200
commitce14665a6b08b23c8bd557141d3fc993e901ae45 (patch)
tree16e64f6944ba6ba98947699eadc4a2386b17295d /sonar-server
parentf0094e727e8937986b73660be9fa0c1c0b14a083 (diff)
downloadsonarqube-ce14665a6b08b23c8bd557141d3fc993e901ae45.tar.gz
sonarqube-ce14665a6b08b23c8bd557141d3fc993e901ae45.zip
SONAR-5390 Reintroduce link per severity in profile rules page
Diffstat (limited to 'sonar-server')
-rw-r--r--sonar-server/src/main/coffee/coding-rules/views/filters/profile-dependent-filter-view.coffee5
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/views/profiles/show.html.erb51
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 @@
%>
<div class="widget-span widget-span-3">
<div class="widget-measure-container">
- <div class="widget-measure widget-measure-main">
- <table class="data" style="width:120px">
- <% Severity::KEYS.each do |key|
- stat = severity_map[key]
- severity = key.downcase
- value = 0
- value = stat.getValue() if stat
- -%>
- <tr>
- <td>
- <i class="icon-severity-<%= severity %>"></i><%= message(severity) -%>
- </td>
- <td class="thin right">
- <%= value -%>
- </td>
- <td class="nowrap ">
- <% if max > 0 %>
- <%= barchart(:width => 70, :percent => (100 * value / max).to_i) %>
- <% end %>
- </td>
- </tr>
- <% end -%>
- </table>
- </div>
+ <table class="data" style="width: 240px">
+ <tbody>
+ <% Severity::KEYS.each do |key|
+ stat = severity_map[key]
+ severity = key.downcase
+ value = 0
+ value = stat.getValue() if stat
+ -%>
+ <tr>
+ <td>
+ <i class="icon-severity-<%= severity %>"></i> <%= message(severity) -%>
+ </td>
+ <td class="thin right">
+ <a href="<%= "#{ApplicationController.root_context}/coding_rules#qprofile=#{@profile.key()}|activation=true|languages=#{@profile.language()}|active_severities=#{severity.upcase}" -%>"
+ class="widget-link">
+ <span><%= value -%></span>
+ </a>
+ </td>
+ <td class="nowrap ">
+ <% if max > 0 %>
+ <%= barchart(:width => 70, :percent => (100 * value / max).to_i) %>
+ <% end %>
+ </td>
+ </tr>
+ <% end -%>
+ </tbody>
+ </table>
</div>
</div>
<% end -%>