From d5d7489a6227b0e5d0254efb3cd4ea7b584ee2b0 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sun, 12 Aug 2012 19:36:26 +0000 Subject: [PATCH] Restore correct visualization of binary-NEW uploads only Signed-off-by: Luca Falavigna --- dak/queue_report.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/dak/queue_report.py b/dak/queue_report.py index 2b501ac0..a61f99de 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -186,7 +186,7 @@ def header(): continue; c = children[i].getAttribute("class").split(" "); for(var j = 0; j < c.length; j++) { - if(c[j] == "binNEW") { + if(c[j] == "sourceNEW") { if (children[i].style.display == '') children[i].style.display = 'none'; else children[i].style.display = ''; @@ -244,12 +244,12 @@ def footer(): """ def table_header(type, source_count, total_count): - print "

Summary for: %s

" % (type) - print "

Summary for: binary-%s only

" % (type) + print "

Summary for: %s

" % (type) + print "

Summary for: binary-%s only

" % (type) print """

Click to toggle all/binary-NEW packages

- " % (trclass) - if "binNEW" in trclass: + if "sourceNEW" in trclass: print "" % (source) else: print "" % {'source': source} -- 2.39.2
+ """ print "Package count in %s: %s |  Total Package count: %s" % (type, source_count, total_count) print """ @@ -282,8 +282,12 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing if dist == "experimental": trclass = "exp" - if not len(session.query(DBSource).filter_by(source = source).all()): - trclass += " binNEW" + query = '''SELECT source + FROM source_suite + WHERE source = :source + AND suite_name IN ('unstable', 'experimental')''' + if not session.execute(query, {'source': source}).rowcount: + trclass += " sourceNEW" session.commit() if row_number % 2 != 0: @@ -291,7 +295,7 @@ def table_row(source, version, arch, last_mod, maint, distribution, closes, fing else: print "
%s%(source)s