From b4e5d1be08865af4e84911d294e0543d10b20669 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Thu, 16 Jul 2020 01:08:39 +0200 Subject: [PATCH] chg: Fix a bunch of views, make icons clickable. --- website/web/__init__.py | 4 ++ website/web/templates/hostname_popup.html | 54 ++++++++++++----------- website/web/templates/macros.html | 12 +++-- 3 files changed, 41 insertions(+), 29 deletions(-) diff --git a/website/web/__init__.py b/website/web/__init__.py index 36ef58c..1f03cd5 100644 --- a/website/web/__init__.py +++ b/website/web/__init__.py @@ -164,10 +164,14 @@ def hostnode_popup(tree_uuid: str, node_uuid: str): 'font': "/static/font.png", 'html': "/static/html.png", 'json': "/static/json.png", + 'text': "/static/json.png", # FIXME: Need new icon 'iframe': "/static/ifr.png", 'image': "/static/img.png", + 'unset_mimetype': "/static/wtf.png", + 'octet-stream': "/static/wtf.png", 'unknown_mimetype': "/static/wtf.png", 'video': "/static/video.png", + 'livestream': "/static/video.png", 'response_cookie': "/static/cookie_received.png", 'redirect': "/static/redirect.png", 'redirect_to_nothing': "/static/cookie_in_url.png" diff --git a/website/web/templates/hostname_popup.html b/website/web/templates/hostname_popup.html index 414467b..5b2e46c 100644 --- a/website/web/templates/hostname_popup.html +++ b/website/web/templates/hostname_popup.html @@ -83,26 +83,14 @@ + {% endif %} - {% endif %} {% else %}

This file is loaded multiple times in this capture.

@@ -89,13 +89,17 @@ The same file was seen in {{ total_captures }} other captures. {% for key, path in lookup_dict.items() %} {% if urlnode[key] %} {% if key == "request_cookie" %} - + {{ key }} {% elif key == "response_cookie"%} - + {{ key }} + {% elif key in ["js", "exe", "css", "font", "html", "json", "image", "video", "unknown_mimetype", "text", "unset_mimetype", "octet-stream", "livestream"] and not urlnode.empty_response %} + + {{ key }} + {% else %} {{ key }} {%endif%}