[Apt-listbugs-commits] [SCM] apt-listbugs development tree branch, master, updated. apt-listbugs/0.1.9-24-gee1a321

Francesco Poli (wintermute) invernomuto at paranoici.org
Sat Jul 27 19:52:25 UTC 2013


The following commit has been merged in the master branch:
commit ea9368bec210de22d1ab90d3a5623f471bf52249
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Thu Jul 25 22:43:24 2013 +0200

    colorize HTML bug lists depending on severity

diff --git a/bug-list.css b/bug-list.css
index 28a316e..8c1a194 100644
--- a/bug-list.css
+++ b/bug-list.css
@@ -108,10 +108,13 @@ div#page_body table.bug_table th
     padding: 0.1em 0.5em;
 }
 
-div#page_body table.bug_table tr.row
-{
-    background-color: #eee;
-}
+div#page_body table.bug_table tr.critical  { background-color: #f99; }
+div#page_body table.bug_table tr.grave     { background-color: #fc9; }
+div#page_body table.bug_table tr.serious   { background-color: #fe9; }
+div#page_body table.bug_table tr.important { background-color: #ccf; }
+div#page_body table.bug_table tr.normal    { background-color: #cef; }
+div#page_body table.bug_table tr.minor     { background-color: #af9; }
+div#page_body table.bug_table tr.wishlist  { background-color: #eee; }
 
 div#page_body table.bug_table td
 {
diff --git a/lib/apt-listbugs/logic.rb b/lib/apt-listbugs/logic.rb
index b7e4ab5..1533079 100644
--- a/lib/apt-listbugs/logic.rb
+++ b/lib/apt-listbugs/logic.rb
@@ -646,7 +646,7 @@ class Viewer
       each_state_table(tmp, bugs, @config.stats) { |bugs|
         bugs.each { |bug|
           pkg = bug.pkg_name
-          tmp.puts "\n      <tr class=\"row\">"
+          tmp.puts "\n      <tr class=\"#{bug.severity}\">"
           tmp.puts "        <td class=\"pkg\">#{pkg}</td>"
           tmp.print "\n        <td>"
           tmp.print "#{cur_pkgs[pkg]['version']} " if cur_pkgs[pkg] != nil

-- 
apt-listbugs development tree



More information about the Apt-listbugs-commits mailing list