new: [UI] Add ascii view for IDNs on tree

pull/1017/head
Raphaël Vinot 2024-12-15 21:41:11 +01:00
parent 7113ea4db8
commit b38554d0ff
No known key found for this signature in database
GPG Key ID: 32E4E1C133B3792F
2 changed files with 23 additions and 1 deletions

View File

@ -38,7 +38,7 @@
"stats.css": "/kY943FwWBTne4IIyf7iBROSfbGd82TeBicEXqKkRwawMVRIvM/Pk5MRa7okUyGIxaDjFQGmV/U1vy+PhN6Jbw==",
"stats_graph.js": "S/sMNQK1UMMLD0xQeEa7sq3ce8o6oPxwxGlyKVtaHOODjair86dbBDm7cu6pa/elMRDJT1j09jEFjWp+5GbhTw==",
"tree.css": "jc7+RiJaZy7utfMu7iMWicpt0y0ZFiEQlB4c7MFNdlWcZf0czi3LgSQUFlDWt828Mx463V+JP1RalXuRjbGcEg==",
"tree.js": "lj5SMtMYs2Oo++fWzHl2aQVHraCFZgpLCey99kql5wjhpYXryoacHM1zLHrP9E6A+b/1VA2zun9d445E3RLk4Q==",
"tree.js": "ZplkJ6NSrYoPskvwuFIDUY2i5E2fj2lCBqQRC7m5w/z2p2fF1wsYqiQmggLhwImfcD7A8QglOkF08zNp+mjdcg==",
"tree_modals.js": "E3SbfY0PXAwAOjaTu+l8VJ1L84bM7VgMRt3xEwdsPmstipyAlFtJAUTBV1FoV6nXRp7vKqeHtKDvncgapGs1Uw==",
"up.jpg": "d1ljZJ9f5JekyM6RLFFH2Ua44j6neiQBdUIXOenRTjGppQr3JaeglpQIH6BjPCJL177+TH52U3UIRNS5YAyKIg==",
"up_right.jpg": "OMmz+n+MxR34P8/fn5t4DkqKqdJRzQbXQ7fAi2lhkZIJGhVs2vIyY1f2hpYoBxDAX1OcYsSE2lqIR2vXNDGZsA==",

View File

@ -399,6 +399,28 @@ function text_entry(relative_x_pos, relative_y_pos, d) {
return to_print;
});
if (d.data.idna) {
nodeContent.append("text")
.attr('dy', '2.6em')
.attr('dx', '2em')
.attr("stroke", "white")
.style("font-size", "10px")
.attr("stroke-width", ".2px")
.style("opacity", .9)
.attr('cursor', 'pointer')
.on('click', (event, d) => open_hostnode_popup(d.data.uuid))
.on('mouseover', (event, d) => {
d3.select('#tooltip')
.style('opacity', 1)
.style('left', `${event.pageX + 10}px`)
.style('top', `${event.pageY + 10}px`)
.text('Open investigation pop-up.');
})
.on('mouseout', (event, d) => d3.select('#tooltip').style('opacity', 0))
.text(d => { return d.data.name }
);
}
return nodeContent.node();
}