mirror of https://github.com/CIRCL/lookyloo
new: WiP feature: flag a node on the tree.
parent
d8ac3a6900
commit
32c41814b1
website/web
static
|
@ -81,20 +81,30 @@ function hostnode_click_popup(d) {
|
|||
window.open('/tree/' + treeUUID + '/hostname_popup/' + d.data.uuid, '_blank', 'width=1024,height=768,left=200,top=100');
|
||||
};
|
||||
|
||||
function ProcessChildMessage(urlnode_uuid) {
|
||||
function LocateNode(urlnode_uuid) {
|
||||
var element = document.getElementById("node_" + urlnode_uuid);
|
||||
element.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
|
||||
|
||||
var to_blink = d3.select("#node_" + urlnode_uuid).select('text');
|
||||
to_blink
|
||||
.transition().duration(500) //Set transition
|
||||
.transition().duration(1000) //Set transition
|
||||
.style('fill', 'red')
|
||||
.style('font-size', '20px')
|
||||
.transition().duration(500) //Set transition
|
||||
.transition().duration(1000) //Set transition
|
||||
.style('fill', 'black')
|
||||
.style('font-size', '16px');
|
||||
};
|
||||
|
||||
function PermanentNodeHighlight(urlnode_uuid) {
|
||||
var element = document.getElementById("node_" + urlnode_uuid);
|
||||
element.scrollIntoView({behavior: "smooth", block: "center", inline: "nearest"});
|
||||
|
||||
var to_bold = d3.select("#node_" + urlnode_uuid).select('text');
|
||||
to_bold
|
||||
.style('fill', 'red')
|
||||
.style('font-weight', 'bold');
|
||||
};
|
||||
|
||||
function icon(key, icon_path, d, icon_size){
|
||||
var iconContent = d3.create("svg") // WARNING: svg is required there, "g" doesn't have getBBox
|
||||
.attr('class', 'icon');
|
||||
|
|
|
@ -11,7 +11,10 @@
|
|||
{{ super() }}
|
||||
<script>
|
||||
function whereAmI(hostname_uuid) {
|
||||
window.opener.ProcessChildMessage(hostname_uuid);
|
||||
window.opener.LocateNode(hostname_uuid);
|
||||
};
|
||||
function flag(hostname_uuid) {
|
||||
window.opener.PermanentNodeHighlight(hostname_uuid);
|
||||
};
|
||||
</script>
|
||||
<script>
|
||||
|
@ -103,7 +106,7 @@
|
|||
</p>
|
||||
<div class="collapse" id="request_cookies_full_list_{{ url['url_object'].uuid }}">
|
||||
<div class="card card-body">
|
||||
{{ indexed_cookies("List of cookies sent in the request", "Flag node setting this cookie", url['cookies_sent']) }}
|
||||
{{ indexed_cookies("List of cookies sent in the request", "Node setting this cookie", url['cookies_sent']) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -191,8 +194,8 @@
|
|||
</p>
|
||||
<div class="collapse" id="response_cookies_full_list_{{ url['url_object'].uuid }}">
|
||||
<div class="card card-body">
|
||||
{{ indexed_cookies("This response contains 3rd party cookies:", "Flag node sending this cookie", url['cookies_received']['3rd_party']) }}
|
||||
{{ indexed_cookies("Cookies, sent somewhere in the capture", "Flag node sending this cookie", url['cookies_received']['sent']) }}
|
||||
{{ indexed_cookies("This response contains 3rd party cookies:", "Node sending this cookie", url['cookies_received']['3rd_party']) }}
|
||||
{{ indexed_cookies("Cookies, sent somewhere in the capture", "Node sending this cookie", url['cookies_received']['sent']) }}
|
||||
{{ indexed_cookies("Cookies, never sent", "", url['cookies_received']['not_sent']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -76,7 +76,10 @@
|
|||
<li>
|
||||
{{ detail[0] }}: <a href="{{ url_for('cookies_name_detail', cookie_name=cookie_name_value[0]) }}">
|
||||
{{ cookie_name_value[0] }}</a>={{ shorten_string(cookie_name_value[1], 200) }} -
|
||||
<button type="button" class="btn btn-info" onclick="whereAmI('{{ detail[1] }}')">{{ button_text }}</button>
|
||||
</br>
|
||||
{{ button_text }}
|
||||
<button type="button" class="btn btn-info" onclick="whereAmI('{{ detail[1] }}')">Locate</button>
|
||||
<button type="button" class="btn btn-info" onclick="flag('{{ detail[1] }}')">Flag</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<script>
|
||||
history.scrollRestoration = "manual";
|
||||
window.addEventListener('DOMContentLoaded', (event) => {
|
||||
ProcessChildMessage('{{urlnode_uuid}}');
|
||||
PermanentNodeHighlight('{{urlnode_uuid}}');
|
||||
});
|
||||
</script>
|
||||
{% endif%}
|
||||
|
|
Loading…
Reference in New Issue