summaryrefslogtreecommitdiff
path: root/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'webapp.py')
-rwxr-xr-xwebapp.py36
1 files changed, 14 insertions, 22 deletions
diff --git a/webapp.py b/webapp.py
index d42e932..c080d41 100755
--- a/webapp.py
+++ b/webapp.py
@@ -69,6 +69,14 @@ package_template = jinjaenv.from_string(
{%- endfor -%}
<p>Note: Packages with yellow background are required to be installed when this package is installed.</p>
{%- endif -%}
+{%- if issues -%}
+ <h3>issues with particular files</h3>
+ <table border='1'><tr><th>filename</th><th>issue</th></tr>
+ {%- for filename, issue in issues|dictsort(true) -%}
+ <tr><td><span class="filename">{{ filename|e }}</span></td><td>{{ issue|e }}</td></tr>
+ {%- endfor -%}
+ </table>
+{%- endif -%}
{% endblock %}""")
detail_template = jinjaenv.from_string(
@@ -151,7 +159,7 @@ index_template = jinjaenv.from_string(
<noscript><b>This form is disfunctional when javascript is not enabled</b></noscript>
Enter binary package to inspect - Note: Non-existing packages will result in <b>404</b>-Errors
<form id="pkg_form">
- <label for="pkg_name">Name: <input type="text" size="30" name="pkg_name" id="pkg_name">
+ <label for="pkg_name">Name: </label><input type="text" size="30" name="pkg_name" id="pkg_name">
<input type="submit" value="Go"> Permanent Link: <a id="perma_link" href="#"></a>
</form>
</fieldset></div></li>
@@ -193,27 +201,6 @@ def html_response(unicode_iterator, max_age=24 * 60 * 60):
resp.expires = datetime.datetime.now() + datetime.timedelta(seconds=max_age)
return resp
-def generate_shared(rows):
- """internal helper from show_detail"""
- entry = None
- for filename1, size1, func1, filename2, size2, func2, hashvalue in rows:
- funccomb = (func1, func2)
- if funccomb not in hash_functions:
- continue
- if entry and (entry["filename1"] != filename1 or
- entry["filename2"] != filename2):
- yield entry
- entry = None
- if entry:
- funcdict = entry["functions"]
- else:
- funcdict = dict()
- entry = dict(filename1=filename1, filename2=filename2, size1=size1,
- size2=size2, functions=funcdict)
- funcdict[funccomb] = hashvalue
- if entry:
- yield entry
-
class Application(object):
def __init__(self, db):
self.db = db
@@ -292,6 +279,11 @@ class Application(object):
params["dependencies"] = self.get_dependencies(params["pid"])
params["shared"] = self.cached_sharedstats(params["pid"])
params["urlroot"] = ".."
+ cur = self.db.cursor()
+ cur.execute("SELECT content.filename, issue.issue FROM content JOIN issue ON content.id = issue.cid WHERE content.pid = ?;",
+ (params["pid"],))
+ params["issues"] = dict(cur.fetchall())
+ cur.close()
return html_response(package_template.render(params))
def compute_comparison(self, pid1, pid2):