]> source.dussan.org Git - sonarqube.git/commitdiff
Update all severity icons
authorStas Vilchik <vilchiks@gmail.com>
Fri, 7 Feb 2014 10:15:20 +0000 (16:15 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Fri, 7 Feb 2014 10:15:20 +0000 (16:15 +0600)
13 files changed:
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_resources.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/hotspots/hotspot_most_violated_rules.html.erb
plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/issues/issues.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/_severity.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/drilldown/issues.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issue/_issue.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/issues/_list.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/_diff_rule.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/profiles/changelog.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/project/widgets/issues/_issues_list.html.erb
sonar-server/src/main/webapp/WEB-INF/app/views/resource/_header_issues.html.erb
sonar-server/src/main/webapp/stylesheets/icons.css
sonar-server/src/main/webapp/stylesheets/icons.less

index af7aaf65adf3b30f082d463bf84d5a9c634f68e1..f9697b58ab2087b26edf96f16ef47570feecd5da 100644 (file)
         <%= link_to_resource(resource, h(resource.name), {:tab => :violations}) -%>
       </td>
       <td class="small right">
-        <%= image_tag('priority/BLOCKER.png') -%>
+        <i class="icon-severity-blocker"></i>
       </td>
       <td class="small left">
         <%= violations_per_severity["BLOCKER"] ? violations_per_severity["BLOCKER"].to_s : "0" -%>
       </td>
       <td class="small right">
-        <%= image_tag('priority/CRITICAL.png') -%>
+        <i class="icon-severity-critical"></i>
       </td>
       <td class="small left">
         <%= violations_per_severity["CRITICAL"] ? violations_per_severity["CRITICAL"].to_s : "0" -%>
       </td>
       <td class="small right">
-        <%= image_tag('priority/MAJOR.png') -%>
+        <i class="icon-severity-major"></i>
       </td>
       <td class="small left">
         <%= violations_per_severity["MAJOR"] ? violations_per_severity["MAJOR"].to_s : "0" -%>
       </td>
       <td class="small right">
-        <%= image_tag('priority/MINOR.png') -%>
+        <i class="icon-severity-minor"></i>
       </td>
       <td class="small left">
         <%= violations_per_severity["MINOR"] ? violations_per_severity["MINOR"].to_s : "0" -%>
       </td>
       <td class="small right">
-        <%= image_tag('priority/INFO.png') -%>
+        <i class="icon-severity-info"></i>
       </td>
       <td class="small left">
         <%= violations_per_severity["INFO"] ? violations_per_severity["INFO"].to_s : "0" -%>
   </tbody>
 </table>
 
-<% end %>
\ No newline at end of file
+<% end %>
index 5327406508a29c9cf60126840e646cb9c64d9005..6fe5dcf44a5351d49d2c2955d7b6c9c185ee28ac 100644 (file)
@@ -94,7 +94,7 @@
           %>
             <tr class="<%= cycle 'even', 'odd', :name => ("hotspot_most_violated_rules-#{widget.id}-#{severity}") -%>">
               <td class="thin">
-                <%= image_tag('priority/' + m.severity + '.png') -%>
+                <i class="icon-severity-<%= m.severity.downcase -%>"></i>
               </td>
               <td>
                 <%= h rule.name -%>
index 1099057c35b59b7e7ef8face29ff7a20b6444f1f..6e2da2ec2f7d961ed3f0cfd5b1a27f7d053e59b6 100644 (file)
@@ -92,8 +92,7 @@
       %>
       <table class="clear width100">
         <tr>
-          <td><%= image_tag 'priority/BLOCKER.png' %></td>
-          <td> &nbsp;<%= message('blocker') -%></td>
+          <td><i class="icon-severity-blocker"></i> <%= message('blocker') -%></td>
           <td style="padding: 0 5px;" align="right">
             <%= link_to format_measure(blocker_issues), {:controller => 'drilldown', :action => 'issues', :id => @project.key, :severity => 'BLOCKER'}, :class => 'nolink drilldown_BLOCKER' -%>
           </td>
           </td>
         </tr>
         <tr>
-          <td><%= image_tag 'priority/CRITICAL.png' %></td>
-          <td> &nbsp;<%= message('critical') -%></td>
+          <td><i class="icon-severity-critical"></i> <%= message('critical') -%></td>
           <td style="padding: 0 5px;" align="right">
             <%= link_to format_measure(critical_issues), {:controller => 'drilldown', :action => 'issues', :id => @project.key, :severity => 'CRITICAL'}, :class => 'nolink drilldown_CRITICAL' -%>
           </td>
           </td>
         </tr>
         <tr>
-          <td><%= image_tag 'priority/MAJOR.png' %></td>
-          <td> &nbsp;<%= message('major') -%></td>
+          <td><i class="icon-severity-major"></i> <%= message('major') -%></td>
           <td style="padding: 0 5px;" align="right">
             <%= link_to format_measure(major_issues), {:controller => 'drilldown', :action => 'issues', :id => @project.key, :severity => 'MAJOR'}, :class => 'nolink drilldown_MAJOR' -%>
           </td>
           </td>
         </tr>
         <tr>
-          <td><%= image_tag 'priority/MINOR.png' %></td>
-          <td> &nbsp;<%= message('minor') -%></td>
+          <td><i class="icon-severity-minor"></i> <%= message('minor') -%></td>
           <td style="padding: 0 5px;" align="right">
             <%= link_to format_measure(minor_issues), {:controller => 'drilldown', :action => 'issues', :id => @project.key, :severity => 'MINOR'}, :class => 'nolink drilldown_MINOR' -%>
           </td>
           </td>
         </tr>
         <tr>
-          <td><%= image_tag 'priority/INFO.png' %></td>
-          <td> &nbsp;<%= message('info') -%></td>
+          <td><i class="icon-severity-info"></i> <%= message('info') -%></td>
           <td style="padding: 0 5px;" align="right">
             <%= link_to format_measure(info_issues), {:controller => 'drilldown', :action => 'issues', :id => @project.key, :severity => 'INFO'}, :class => 'nolink drilldown_INFO' -%>
           </td>
index 4da1108d975fa8e67ba8abb50eb07fdd593da830..8625066e0c47dd6b200a04593da67ec731a460a0 100644 (file)
@@ -1,6 +1,6 @@
 <% selected=(severity==@severity) %>
 <tr class="<%= css -%> <%= 'selected' if selected -%>">
-       <td><%= image_tag "priority/#{severity}.png" %></td>
+       <td><i class="icon-severity-<%= severity.downcase -%>"></i></td>
   <td>
     <%= link_to message("severity.#{severity}"), {:controller => :drilldown, :action => :issues, :id => @resource.id, :severity => (selected ? nil : severity), :period => @period} %>
   </td>
@@ -11,4 +11,4 @@
     <% value = measure_or_variation_value(measure) %>
     <%= barchart(:width => 60, :percent => (value ? (100 * value / max).to_i : 0), :color => (@period_index ? '#cc0000' : '#777')) if max>0  %>
   </td>
-</tr>
\ No newline at end of file
+</tr>
index 91a40199c46294ad9edee487de624f8e6de1df32..33df10735783a6fc5d434b12f7f5926bc3d6a348 100644 (file)
@@ -89,7 +89,7 @@
           %>
             <tr class="<%= clazz -%>">
               <td width="1%" nowrap>
-                <img src="<%= ApplicationController.root_context -%>/images/priority/<%= rule_measure.rule_priority -%>.png"/>
+                <i class="icon-severity-<%= rule_measure.rule_priority -%>"></i>
               </td>
               <td>
                 <%= link_to(h(rule.name),
index 4e16f08f412b3319c1b9d24a889cce60ca87fc5f..0d790ae6585f0a7ecd074bb40efa2198d7d3c394 100644 (file)
@@ -4,7 +4,7 @@
       <a href="#" onclick="return openIssuePopup(this)" class="issue-permalink"><img src="<%= ApplicationController.root_context -%>/images/new-window-16.gif"></a>
     </div>
 
-    <img src="<%= ApplicationController.root_context -%>/images/priority/<%= issue.severity -%>.png" title="<%= h message("severity.#{issue.severity}") -%>">
+    <i class="icon-severity-<%= issue.severity.downcase -%>"></i>
     &nbsp;
     <a href="#" onclick="return toggleIssueRule(this)" class="rulename issue-rule-link"><%= h @issue_results.rule(issue).getName() -%></a>
     &nbsp;
index 731a60c191332325c7e1751710e0921443327df4..7e07f5f74b6c091b5b165afcd2be574f0c7f8f32 100644 (file)
@@ -35,7 +35,7 @@
       %>
         <tr class="<%= cycle('even', 'odd') -%>">
           <td width="1%" nowrap>
-            <img src="<%= ApplicationController.root_context -%>/images/priority/<%= issue.severity -%>.png" title="<%= message(issue.severity.downcase).capitalize -%>"/>
+            <i class="icon-severity-<%= issue.severity.downcase -%>"></i>
           </td>
           <td>
             <%= message("issue.status.#{issue.status}") -%>
index bf6c3cb0964424cba895a4410ee6a1eec4a9660b..1afd63c4fb529c148e8b5cb36a6a459738d591e2 100644 (file)
@@ -1,5 +1,5 @@
-<%= image_tag "priority/#{arule.priority}.png" %>
+<i class="icon-severity-<%= arule.priority -%>"></i>
 
 <span class="rulename"><a onclick="window.open(this.href,'rule','height=700,width=500,scrollbars=1,resizable=1');return false;"
                           href="<%= url_for :controller => 'rules', :action => 'show', :id => arule.rule.key, :layout => 'false' -%>"><%= h(arule.rule.name) -%></a>
-</span> <span class="note"><%= h(arule.rule.plugin_name) -%></span>
\ No newline at end of file
+</span> <span class="note"><%= h(arule.rule.plugin_name) -%></span>
index de50d67b766d64bbca0af7b2f309b30ca6ac75d0..288b3ec1dc01791d9f0b063c25b3f0dfe9b4aa52 100644 (file)
       <td valign="top">
         <% if change.old_severity
              if change.new_severity %>
-            <%= message('quality_profiles.severity_changed_from_x_to', :params => [image_tag("priority/#{change.old_severity_text}.png"), change.old_severity_text]) -%>
+            <%= message('quality_profiles.severity_changed_from_x_to', :params => ["<i></i>", change.old_severity_text]) -%>
           <% else %>
-            <%= message('quality_profiles.severity_was_x', :params => [image_tag("priority/#{change.old_severity_text}.png"), change.old_severity_text]) -%>
+            <%= message('quality_profiles.severity_was_x', :params => ["<i class=\"icon-severity-#{change.old_severity_text.downcase}\"></i>", change.old_severity_text]) -%>
           <% end
            end %>
         <% if change.new_severity
              if change.old_severity %>
-           <%= image_tag "priority/#{change.new_severity_text}.png" %><b><%= change.new_severity_text %></b>
+           <i class="icon-severity-#{change.new_severity_text.downcase}"></i><b><%= change.new_severity_text %></b>
           <% else %>
-           <%= message('quality_profiles.severity_set_to_x', :params => [image_tag("priority/#{change.new_severity_text}.png"), change.new_severity_text]) -%>
+           <%= message('quality_profiles.severity_set_to_x', :params => ["<i class=\"icon-severity-#{change.new_severity_text.downcase}\"></i>", change.new_severity_text]) -%>
           <% end
            end %>
         <% if (change.old_severity or change.new_severity) and change.parameters.size > 0 %>
index c6ce6bfe9013c5037731048559ba464d21b6a0c7..e72993ab6aeb82957159ec483bbd07af1f7aeb60 100644 (file)
@@ -35,7 +35,7 @@
          last_comment = issue.comments.get(issue.comments.size - 1) if !issue.comments.isEmpty()
     %>
       <tr class="<%= cycle 'even', 'odd', :name => ('issues-widget-list-' + widget_id) -%>">
-        <td><img src="<%= ApplicationController.root_context -%>/images/priority/<%= issue.severity() -%>.png" title="<%= message('severity.' + issue.severity()) -%>"/></td>
+        <td><i class="icon-severity-<%= issue.severity.downcase -%>"></i></td>
         <td>
           <a class="rule-modal" href="#" onclick="return openModalWindow('<%= url_for :controller => 'issue', :action => 'show', :id => issue.key, :modal => true -%>', {'width': 800})">
             <!-- SONAR-4785 Display rule name if issue has no message -->
index 8897d8da7528c198e715879f36a9ae28f289a8b2..db35a636094a061051d32c8b32a6d9625792261e 100644 (file)
@@ -5,27 +5,27 @@
         <td><span class="big"><%= format_variation('new_violations', :default => 0, :period => @period, :style => 'none') -%></span>&nbsp;<%= message('new_issues').downcase -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/BLOCKER.png' -%></td>
+        <td><i class="icon-severity-blocker"></i></td>
         <td class="name"><%= message('blocker') -%>:</td>
         <td class="value"><%= format_variation('new_blocker_violations', :default => 0, :period => @period, :style => 'none') -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/CRITICAL.png' -%></td>
+        <td><i class="icon-severity-critical"></i></td>
         <td class="name"><%= message('critical') -%>:</td>
         <td class="value"><%= format_variation('new_critical_violations', :default => 0, :period => @period, :style => 'none') -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/MAJOR.png' -%></td>
+        <td><i class="icon-severity-major"></i></td>
         <td class="name"><%= message('major') -%>:</td>
         <td class="value"><%= format_variation('new_major_violations', :default => 0, :period => @period, :style => 'none') -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/MINOR.png' -%></td>
+        <td><i class="icon-severity-minor"></i></td>
         <td class="name"><%= message('minor') -%>:</td>
         <td class="value"><%= format_variation('new_minor_violations', :default => 0, :period => @period, :style => 'none') -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/INFO.png' -%></td>
+        <td><i class="icon-severity-info"></i></td>
         <td class="name"><%= message('info') -%>:</td>
         <td class="value"><%= format_variation('new_info_violations', :default => 0, :period => @period, :style => 'none') -%></td>
       </tr>
         <td nowrap><span class="big"><%= format_measure('violations', :default => 0) -%></span>&nbsp;<%= message('issues').downcase -%></td>
 
         <td class="sep"> </td>
-        <td nowrap><%= image_tag 'priority/BLOCKER.png' -%></td>
-        <td class="name"><%= message('blocker') -%>:</td>
+        <td class="name"><i class="icon-severity-blocker"></i> <%= message('blocker') -%>:</td>
         <td class="value"><%= format_measure('blocker_violations', :default => 0) -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/CRITICAL.png' -%></td>
+        <td><i class="icon-severity-critical"></i></td>
         <td class="name"><%= message('critical') -%>:</td>
         <td class="value"><%= format_measure('critical_violations', :default => 0) -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/MAJOR.png' -%></td>
+        <td><i class="icon-severity-major"></i></td>
         <td class="name"><%= message('major') -%>:</td>
         <td class="value"><%= format_measure('major_violations', :default => 0) -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/MINOR.png' -%></td>
+        <td><i class="icon-severity-minor"></i></td>
         <td class="name"><%= message('minor') -%>:</td>
         <td class="value"><%= format_measure('minor_violations', :default => 0) -%></td>
 
         <td class="sep"> </td>
-        <td><%= image_tag 'priority/INFO.png' -%></td>
+        <td><i class="icon-severity-info"></i></td>
         <td class="name"><%= message('info') -%>:</td>
         <td class="value"><%= format_measure('info_violations', :default => 0) -%></td>
 
index a8bd57d5e4b03bfb43367e595373a276bfdcd307..2043baf7270fc4a589118dad38d69fef4a57b40d 100644 (file)
 /*
  * Severity
  */
-.icon-severity-blocker:before {
+[class^="icon-severity-"],
+[class*=" icon-severity"] {
+  position: relative;
+  top: -1px;
+}
+.icon-severity-blocker:before,
+.icon-severity-4:before {
   content: "\f000";
   color: #d4333f;
   font-size: 14px;
-  line-height: 12px;
 }
-.icon-severity-critical:before {
+.icon-severity-critical:before,
+.icon-severity-3:before {
   content: "\f001";
   color: #d4333f;
   font-size: 14px;
-  line-height: 12px;
 }
-.icon-severity-major:before {
+.icon-severity-major:before,
+.icon-severity-2:before {
   content: "\f002";
   color: #d4333f;
   font-size: 14px;
-  line-height: 12px;
 }
-.icon-severity-minor:before {
+.icon-severity-minor:before,
+.icon-severity-1:before {
   content: "\f003";
   color: #85bb43;
   font-size: 14px;
-  line-height: 12px;
 }
-.icon-severity-info:before {
+.icon-severity-info:before,
+.icon-severity-0:before {
   content: "\f004";
   color: #85bb43;
   font-size: 14px;
-  line-height: 12px;
 }
 /*
  * Status
  */
+[class^="icon-status-"],
+[class*=" icon-status"] {
+  position: relative;
+  top: -1px;
+}
 .icon-status-open:before {
   content: "\f010";
   color: #85bb43;
index e76ccec86ef63d77062dd1d37a90f2ba429ebb3f..48f9bc04dbdba817e4c50a037f6aabb2683efeb2 100644 (file)
  * Severity
  */
 
-.icon-severity-blocker:before {
+[class^="icon-severity-"], [class*=" icon-severity"] {
+  position: relative;
+  top: -1px;
+}
+
+.icon-severity-blocker:before,
+.icon-severity-4:before {
   content: "\f000";
   color: @severityBlockerColor;
   font-size: @iconFontSize;
-  line-height: @iconLineHeight;
 }
-.icon-severity-critical:before {
+.icon-severity-critical:before,
+.icon-severity-3:before {
   content: "\f001";
   color: @severityCriticalColor;
   font-size: @iconFontSize;
-  line-height: @iconLineHeight;
 }
-.icon-severity-major:before {
+.icon-severity-major:before,
+.icon-severity-2:before {
   content: "\f002";
   color: @severityMajorColor;
   font-size: @iconFontSize;
-  line-height: @iconLineHeight;
 }
-.icon-severity-minor:before {
+.icon-severity-minor:before,
+.icon-severity-1:before {
   content: "\f003";
   color: @severityMinorColor;
   font-size: @iconFontSize;
-  line-height: @iconLineHeight;
 }
-.icon-severity-info:before {
+.icon-severity-info:before,
+.icon-severity-0:before {
   content: "\f004";
   color: @severityInfoColor;
   font-size: @iconFontSize;
-  line-height: @iconLineHeight;
 }
 
 
  * Status
  */
 
+[class^="icon-status-"], [class*=" icon-status"] {
+  position: relative;
+  top: -1px;
+}
+
 .icon-status-open:before {
   content: "\f010";
   color: @statusOpenColor;