[Piuparts-commits] rev 344 - piatti/org/piuparts.debian.org/htdocs trunk trunk/debian trunk/piupartslib

Holger Levsen holger at alioth.debian.org
Fri Apr 17 16:47:29 UTC 2009


Author: holger
Date: 2009-04-17 16:47:28 +0000 (Fri, 17 Apr 2009)
New Revision: 344

Modified:
   piatti/org/piuparts.debian.org/htdocs/style.css
   trunk/TODO
   trunk/debian/changelog
   trunk/piuparts-report.py
   trunk/piupartslib/packagesdb.py
Log:
  - provide links to source status pages from state pages.



Modified: piatti/org/piuparts.debian.org/htdocs/style.css
===================================================================
--- piatti/org/piuparts.debian.org/htdocs/style.css	2009-04-17 13:37:25 UTC (rev 343)
+++ piatti/org/piuparts.debian.org/htdocs/style.css	2009-04-17 16:47:28 UTC (rev 344)
@@ -42,7 +42,8 @@
 body {
  padding: 0px;
  margin: 0px;
- font-family: Arial, Helvetica, sans-serif;
+ font-family: sans-serif;
+ font-size: 90%
  color: #000000;
  background-color: white;
 }

Modified: trunk/TODO
===================================================================
--- trunk/TODO	2009-04-17 13:37:25 UTC (rev 343)
+++ trunk/TODO	2009-04-17 16:47:28 UTC (rev 344)
@@ -8,7 +8,6 @@
 --- refactor code, sources.txt should not be calculated where it currently is
 --- include links to http://qa.debian.org/developer.php?login=$maintainer_email
 --- include links to logfiles in source summary pages
---- include links to source pages in state summary pages
 --- dont write counts.txt if it has already been written that day
 -- slave
 --- mention distro when sending logs

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-04-17 13:37:25 UTC (rev 343)
+++ trunk/debian/changelog	2009-04-17 16:47:28 UTC (rev 344)
@@ -37,7 +37,7 @@
     - support looping trough multiple sections in report.conf via new config
       value "sections". 
     - provide links to logfiles in statistics page.
-    - improve layout, generate navigation for the pages.
+    - improve layout, generate navigation for all pages.
     - generate counts.txt (per section) with raw numbers of packages per state,
       include these stats in the debug output (so it gets included in the mails
       send by cron.)
@@ -45,6 +45,7 @@
     - generate sources.txt (per section) with a summary status per source
       package (for the PTS to display a source packages piuparts state)
     - generate html status pages for all source packages (to link from the PTS)
+    - provide links to source status pages from state pages.
   * Break backwards compatibility of the configuration files for master-slave-
     mode. Merge those three into one: /etc/piuparts/piuparts/piuparts.conf.
     Introduce a new global section in piuparts.conf which is shared among the

Modified: trunk/piuparts-report.py
===================================================================
--- trunk/piuparts-report.py	2009-04-17 13:37:25 UTC (rev 343)
+++ trunk/piuparts-report.py	2009-04-17 16:47:28 UTC (rev 344)
@@ -281,7 +281,7 @@
    <table class="righttable">
     <tr class="titlerow">
      <td class="titlecell" colspan="3">
-      Package $package
+      Source package
      </td>
     </tr>
     $rows
@@ -527,12 +527,9 @@
 
 def assemble_source_pages(output_directory,section_names):
     logging.debug("Assembling all source package summaries in %s" % output_directory)    
-
-    # needs to find them in subdir...
     templates = find_files_with_suffix(output_directory, ".tpl_src")
     merge_templates(templates, section_names, output_directory)
 
-
 class Section:
 
     def __init__(self, section):
@@ -603,6 +600,12 @@
                                 desc_by_dir[dir], list)
 
 
+    def link_to_source_summary(self,_source_package):
+        link = "<a href=\"/source/%s\">%s</a>" % (
+                source_subdir(_source_package)+"/"+_source_package+".html",
+                html_protect(_source_package))
+        return link
+
     def generate_html_output(self):
         logging.debug("Finding log files")
         dirs = ["pass", "fail", "bugged", "fixed", "reserved", "untestable"]
@@ -648,7 +651,7 @@
             list = "<ul>\n"
             for package in self._binary_db.get_packages_in_state(state):
                 list += "<li>%s (%s)" % (
-                                         html_protect(package["Package"]),
+                                         self.link_to_source_summary(self._binary_db.get_source_package(package["Package"])),
                                          html_protect(package["Maintainer"]))
                 if package.dependencies():
                     list += "\n<ul>\n"

Modified: trunk/piupartslib/packagesdb.py
===================================================================
--- trunk/piupartslib/packagesdb.py	2009-04-17 13:37:25 UTC (rev 343)
+++ trunk/piupartslib/packagesdb.py	2009-04-17 16:47:28 UTC (rev 344)
@@ -379,6 +379,13 @@
     def get_control_header(self, package_name, header):
         return self._packages[package_name][header]
 
+    def get_source_package(self, package_name):
+        try:
+          source = self._packages[package_name]["Source"]
+        except:
+          source = self._packages[package_name]["Package"]
+        return source
+
     def get_package_state(self, package_name):
         return self._package_state[package_name]
 




More information about the Piuparts-commits mailing list