[csw-devel] SF.net SVN: gar:[13921] csw/mgar/gar/v2/lib/web
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Tue Mar 22 10:47:40 CET 2011
Revision: 13921
http://gar.svn.sourceforge.net/gar/?rev=13921&view=rev
Author: wahwah
Date: 2011-03-22 09:47:39 +0000 (Tue, 22 Mar 2011)
Log Message:
-----------
pkgdb-web: Better checkpkg report
On the maintainer checkpkg report (e.g. [1]), group error tags by catalog,
which improves readability.
[1] http://buildfarm.opencsw.org/pkgdb/maintainers/29/checkpkg/
Modified Paths:
--------------
csw/mgar/gar/v2/lib/web/pkgdb_web.py
csw/mgar/gar/v2/lib/web/templates/MaintainerCheckpkgReport.html
csw/mgar/gar/v2/lib/web/templates/Srv4Detail.html
Modified: csw/mgar/gar/v2/lib/web/pkgdb_web.py
===================================================================
--- csw/mgar/gar/v2/lib/web/pkgdb_web.py 2011-03-22 09:46:58 UTC (rev 13920)
+++ csw/mgar/gar/v2/lib/web/pkgdb_web.py 2011-03-22 09:47:39 UTC (rev 13921)
@@ -194,8 +194,13 @@
tags_by_md5 = {}
pkgs = list(pkgs)
for pkg in pkgs:
- tags = list(models.CheckpkgErrorTag.selectBy(srv4_file=pkg))
- tags_by_md5.setdefault(pkg.md5_sum, tags)
+ tags = list(models.CheckpkgErrorTag.selectBy(srv4_file=pkg).orderBy(
+ ('tag_name', 'tag_info')))
+ tags_by_cat_id = {}
+ for tag in tags:
+ key = (tag.catrel.name, tag.arch.name, tag.os_rel.short_name)
+ tags_by_cat_id.setdefault(key, []).append(tag)
+ tags_by_md5.setdefault(pkg.md5_sum, tags_by_cat_id)
return render.MaintainerCheckpkgReport(maintainer, pkgs, tags_by_md5)
Modified: csw/mgar/gar/v2/lib/web/templates/MaintainerCheckpkgReport.html
===================================================================
--- csw/mgar/gar/v2/lib/web/templates/MaintainerCheckpkgReport.html 2011-03-22 09:46:58 UTC (rev 13920)
+++ csw/mgar/gar/v2/lib/web/templates/MaintainerCheckpkgReport.html 2011-03-22 09:47:39 UTC (rev 13921)
@@ -19,9 +19,22 @@
$if tags_by_md5[pkg.md5_sum]:
<ul>
- $for tag in tags_by_md5[pkg.md5_sum]:
+ $for catrel, arch, osrel in tags_by_md5[pkg.md5_sum]:
<li>
- $tag
+ $catrel $arch $osrel
+ <ul>
+ $for tag in tags_by_md5[pkg.md5_sum][(catrel, arch, osrel)]:
+ <li>
+ $if tag.overridden:
+ <span class="overridden">
+ $else:
+ <span>
+ <a href="http://wiki.opencsw.org/checkpkg-error-tags#$tag.tag_name" title="Information about the $tag.tag_name tag.">$tag.tag_name</a> $tag.tag_info
+ $if tag.overridden:
+ [overridden]
+ </span>
+ </li>
+ </ul>
</li>
</ul>
</li>
Modified: csw/mgar/gar/v2/lib/web/templates/Srv4Detail.html
===================================================================
--- csw/mgar/gar/v2/lib/web/templates/Srv4Detail.html 2011-03-22 09:46:58 UTC (rev 13920)
+++ csw/mgar/gar/v2/lib/web/templates/Srv4Detail.html 2011-03-22 09:47:39 UTC (rev 13921)
@@ -75,7 +75,7 @@
<span style="color: black;">
<a href="http://wiki.opencsw.org/checkpkg-error-tags#$tag.tag_name" title="Information about the $tag.tag_name tag.">$tag.tag_name</a> $tag.tag_info
$if tag.overridden:
- (overridden)
+ [overridden]
</span>
</li>
</ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list