aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'euscanwww')
-rw-r--r--euscanwww/djeuscan/templates/euscan/_package_details.html2
-rw-r--r--euscanwww/djeuscan/templates/euscan/statistics.html6
-rw-r--r--euscanwww/djeuscan/templates/euscan/statistics_handler.html16
-rw-r--r--euscanwww/djeuscan/urls.py2
-rw-r--r--euscanwww/djeuscan/views.py12
5 files changed, 36 insertions, 2 deletions
diff --git a/euscanwww/djeuscan/templates/euscan/_package_details.html b/euscanwww/djeuscan/templates/euscan/_package_details.html
index 4345b32..8953345 100644
--- a/euscanwww/djeuscan/templates/euscan/_package_details.html
+++ b/euscanwww/djeuscan/templates/euscan/_package_details.html
@@ -93,7 +93,7 @@
{% for url in version.urls_list %}
<a href="{{ url }}">{{ url }}</a>
{% endfor %}
- {% if confidence < 100 %}({{ version.confidence }}%){% endif %}
+ ({% if version.handler != "generic" %}{{ version.handler }} - {% endif %}{{ version.confidence }}%)
</li>
{% endfor %}
</ul>
diff --git a/euscanwww/djeuscan/templates/euscan/statistics.html b/euscanwww/djeuscan/templates/euscan/statistics.html
index f3866d9..8e03c3e 100644
--- a/euscanwww/djeuscan/templates/euscan/statistics.html
+++ b/euscanwww/djeuscan/templates/euscan/statistics.html
@@ -19,7 +19,11 @@
<tbody>
{% for handler in handlers %}
<tr>
- <td>{{ handler.handler }}</td>
+ <td>
+ <a href="{% url "statistics_handler" handler.handler %}">
+ {{ handler.handler }}
+ </a>
+ </td>
<td>{{ handler.n }}</td>
<td>{{ handler.avg_conf }}</td>
</tr>
diff --git a/euscanwww/djeuscan/templates/euscan/statistics_handler.html b/euscanwww/djeuscan/templates/euscan/statistics_handler.html
new file mode 100644
index 0000000..ff073e3
--- /dev/null
+++ b/euscanwww/djeuscan/templates/euscan/statistics_handler.html
@@ -0,0 +1,16 @@
+{% extends "euscan/_datatable.html" %}
+
+{% load url from future %}
+{% load djeuscan_helpers %}
+
+{% block title %}
+{{ block.super }} - Handler: {{ handler }}
+{% endblock %}
+
+{% block content %}
+<h2>
+ Handler: {{ handler }}
+</h2>
+{% packages packages %}
+
+{% endblock %}
diff --git a/euscanwww/djeuscan/urls.py b/euscanwww/djeuscan/urls.py
index ece411c..83a07de 100644
--- a/euscanwww/djeuscan/urls.py
+++ b/euscanwww/djeuscan/urls.py
@@ -82,6 +82,8 @@ urlpatterns = patterns('djeuscan.views',
url(r'^about/feeds$', 'feeds', name="feeds"),
url(r'^about/config$', 'config', name="config"),
url(r'^statistics/$', 'statistics', name="statistics"),
+ url(r'^statistics/handlers/(?P<handler>\w+)/$', 'statistics_handler',
+ name="statistics_handler"),
url(r'^statistics/charts/(?P<chart>[\w\-]+).png$', 'chart', name="chart"),
url(r'^world/$', 'world', name="world"),
url(r'^world/scan/$', 'world_scan', name="world_scan"),
diff --git a/euscanwww/djeuscan/views.py b/euscanwww/djeuscan/views.py
index 39d2fae..8456640 100644
--- a/euscanwww/djeuscan/views.py
+++ b/euscanwww/djeuscan/views.py
@@ -387,6 +387,18 @@ def statistics(request):
return {"handlers": handlers}
+@render_to("euscan/statistics_handler.html")
+def statistics_handler(request, handler):
+ package_ids = [
+ elem["package"] for elem in
+ Version.objects.filter(handler=handler)
+ .values("package")
+ .distinct()
+ ]
+ packages = Package.objects.filter(pk__in=package_ids)
+ return {"handler": handler, "packages": packages}
+
+
def chart(request, **kwargs):
from django.views.static import serve