X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fqueue_report.py;h=a61f99de768ebe37bc43d9f94ea6a76319c80250;hb=da3cd3ce78e9026d2356fa23955c44642afc2af4;hp=77e1e53c230d9ff216faf9b5806ac882775e9faa;hpb=09a1a20566dcf84ca229b4339bd8f8080eb59afd;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py index 77e1e53c..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} @@ -552,14 +556,15 @@ def process_queue(queue, log, rrd_dir): log.write("Changes-File: " + os.path.basename(changes_file) + "\n") log.write("\n") + total_count = len(queue.uploads) + source_count = len(per_source_items) + if Cnf.has_key("Queue-Report::Options::New"): direction.append([5,1,"ao"]) entries.sort(lambda x, y: sortfunc(x, y)) # Output for a html file. First table header. then table_footer. # Any line between them is then a printed from subroutine table_row. if len(entries) > 0: - total_count = len(changes_files) - source_count = len(per_source_items) table_header(type.upper(), source_count, total_count) for entry in entries: (source, binary, version_list, arch_list, note, last_modified, maint, distribution, closes, fingerprint, sponsor, changedby, undef) = entry @@ -575,8 +580,6 @@ def process_queue(queue, log, rrd_dir): msg += format % (source, version_list, arch_list, note, time_pp(last_modified)) if msg: - total_count = len(queue.uploads) - source_count = len(per_source_items) print type.upper() print "-"*len(type) print
+ """ 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