]> git.decadent.org.uk Git - dak.git/blobdiff - dak/queue_report.py
that should also shutup the html validation foo
[dak.git] / dak / queue_report.py
index 5fd9288a8c6da8711b48e1eff274f213e169c955..862a6d20ebb8a431ebc4bfc8288c721f852cde65 100755 (executable)
@@ -179,6 +179,7 @@ def header():
       Debian NEW and BYHAND Packages
     </title>
     <script type="text/javascript">
+    //<![CDATA[
     function togglePkg() {
         var children = document.getElementsByTagName("*");
         for (var i = 0; i < children.length; i++) {
@@ -194,6 +195,7 @@ def header():
             }
         }
     }
+    //]]>
     </script>
   </head>
   <body id="NEW">
@@ -246,8 +248,8 @@ def table_header(type, source_count, total_count):
     print "<h1 class='binNEW'>Summary for: %s</h1>" % (type)
     print "<h1 class='binNEW' style='display: none'>Summary for: binary-%s only</h1>" % (type)
     print """
+    <p class="togglepkg" onclick="togglePkg()">Click to toggle all/binary-NEW packages</p>
     <table class="NEW">
-      <p class="togglepkg" onclick="togglePkg()">Click to toggle all/binary-NEW packages</p>
       <caption class="binNEW">
     """
     print "Package count in <strong>%s</strong>: <em>%s</em>&nbsp;|&nbsp; Total Package count: <em>%s</em>" % (type, source_count, total_count)
@@ -290,7 +292,10 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing
     else:
         print "<tr class=\"%s odd\">" % (trclass)
 
-    print "<td class=\"package\">%s</td>" % (source)
+    if "binNEW" in trclass:
+        print "<td class=\"package\">%s</td>" % (source)
+    else:
+        print "<td class=\"package\"><a href=\"http://packages.qa.debian.org/%(source)s\">%(source)s</a></td>" % {'source': source}
     print "<td class=\"version\">"
     for vers in version.split():
         print "<a href=\"new/%s_%s.html\">%s</a><br/>" % (source, utils.html_escape(vers), utils.html_escape(vers))
@@ -311,7 +316,7 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing
     if sponsor:
         try:
             (login, domain) = sponsor.split("@", 1)
-            print "<span class=\"sponsor\">Sponsor: <a href=\"http://qa.debian.org/developer.php?login=%s\">%s</a></span>@debian.org<br/>" % (utils.html_escape(login), utils.html_escape(login))
+            print "<span class=\"sponsor\">Sponsor: <a href=\"http://qa.debian.org/developer.php?login=%s\">%s</a>@debian.org</span><br/>" % (utils.html_escape(login), utils.html_escape(login))
         except Exception as e:
             pass
 
@@ -550,7 +555,7 @@ def process_changes_files(changes_files, type, log, rrd_dir):
                (name, mail) = changedby.split(":", 1)
                log.write("Changed-By: " + name + " <"+mail+">" + "\n")
             if sponsor:
-               log.write("Sponsored-By: " + sponsor + "\n")
+               log.write("Sponsored-By: " + "@".join(sponsor.split("@")[:2]) + "\n")
             log.write("Distribution:")
             for dist in distribution:
                log.write(" " + dist)