euscanwww: per handler package list
Signed-off-by: volpino <fox91@anche.no>
This commit is contained in:
parent
8ad3ed2897
commit
a8f69e8128
@ -93,7 +93,7 @@
|
|||||||
{% for url in version.urls_list %}
|
{% for url in version.urls_list %}
|
||||||
<a href="{{ url }}">{{ url }}</a>
|
<a href="{{ url }}">{{ url }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if confidence < 100 %}({{ version.confidence }}%){% endif %}
|
({% if version.handler != "generic" %}{{ version.handler }} - {% endif %}{{ version.confidence }}%)
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -19,7 +19,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for handler in handlers %}
|
{% for handler in handlers %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ handler.handler }}</td>
|
<td>
|
||||||
|
<a href="{% url "statistics_handler" handler.handler %}">
|
||||||
|
{{ handler.handler }}
|
||||||
|
</a>
|
||||||
|
</td>
|
||||||
<td>{{ handler.n }}</td>
|
<td>{{ handler.n }}</td>
|
||||||
<td>{{ handler.avg_conf }}</td>
|
<td>{{ handler.avg_conf }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
16
euscanwww/djeuscan/templates/euscan/statistics_handler.html
Normal file
16
euscanwww/djeuscan/templates/euscan/statistics_handler.html
Normal file
@ -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 %}
|
@ -82,6 +82,8 @@ urlpatterns = patterns('djeuscan.views',
|
|||||||
url(r'^about/feeds$', 'feeds', name="feeds"),
|
url(r'^about/feeds$', 'feeds', name="feeds"),
|
||||||
url(r'^about/config$', 'config', name="config"),
|
url(r'^about/config$', 'config', name="config"),
|
||||||
url(r'^statistics/$', 'statistics', name="statistics"),
|
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'^statistics/charts/(?P<chart>[\w\-]+).png$', 'chart', name="chart"),
|
||||||
url(r'^world/$', 'world', name="world"),
|
url(r'^world/$', 'world', name="world"),
|
||||||
url(r'^world/scan/$', 'world_scan', name="world_scan"),
|
url(r'^world/scan/$', 'world_scan', name="world_scan"),
|
||||||
|
@ -387,6 +387,18 @@ def statistics(request):
|
|||||||
return {"handlers": handlers}
|
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):
|
def chart(request, **kwargs):
|
||||||
from django.views.static import serve
|
from django.views.static import serve
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user